Open GuFFy12 opened 2 years ago
Now when you respond to a 404 error code (tokens not found or too many), you don't get the rate limit. In order not to abuse getting errors, slow-down module is added.
Ready-made backend functions: checker, info, idTracker, webhookSpammer, accountDisabler, nitroPurchaser (need test). Todo: serverNuke (need fix problem when account disables after use), userNuke (account disables in half request func).
Webhook spammer is currently properly working. You can test it:
POST https://lililil.xyz/checker
{"action": "webhookSpammer", "data": {"webhooks": "", "amount": "", "delete": "", "name": "", "avatar": "", "message": ""} }
ps yes, code supports multiply webhooks. but data.amount * parsedWebhooks.length !> 100
Account disabler is good too. Disable (unverified) any token.
POST https://lililil.xyz/checker
{"action": "webhookSpammer", "data": "TOKENS"}
Info func is returns the same as the checker, but the data is append: subscriptions, guilds, relationships, connections.
Slow-down on failed request was deleted. Now failed request also been rate-limited. (If request dont finished, you can spam request, so its been deleted).
Improve tokens parser on backend. Now tokens validate using jsonwebtoken lib.
Server temporary unavailable due rewrite some critical issues.
Backend fixed!
Maybe today I will make the token verification limit up to 10000 tokens. The timeout will be calculated using the formula y=x*2/10 (x - number of tokens, y - delay in milliseconds).
good job GuFFy12
After backend fix it working incorrectly. I push new update soon as possible.
The request library I use (axios) can hang when there is no response from the server (discord). I found a couple of solutions, but due to the inability to reproduce this error, I cannot test the fixes. I urgently need to rewrite the getRequest function.
Current errors and their handling
1) error.response === undefined or error.response.data === "error code: 1015": Called when discord blocks us or there is a problem with the request. Need to change the proxy and add it to rateData for rechecking.
2) error.response.status === 429: Discord callback, needs to wait. Need to add it to rateData for rechecking and add error.response.data.retry_after to the wait function.
3) JSON.stringify(response.data).startsWith("<") Called when a cloudflare window appears instead of a response. The worst mistake is to manually process the information for rateData.
4) req time > 5 seconds. Need to cancel the request and add it to rateData.
All issues in getRequest function fixed. There are no problems that I know, the backend, like the frontend, like the telegram bot, have been improved and polished.
Added webSocket and postRequest functions. The spammer and other features related to new types of requests are being tested.
And I forgot to remind you that now I have added proxies! Accuracy is not affected, 429 and invalid proxy requests are checked again. Also, now the request execution time has become dynamic, get the request timeout: lililil.xyz/checker
New api! Now written on typescript and uses websocket!!! Try optimise parallel request. Rewrite getRequest method.
Using https://github.com/sindresorhus/p-map speed probably increased ~1.5 times!!!
NO WAY
4 TIMES!!!
BOTTLENECK FIX
List of current errors, after which I will launch a new version of the checker: 1) Add dotenv - Done 2) Fix error handler in api - Done 3) Test some stuff - Done 4) Cleanup & beauti code - Done 5) Depth recursive to getRequest - Done 6) Add own proxy connection timed out - Done 7) err.response.data === "error code: 1015". Unknown error code. - Done 8) Add redis backed queue with multi concurrency. - Done 9) Add new tokensCheckerConfig - Done 10) Better request error handler - Done 11) Add interfaces for me and paymentSources - Done 12) Add version endpoint - Done 13) Write documentation to api - 0% 14) Small fixes and improvements - Done 15) Add log4j support - Done
Tomorrow I will full test new api and write documentation of it. Soon I will write react frontend!
Due to the fact that I do not have time to meet the deadlines, I will have to release a new version of the api with a slightly rewritten old frontend. Only the tokensData parsing method will be added to tokensInfo since this is no longer done on the server to optimize traffic. I will try to slowly make a version on react.
Fixed PayloadTooLargeError: request entity too large. Now limit is 2000 tokens.