aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-02-20 15:49:04 +0100
committerneodarz <neodarz@neodarz.net>2019-02-20 15:49:04 +0100
commitc303f0d237a35b2d5c2c143a6ccfe34b99389bdd (patch)
tree67f305eb3dbc7ecd5b7234373955c433540bca0b
parentad60fc5e68ead19c45e960a156fbc48f9371dc4e (diff)
downloaddotfiles_ascii-c303f0d237a35b2d5c2c143a6ccfe34b99389bdd.tar.xz
dotfiles_ascii-c303f0d237a35b2d5c2c143a6ccfe34b99389bdd.zip
Add more tips for pass
-rw-r--r--cheat/.cheat/pass41
1 files changed, 41 insertions, 0 deletions
diff --git a/cheat/.cheat/pass b/cheat/.cheat/pass
index 5956ff9..b45b586 100644
--- a/cheat/.cheat/pass
+++ b/cheat/.cheat/pass
@@ -1,2 +1,43 @@
# Autotype:
autotype: user :tab pass :enter
+
+# check if pawned
+
+Python de Dropper:
+```
+import urllib2
+import hashlib
+
+CLEAN = 0
+PWNED = 1
+ERROR = -1
+
+def check_password(password):
+ m = hashlib.sha1()
+ m.update(password.encode('utf-8'))
+ hx = m.hexdigest().upper()
+
+ headers = {
+ 'User-Agent': 'pass-check',
+ 'api-version' : '2'
+ }
+
+ try:
+ req = urllib2.Request('https://api.pwnedpasswords.com/range/' + hx[:5], headers=headers)
+ response = urllib2.urlopen(req)
+ for line in response.read().splitlines():
+ if hx[5:] == line.split(":")[0]:
+ return PWNED
+ return CLEAN
+
+ except:
+ return ERROR
+
+if __name__ == '__main__':
+ if check_password("Password1") == PWNED:
+ print("PWNED !")
+ else:
+ print("MAYBE")
+```
+
+https://gitlab.com/darnir/pass-audit