ztgrace / changeme

A default credential scanner.
GNU General Public License v3.0
1.44k stars 248 forks source link

custom headers in mkcreds, headers in basic auth, delay loop #15

Closed Graph-X closed 7 years ago

Graph-X commented 7 years ago

mkcred.py: Added input for custom headers. Looks for anything but a blank line. It might be a good idea to build in some idiot proofing to the script, but I guess if someone wants to put garbage in they should expect garbage out.

changeme.py: added the headers to the basic_auth and also built in some conditional logic to both functions around the delay. If the status_code is 429 then loop while i < 2 and status_code is for 429. This might not work how I think it will though. I'm going to try my hand at making a test for this.

ztgrace commented 7 years ago

Thanks for the changes. I'm going to pull them as-is for now, but will redo that logic when I refactor the project. There's a lot of repeated code that breaks the DRY (don't repeat yourself) principle and could probably be handled with an additional config option or kwarg to the check* methods.