MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / postgres_passwd

Function postgres_passwd

lib/utils/hash.py:133–147  ·  view source on GitHub ↗

Reference(s): http://pentestmonkey.net/blog/cracking-postgres-hashes/ >>> postgres_passwd(password='testpass', username='testuser', uppercase=False) 'md599e5ea7a6f7c3269995cba3927fd0093'

(password, username, uppercase=False)

Source from the content-addressed store, hash-verified

131 return retVal.upper() if uppercase else retVal.lower()
132
133def postgres_passwd(password, username, uppercase=False):
134 """
135 Reference(s):
136 http://pentestmonkey.net/blog/cracking-postgres-hashes/
137
138 >>> postgres_passwd(password='testpass', username='testuser', uppercase=False)
139 'md599e5ea7a6f7c3269995cba3927fd0093'
140 """
141
142 username = getBytes(username)
143 password = getBytes(password)
144
145 retVal = "md5%s" % md5(password + username).hexdigest()
146
147 return retVal.upper() if uppercase else retVal.lower()
148
149def mssql_new_passwd(password, salt, uppercase=False): # since version '2012'
150 """

Callers

nothing calls this directly

Calls 1

getBytesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…