Closed darkpills closed 4 years ago
Hello @darkpills,
First, thanks for your help and for and these improvements! After a few tests, it seems that some of your modifications have introduced a bug that does not parse raw (JSON) and/or does not display the results in CLI and don't send Slack notification if a pattern is found.
For a same request, we compared the actual script and your script, and the new version don't find any tokens. Could you check on your side too?
We check this problem internally and we will be back shortly.
Thank you :)
Adrien
Hello @darkpills
Thank you for the update and the enhancement regarding the token management !
It seems that some part of the code also needs to be updated because we have multiple occurences of HTTP requests to retrieve the different information and that each time we doing a request we have to set the headers with a working Github token.
For example, the parseResults function has a (dirty) hardcoded value for a specific token in the header :
headers = {'Accept': 'application/vnd.github.v3.text-match+json', 'Authorization': 'token ' + config.GITHUB_TOKENS[3] }
However, the modifications suggested transform the config.GITHUB_TOKENS list to a dict which causes some issues.
I think that it would be good to ensure that each HTTP request uses the getGithubToken function to build the headers, and that the token status update is properly done after each request.
What is your feeling about that ?
Thanks !
Hello,
Sorry, there were several occurence of the git call function. I did a fix in this last commit and improved the token storage to be PATH (URI) based instead of having counters for any PATH.
Hope this new commit fix the issue.
Hey @darkpills
Thanks for the update, this looks nice. Let give us a review / try and we will do a feedback shortly.
Thank you :) !
Thanks @darkpills!
You're welcome, really really nice tool! You did a great job!