Skip to content

Commit a219ff9

Browse files
committed
1 parent 795777b commit a219ff9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/core/wordlist.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ def next(self):
7777
except StopIteration:
7878
self.adjust()
7979
retVal = self.iter.next().rstrip()
80-
try:
81-
retVal = retVal.decode(UNICODE_ENCODING)
82-
except UnicodeDecodeError:
83-
continue
8480
if not self.proc_count or self.counter % self.proc_count == self.proc_id:
8581
break
8682
return retVal

lib/utils/hash.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ def oracle_old_passwd(password, username, uppercase=True): # prior to version '
209209
if isinstance(username, unicode):
210210
username = unicode.encode(username, UNICODE_ENCODING) # pyDes has issues with unicode strings
211211

212+
if isinstance(password, unicode):
213+
password = unicode.encode(password, UNICODE_ENCODING)
214+
212215
unistr = "".join("\0%s" % c for c in (username + password).upper())
213216

214217
cipher = des(hexdecode("0123456789ABCDEF"), CBC, IV, pad)
@@ -327,7 +330,8 @@ def _encode64(input_, count):
327330

328331
return output
329332

330-
password = password.encode(UNICODE_ENCODING)
333+
if isinstance(password, unicode):
334+
password = password.encode(UNICODE_ENCODING)
331335

332336
cipher = md5(salt)
333337
cipher.update(password)

0 commit comments

Comments
 (0)