Skip to content

Commit 883bd23

Browse files
committed
Minor refactoring
1 parent db512c7 commit 883bd23

4 files changed

Lines changed: 6 additions & 29 deletions

File tree

data/txt/sha256sums.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ ac44a343947162532dbf17bd1f9ab424f8008f677367c5ad3f9f7b715a679818 lib/core/agent
170170
86a9cb82c7e7beb4730264dae20bf3b7cd87c0dcaee587367362cf319f7bb079 lib/core/bigarray.py
171171
f6062e324fdeaacf9df0a289fc3f12f755143e3876a70cb65b38aa2e690f73c1 lib/core/common.py
172172
11c748cc96ea2bc507bc6c1930a17fe4bc6fdd2dd2a80430df971cb21428eb00 lib/core/compat.py
173-
39ea62d4224be860befeffb3843c150f2343b64555ad8c438a400222056f6cc0 lib/core/convert.py
173+
8ce42a336f9acc1a10874ee7be4492ae30fb08b79caea20512d109670a2fa159 lib/core/convert.py
174174
ae500647c4074681749735a4f3b17b7eca44868dd3f39f9cab0a575888ba04a1 lib/core/data.py
175175
b22decc8389c94a13f1adf07eb343cf3b2aae3fb3909fd4107e24bbede7c7deb lib/core/datatype.py
176176
253309dc355ae27cd275e7de5a068e7e22feba603c4fe3429e2b69f8a51c0d13 lib/core/decorators.py
@@ -190,7 +190,7 @@ c4bfb493a03caf84dd362aec7c248097841de804b7413d0e1ecb8a90c8550bc0 lib/core/readl
190190
d1bd70c1a55858495c727fbec91e30af267459c8f64d50fabf9e4ee2c007e920 lib/core/replication.py
191191
1d0f80b0193ac5204527bfab4bde1a7aee0f693fd008e86b4b29f606d1ef94f3 lib/core/revision.py
192192
d2eb8e4b05ac93551272b3d4abfaf5b9f2d3ac92499a7704c16ed0b4f200db38 lib/core/session.py
193-
9fd2f4141bce8cfa5b0e10d7391c12b46fa5a7d574c548a5d75597ff6df48bf0 lib/core/settings.py
193+
133e0f45cb7f03ea2322235892d6dff38302ddf65c0a7940976e6f54d65147b4 lib/core/settings.py
194194
1c5eab9494eb969bc9ce118a2ea6954690c6851cbe54c18373c723b99734bf09 lib/core/shell.py
195195
4eea6dcf023e41e3c64b210cb5c2efc7ca893b727f5e49d9c924f076bb224053 lib/core/subprocessng.py
196196
cdd352e1331c6b535e780f6edea79465cb55af53aa2114dcea0e8bf382e56d1a lib/core/target.py
@@ -393,7 +393,7 @@ a1cf9a8cd5e263d1e48dc8b5281febaf868ee91f1e0587dee915949fdb6da1ea plugins/dbms/m
393393
84d9f336ff3d75a1127c7f5ccda7bff6dac947d7d8bbeee2014e8a29b984a98d plugins/dbms/monetdb/takeover.py
394394
545fbbb386ab7819261a3917d0f016d723dbced8e065945ba60271a73544c459 plugins/dbms/mssqlserver/connector.py
395395
2895d14ead30d7ee4e1fdb29a8d1d059493ad60490ed2e9ff6cb9680257554cd plugins/dbms/mssqlserver/enumeration.py
396-
89cbc49cd9113e9ba91be090f79c0384089d1bfed785ac8ee5b07f84309c74cb plugins/dbms/mssqlserver/filesystem.py
396+
5f8789cca87732612044fa1b952eceb52c0a354d70dc31fb9fe966ce796f89b7 plugins/dbms/mssqlserver/filesystem.py
397397
87a35cadd3fe4987f548f498c442f748cf1f37650fd1dcd8decd1455a90d675c plugins/dbms/mssqlserver/fingerprint.py
398398
784d6065921a8efbba970864a2cb2e0ef1dd1fcea7181cfc3f737bbfa18f0574 plugins/dbms/mssqlserver/__init__.py
399399
79a887b5a2449bb086805560ff0ec2a2304dd142f47450ae9c2f88cf8bda9ac9 plugins/dbms/mssqlserver/syntax.py

lib/core/convert.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -138,29 +138,6 @@ def dejsonize(data):
138138

139139
return json.loads(data)
140140

141-
def rot13(data):
142-
"""
143-
Returns ROT13 encoded/decoded text
144-
145-
>>> rot13('foobar was here!!')
146-
'sbbone jnf urer!!'
147-
>>> rot13('sbbone jnf urer!!')
148-
'foobar was here!!'
149-
>>> rot13(b'foobar was here!!')
150-
'sbbone jnf urer!!'
151-
"""
152-
153-
retVal = ""
154-
alphabit = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
155-
156-
if isinstance(data, six.binary_type):
157-
data = getText(data)
158-
159-
for char in data:
160-
retVal += alphabit[alphabit.index(char) + 13] if char in alphabit else char
161-
162-
return retVal
163-
164141
def decodeHex(value, binary=True):
165142
"""
166143
Returns a decoded representation of the provided hexadecimal value

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from thirdparty import six
2020

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

plugins/dbms/mssqlserver/filesystem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8+
import codecs
89
import ntpath
910
import os
1011

@@ -18,7 +19,6 @@
1819
from lib.core.compat import xrange
1920
from lib.core.convert import encodeBase64
2021
from lib.core.convert import encodeHex
21-
from lib.core.convert import rot13
2222
from lib.core.data import conf
2323
from lib.core.data import kb
2424
from lib.core.data import logger
@@ -334,7 +334,7 @@ def _stackedWriteFileVbs(self, tmpPath, localFileContent, remoteFile, fileType):
334334
Raq Shapgvba"""
335335

336336
# NOTE: https://github.com/sqlmapproject/sqlmap/issues/5581
337-
vbs = rot13(vbs)
337+
vbs = codecs.decode(vbs, "rot13")
338338
vbs = vbs.replace(" ", "")
339339
encodedFileContent = encodeBase64(localFileContent, binary=False)
340340

0 commit comments

Comments
 (0)