mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-24 15:39:08 +03:00
Minor optimization
This commit is contained in:
parent
8fcd78fcb1
commit
5622a261cd
|
@ -186,7 +186,7 @@ c4bfb493a03caf84dd362aec7c248097841de804b7413d0e1ecb8a90c8550bc0 lib/core/readl
|
||||||
d1bd70c1a55858495c727fbec91e30af267459c8f64d50fabf9e4ee2c007e920 lib/core/replication.py
|
d1bd70c1a55858495c727fbec91e30af267459c8f64d50fabf9e4ee2c007e920 lib/core/replication.py
|
||||||
1d0f80b0193ac5204527bfab4bde1a7aee0f693fd008e86b4b29f606d1ef94f3 lib/core/revision.py
|
1d0f80b0193ac5204527bfab4bde1a7aee0f693fd008e86b4b29f606d1ef94f3 lib/core/revision.py
|
||||||
d2eb8e4b05ac93551272b3d4abfaf5b9f2d3ac92499a7704c16ed0b4f200db38 lib/core/session.py
|
d2eb8e4b05ac93551272b3d4abfaf5b9f2d3ac92499a7704c16ed0b4f200db38 lib/core/session.py
|
||||||
184c8befe5e613d1d18bbce4b2b7337536f9505f53b2f030d89e9e61f365741d lib/core/settings.py
|
56d26fde979eed26969c77432953e91dfd041b47bfdeb48283c820951751186f lib/core/settings.py
|
||||||
1c5eab9494eb969bc9ce118a2ea6954690c6851cbe54c18373c723b99734bf09 lib/core/shell.py
|
1c5eab9494eb969bc9ce118a2ea6954690c6851cbe54c18373c723b99734bf09 lib/core/shell.py
|
||||||
4eea6dcf023e41e3c64b210cb5c2efc7ca893b727f5e49d9c924f076bb224053 lib/core/subprocessng.py
|
4eea6dcf023e41e3c64b210cb5c2efc7ca893b727f5e49d9c924f076bb224053 lib/core/subprocessng.py
|
||||||
cdd352e1331c6b535e780f6edea79465cb55af53aa2114dcea0e8bf382e56d1a lib/core/target.py
|
cdd352e1331c6b535e780f6edea79465cb55af53aa2114dcea0e8bf382e56d1a lib/core/target.py
|
||||||
|
@ -612,13 +612,13 @@ f517561115b0cfaa509d0d4216cd91c7de92c6a5a30f1688fdca22e4cd52b8f8 thirdparty/kee
|
||||||
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 thirdparty/magic/__init__.py
|
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 thirdparty/magic/__init__.py
|
||||||
4d89a52f809c28ce1dc17bb0c00c775475b8ce01c2165942877596a6180a2fd8 thirdparty/magic/magic.py
|
4d89a52f809c28ce1dc17bb0c00c775475b8ce01c2165942877596a6180a2fd8 thirdparty/magic/magic.py
|
||||||
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 thirdparty/multipart/__init__.py
|
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 thirdparty/multipart/__init__.py
|
||||||
fa2c4cfc6f1fb29a3cf4ad119243a10aef2dfe9cf93129436aa649baef8e4764 thirdparty/multipart/multipartpost.py
|
2574a2027b4a63214bad8bd71f28cac66b5748159bf16d63eb2a3e933985b0a5 thirdparty/multipart/multipartpost.py
|
||||||
ef70b88cc969a3e259868f163ad822832f846196e3f7d7eccb84958c80b7f696 thirdparty/odict/__init__.py
|
ef70b88cc969a3e259868f163ad822832f846196e3f7d7eccb84958c80b7f696 thirdparty/odict/__init__.py
|
||||||
9a8186aeb9553407f475f59d1fab0346ceab692cf4a378c15acd411f271c8fdb thirdparty/odict/ordereddict.py
|
9a8186aeb9553407f475f59d1fab0346ceab692cf4a378c15acd411f271c8fdb thirdparty/odict/ordereddict.py
|
||||||
691ae693e3a33dd730930492ff9e7e3bdec45e90e3a607b869a37ecd0354c2d8 thirdparty/prettyprint/__init__.py
|
691ae693e3a33dd730930492ff9e7e3bdec45e90e3a607b869a37ecd0354c2d8 thirdparty/prettyprint/__init__.py
|
||||||
8df6e8c60eac4c83b1bf8c4e0e0276a4caa3c5f0ca57bc6a2116f31f19d3c33f thirdparty/prettyprint/prettyprint.py
|
8df6e8c60eac4c83b1bf8c4e0e0276a4caa3c5f0ca57bc6a2116f31f19d3c33f thirdparty/prettyprint/prettyprint.py
|
||||||
3739db672154ad4dfa05c9ac298b0440f3f1500c6a3697c2b8ac759479426b84 thirdparty/pydes/__init__.py
|
3739db672154ad4dfa05c9ac298b0440f3f1500c6a3697c2b8ac759479426b84 thirdparty/pydes/__init__.py
|
||||||
d1d54fc08f80148a4e2ac5eee84c8475617e8c18bfbde0dfe6894c0f868e4659 thirdparty/pydes/pyDes.py
|
4c9d2c630064018575611179471191914299992d018efdc861a7109f3ec7de5e thirdparty/pydes/pyDes.py
|
||||||
c51c91f703d3d4b3696c923cb5fec213e05e75d9215393befac7f2fa6a3904df thirdparty/six/__init__.py
|
c51c91f703d3d4b3696c923cb5fec213e05e75d9215393befac7f2fa6a3904df thirdparty/six/__init__.py
|
||||||
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 thirdparty/socks/__init__.py
|
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 thirdparty/socks/__init__.py
|
||||||
7027e214e014eb78b7adcc1ceda5aca713a79fc4f6a0c52c9da5b3e707e6ffe9 thirdparty/socks/LICENSE
|
7027e214e014eb78b7adcc1ceda5aca713a79fc4f6a0c52c9da5b3e707e6ffe9 thirdparty/socks/LICENSE
|
||||||
|
|
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty import six
|
from thirdparty import six
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.9.5.17"
|
VERSION = "1.9.5.18"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
2
thirdparty/multipart/multipartpost.py
vendored
2
thirdparty/multipart/multipartpost.py
vendored
|
@ -34,7 +34,7 @@ from thirdparty.six.moves import urllib as _urllib
|
||||||
|
|
||||||
# Controls how sequences are uncoded. If true, elements may be given
|
# Controls how sequences are uncoded. If true, elements may be given
|
||||||
# multiple values by assigning a sequence.
|
# multiple values by assigning a sequence.
|
||||||
doseq = 1
|
doseq = True
|
||||||
|
|
||||||
|
|
||||||
class MultipartPostHandler(_urllib.request.BaseHandler):
|
class MultipartPostHandler(_urllib.request.BaseHandler):
|
||||||
|
|
10
thirdparty/pydes/pyDes.py
vendored
10
thirdparty/pydes/pyDes.py
vendored
|
@ -453,7 +453,7 @@ class des(_baseDes):
|
||||||
|
|
||||||
def __permutate(self, table, block):
|
def __permutate(self, table, block):
|
||||||
"""Permutate this block with the specified table"""
|
"""Permutate this block with the specified table"""
|
||||||
return list(map(lambda x: block[x], table))
|
return [block[i] for i in table]
|
||||||
|
|
||||||
# Transform the secret key, so that it is ready for data processing
|
# Transform the secret key, so that it is ready for data processing
|
||||||
# Create the 16 subkeys, K[1] - K[16]
|
# Create the 16 subkeys, K[1] - K[16]
|
||||||
|
@ -506,7 +506,7 @@ class des(_baseDes):
|
||||||
self.R = self.__permutate(des.__expansion_table, self.R)
|
self.R = self.__permutate(des.__expansion_table, self.R)
|
||||||
|
|
||||||
# Exclusive or R[i - 1] with K[i], create B[1] to B[8] whilst here
|
# Exclusive or R[i - 1] with K[i], create B[1] to B[8] whilst here
|
||||||
self.R = list(map(lambda x, y: x ^ y, self.R, self.Kn[iteration]))
|
self.R = [b ^ k for b, k in zip(self.R, self.Kn[iteration])]
|
||||||
B = [self.R[:6], self.R[6:12], self.R[12:18], self.R[18:24], self.R[24:30], self.R[30:36], self.R[36:42], self.R[42:]]
|
B = [self.R[:6], self.R[6:12], self.R[12:18], self.R[18:24], self.R[24:30], self.R[30:36], self.R[36:42], self.R[42:]]
|
||||||
# Optimization: Replaced below commented code with above
|
# Optimization: Replaced below commented code with above
|
||||||
#j = 0
|
#j = 0
|
||||||
|
@ -542,7 +542,7 @@ class des(_baseDes):
|
||||||
self.R = self.__permutate(des.__p, Bn)
|
self.R = self.__permutate(des.__p, Bn)
|
||||||
|
|
||||||
# Xor with L[i - 1]
|
# Xor with L[i - 1]
|
||||||
self.R = list(map(lambda x, y: x ^ y, self.R, self.L))
|
self.R = [b ^ l for b, l in zip(self.R, self.L)]
|
||||||
# Optimization: This now replaces the below commented code
|
# Optimization: This now replaces the below commented code
|
||||||
#j = 0
|
#j = 0
|
||||||
#while j < len(self.R):
|
#while j < len(self.R):
|
||||||
|
@ -603,7 +603,7 @@ class des(_baseDes):
|
||||||
# Xor with IV if using CBC mode
|
# Xor with IV if using CBC mode
|
||||||
if self.getMode() == CBC:
|
if self.getMode() == CBC:
|
||||||
if crypt_type == des.ENCRYPT:
|
if crypt_type == des.ENCRYPT:
|
||||||
block = list(map(lambda x, y: x ^ y, block, iv))
|
block = [b ^ v for b, v in zip(block, iv)]
|
||||||
#j = 0
|
#j = 0
|
||||||
#while j < len(block):
|
#while j < len(block):
|
||||||
# block[j] = block[j] ^ iv[j]
|
# block[j] = block[j] ^ iv[j]
|
||||||
|
@ -612,7 +612,7 @@ class des(_baseDes):
|
||||||
processed_block = self.__des_crypt(block, crypt_type)
|
processed_block = self.__des_crypt(block, crypt_type)
|
||||||
|
|
||||||
if crypt_type == des.DECRYPT:
|
if crypt_type == des.DECRYPT:
|
||||||
processed_block = list(map(lambda x, y: x ^ y, processed_block, iv))
|
processed_block = [b ^ v for b, v in zip(processed_block, iv)]
|
||||||
#j = 0
|
#j = 0
|
||||||
#while j < len(processed_block):
|
#while j < len(processed_block):
|
||||||
# processed_block[j] = processed_block[j] ^ iv[j]
|
# processed_block[j] = processed_block[j] ^ iv[j]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user