Comments (5)
Looks great!
from advent-of-code-data.
Hi Eric,
Thanks for your work on AoC!
OK, I will make v0.3 memoize the puzzle inputs and persist that data to a file storage.
It's not really possible to prevent people abusing the site by calling get_data in a loop client-side, any counter-measure I put in would be easily reversed. The responsibility for rate-limiting is better handled server-side.
What I can do is prevent a new request if the time of the last request was just 5~10 seconds ago. But it would only prevent users who made stupid mistake, it's unlikely going to stop a malicious user that wants to DoS you. Let me know what you think.
Thanks and regards,
Wim
from advent-of-code-data.
I'm not trying to stop malicious users; they have substantially better ways of executing an attack than your library. I'm trying to avoid beginners (of whom there are many doing AoC) from thinking they'll be clever and stick the method in a loop without realizing the implications.
I just posted a new thread on the subreddit since I'm seeing libraries like this more frequently lately:
https://www.reddit.com/r/adventofcode/comments/5gefzc/only_you_can_prevent_ddos_attacks_on_aoc/
from advent-of-code-data.
@topaz The latest release includes client-side rate limiting on get_data
(1 request per 10 seconds) and saves the inputs to disk for later re-use. Please have a look at it and let me know if it addresses all your concerns. If there are no further changes needed, you may close this issue. Cheers 🍺
from advent-of-code-data.
One more minor change: if this is going to be widely deployed in places like pypi, please set a unique user agent so this library can be identified in my logs.
from advent-of-code-data.
Related Issues (20)
- Get response from submission HOT 5
- "chunks" transform HOT 1
- don't submit an answer we know is too low or too high
- Many pytest.raises tests failing HOT 1
- Using the oop interface just prints the description of part 1 HOT 2
- add ability to run aoc runner against sample data(s)
- DeadTokenError when running on command line HOT 1
- SSL Verification Failed HOT 2
- Get unexpected response coerced int64 printed from submit HOT 1
- Proxy settings not observed.
- aoc command line triggers rate limiter HOT 3
- How to invalidate the HTML cache of a puzzle? HOT 2
- Wrong reference test data for 2023/12/14 HOT 4
- Automated rate limiting HOT 1
- Include contact information in the user agent, otherwise it will be blocked HOT 1
- filename date extraction magic fails when run from jupyterlab / .ipynb file HOT 8
- Proxy not used HOT 3
- No name "Puzzle" in module "aocd" HOT 7
- Add typecheck (int, float, str) to aocd.models.puzzle.answer_a/b? HOT 7
- example data is not parsed correctly HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advent-of-code-data.