This commit is contained in:
Miroslav Stampar 2015-11-29 19:40:14 +01:00
parent 795777b7c5
commit a219ff9a92
2 changed files with 5 additions and 5 deletions

View File

@ -77,10 +77,6 @@ class Wordlist(object):
except StopIteration:
self.adjust()
retVal = self.iter.next().rstrip()
try:
retVal = retVal.decode(UNICODE_ENCODING)
except UnicodeDecodeError:
continue
if not self.proc_count or self.counter % self.proc_count == self.proc_id:
break
return retVal

View File

@ -209,6 +209,9 @@ def oracle_old_passwd(password, username, uppercase=True): # prior to version '
if isinstance(username, unicode):
username = unicode.encode(username, UNICODE_ENCODING) # pyDes has issues with unicode strings
if isinstance(password, unicode):
password = unicode.encode(password, UNICODE_ENCODING)
unistr = "".join("\0%s" % c for c in (username + password).upper())
cipher = des(hexdecode("0123456789ABCDEF"), CBC, IV, pad)
@ -327,7 +330,8 @@ def wordpress_passwd(password, salt, count, prefix, uppercase=False):
return output
password = password.encode(UNICODE_ENCODING)
if isinstance(password, unicode):
password = password.encode(UNICODE_ENCODING)
cipher = md5(salt)
cipher.update(password)