
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Helper package to interact with the Advent of Code website programmatically through JavaScript
I take no responsibility if you submit wrong answers or get timed out. This does not mean that it doesn't work, it just means that I am not responsible if anything happens by misuse. I use this personally, and it works for me, so I decided to clean it up and share it. If you have any problems or suggestions please feel free to open up an issue or submit a pull request. If the author of Advent of Code wishes for this package to be taken down due to abuse or spam then I will be happy to oblige.
There is a mandatory 5-second cooldown between sending the same request twice in order to attempt to reduce the stress. Note that this classes getQuestionHTML, getQuestionMarkdown and getQuestionPlaintext into one cooldown as this is essentially the same request but is just handled differently. If you wish to get two or all three at once, request getQuestionHTML and then pass the output through
Within your browser, navigate to the Advent of Code site,
open dev tools and go to the tab labeled Network
.
Load any Advent of Code page, click on the request for that page and look at
the Request
header. It should contain a string that looks like sessions=
and then a bunch of characters. Everything after the =
is your session token.
Network
tab
Control + Shift + E
Command + Shift + E
Control + Shift + I
Command + Shift + I
Using npm
npm install aoc-helper
Using yarn
yarn add aoc-helper
In order to submit, get input or check Part 2 of questions, put your
session token line 20 of /example/index.js
Run example using npm
npm run example
Run example using yarn
yarn run example
Example code
const {AoCHelper} = require('../lib');
const helper = new AoCHelper('Your token here');
helper.getQuestionPlaintext(1, 5)
.then(res => console.log(`\n\nThis Year Day 5 Part 2 Question:\n${res}`))
.catch(console.log);
helper.getInput()
.then(res => console.log(`\n\nToday's Input: \n${res}`))
.catch(console.log);
helper.submitAnswer(25245345, 2, 2, 2020)
.then(console.log)
.catch(console.log);
All functions that take part
, day
or year
can be omitted or
passed as null
and they will default to the values below
part
- 1day
- The current day 1 hour ahead of ESTyear
- The current year if the current month is December, else last yearArguments
session
- Your session token included in all Advent of Code requestsArguments
answer
- Answer to questionpart
- The specific part of the question, Should only be 1 or 2day
- Day of the question to submityear
- Year of the question to submitmaxIteration - Default:5
- If this is set 1 or less it will not try to resubmit if you've been timed outfallbackCooldown - Default:10000
- The cooldown to wait before resubmitting if you've been timed out, but the timeout could not be detected/parsedDescription
Arguments
day
- Day of the input to getyear
- Year of the input to getDescription
Arguments
part
- Which part of the question to getday
- Day of the questionyear
- Year of the questionDescription
Arguments
part
- Which part of the question to getday
- Day of the questionyear
- Year of the questionDescription
Arguments
part
- Which part of the question to getday
- Day of the questionyear
- Year of the questionDescription
Description
Arguments
html
- HTML input to convertDescription
Arguments
html
- HTML input to convertDescription
FAQs
Helper package to interact with the Advent of Code website programmatically through JavaScript
The npm package aoc-helper receives a total of 0 weekly downloads. As such, aoc-helper popularity was classified as not popular.
We found that aoc-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.