Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4591301

Browse files
committed
Minor patch
1 parent 0a8a65b commit 4591301

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

lib/core/convert.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,20 @@ def decodeBase64(value, binary=True, encoding=None):
198198
True
199199
>>> decodeBase64("MTIz", binary=False)
200200
'123'
201+
>>> decodeBase64(b"MTIzNA") == b"1234"
202+
True
203+
>>> decodeBase64("MTIzNA") == b"1234"
204+
True
205+
>>> decodeBase64("MTIzNA==") == b"1234"
206+
True
201207
"""
202208

209+
padding = b'=' if isinstance(value, bytes) else '='
210+
211+
# Reference: https://stackoverflow.com/a/49459036
212+
if not value.endswith(padding):
213+
value += 3 * padding
214+
203215
retVal = base64.b64decode(value)
204216

205217
if not binary:

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.6.21"
21+
VERSION = "1.4.7.0"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/utils/hash.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def vbulletin_passwd(password, salt, **kwargs):
484484
def wordpress_passwd(password, salt, count, prefix, **kwargs):
485485
"""
486486
Reference(s):
487-
http://packetstormsecurity.org/files/74448/phpassbrute.py.txt
487+
https://web.archive.org/web/20120219120128/packetstormsecurity.org/files/74448/phpassbrute.py.txt
488488
http://scriptserver.mainframe8.com/wordpress_password_hasher.php
489489
490490
>>> wordpress_passwd(password='testpass', salt='aD9ZLmkp', count=2048, prefix='$P$9aD9ZLmkp')

0 commit comments

Comments
 (0)