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

Function mysql_passwd

lib/utils/hash.py:93–106  ·  view source on GitHub ↗

Reference(s): https://web.archive.org/web/20120215205312/http://csl.sublevel3.org/mysql-password-function/ >>> mysql_passwd(password='testpass', uppercase=True) '*00E247AC5F9AF26AE0194B41E1E769DEE1429A29'

(password, uppercase=True)

Source from the content-addressed store, hash-verified

91from thirdparty.six.moves import queue as _queue
92
93def mysql_passwd(password, uppercase=True):
94 """
95 Reference(s):
96 https://web.archive.org/web/20120215205312/http://csl.sublevel3.org/mysql-password-function/
97
98 >>> mysql_passwd(password='testpass', uppercase=True)
99 '*00E247AC5F9AF26AE0194B41E1E769DEE1429A29'
100 """
101
102 password = getBytes(password)
103
104 retVal = "*%s" % sha1(sha1(password).digest()).hexdigest()
105
106 return retVal.upper() if uppercase else retVal.lower()
107
108def mysql_old_passwd(password, uppercase=True): # prior to version '4.1'
109 """

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…