Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5622a26

Browse filesBrowse files
committed
Minor optimization
1 parent 8fcd78f commit 5622a26
Copy full SHA for 5622a26

File tree

Expand file treeCollapse file tree

4 files changed

+10
-10
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+10
-10
lines changed

‎data/txt/sha256sums.txt

Copy file name to clipboardExpand all lines: data/txt/sha256sums.txt
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ c4bfb493a03caf84dd362aec7c248097841de804b7413d0e1ecb8a90c8550bc0 lib/core/readl
186186
d1bd70c1a55858495c727fbec91e30af267459c8f64d50fabf9e4ee2c007e920 lib/core/replication.py
187187
1d0f80b0193ac5204527bfab4bde1a7aee0f693fd008e86b4b29f606d1ef94f3 lib/core/revision.py
188188
d2eb8e4b05ac93551272b3d4abfaf5b9f2d3ac92499a7704c16ed0b4f200db38 lib/core/session.py
189-
184c8befe5e613d1d18bbce4b2b7337536f9505f53b2f030d89e9e61f365741d lib/core/settings.py
189+
56d26fde979eed26969c77432953e91dfd041b47bfdeb48283c820951751186f lib/core/settings.py
190190
1c5eab9494eb969bc9ce118a2ea6954690c6851cbe54c18373c723b99734bf09 lib/core/shell.py
191191
4eea6dcf023e41e3c64b210cb5c2efc7ca893b727f5e49d9c924f076bb224053 lib/core/subprocessng.py
192192
cdd352e1331c6b535e780f6edea79465cb55af53aa2114dcea0e8bf382e56d1a lib/core/target.py
@@ -612,13 +612,13 @@ f517561115b0cfaa509d0d4216cd91c7de92c6a5a30f1688fdca22e4cd52b8f8 thirdparty/kee
612612
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 thirdparty/magic/__init__.py
613613
4d89a52f809c28ce1dc17bb0c00c775475b8ce01c2165942877596a6180a2fd8 thirdparty/magic/magic.py
614614
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 thirdparty/multipart/__init__.py
615-
fa2c4cfc6f1fb29a3cf4ad119243a10aef2dfe9cf93129436aa649baef8e4764 thirdparty/multipart/multipartpost.py
615+
2574a2027b4a63214bad8bd71f28cac66b5748159bf16d63eb2a3e933985b0a5 thirdparty/multipart/multipartpost.py
616616
ef70b88cc969a3e259868f163ad822832f846196e3f7d7eccb84958c80b7f696 thirdparty/odict/__init__.py
617617
9a8186aeb9553407f475f59d1fab0346ceab692cf4a378c15acd411f271c8fdb thirdparty/odict/ordereddict.py
618618
691ae693e3a33dd730930492ff9e7e3bdec45e90e3a607b869a37ecd0354c2d8 thirdparty/prettyprint/__init__.py
619619
8df6e8c60eac4c83b1bf8c4e0e0276a4caa3c5f0ca57bc6a2116f31f19d3c33f thirdparty/prettyprint/prettyprint.py
620620
3739db672154ad4dfa05c9ac298b0440f3f1500c6a3697c2b8ac759479426b84 thirdparty/pydes/__init__.py
621-
d1d54fc08f80148a4e2ac5eee84c8475617e8c18bfbde0dfe6894c0f868e4659 thirdparty/pydes/pyDes.py
621+
4c9d2c630064018575611179471191914299992d018efdc861a7109f3ec7de5e thirdparty/pydes/pyDes.py
622622
c51c91f703d3d4b3696c923cb5fec213e05e75d9215393befac7f2fa6a3904df thirdparty/six/__init__.py
623623
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 thirdparty/socks/__init__.py
624624
7027e214e014eb78b7adcc1ceda5aca713a79fc4f6a0c52c9da5b3e707e6ffe9 thirdparty/socks/LICENSE

‎lib/core/settings.py

Copy file name to clipboardExpand all lines: lib/core/settings.py
+1-1Lines 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.5.17"
22+
VERSION = "1.9.5.18"
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)

‎thirdparty/multipart/multipartpost.py

Copy file name to clipboardExpand all lines: thirdparty/multipart/multipartpost.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
# Controls how sequences are uncoded. If true, elements may be given
3636
# multiple values by assigning a sequence.
37-
doseq = 1
37+
doseq = True
3838

3939

4040
class MultipartPostHandler(_urllib.request.BaseHandler):

‎thirdparty/pydes/pyDes.py

Copy file name to clipboardExpand all lines: thirdparty/pydes/pyDes.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ def __BitList_to_String(self, data):
453453

454454
def __permutate(self, table, block):
455455
"""Permutate this block with the specified table"""
456-
return list(map(lambda x: block[x], table))
456+
return [block[i] for i in table]
457457

458458
# Transform the secret key, so that it is ready for data processing
459459
# Create the 16 subkeys, K[1] - K[16]
@@ -506,7 +506,7 @@ def __des_crypt(self, block, crypt_type):
506506
self.R = self.__permutate(des.__expansion_table, self.R)
507507

508508
# Exclusive or R[i - 1] with K[i], create B[1] to B[8] whilst here
509-
self.R = list(map(lambda x, y: x ^ y, self.R, self.Kn[iteration]))
509+
self.R = [b ^ k for b, k in zip(self.R, self.Kn[iteration])]
510510
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:]]
511511
# Optimization: Replaced below commented code with above
512512
#j = 0
@@ -542,7 +542,7 @@ def __des_crypt(self, block, crypt_type):
542542
self.R = self.__permutate(des.__p, Bn)
543543

544544
# Xor with L[i - 1]
545-
self.R = list(map(lambda x, y: x ^ y, self.R, self.L))
545+
self.R = [b ^ l for b, l in zip(self.R, self.L)]
546546
# Optimization: This now replaces the below commented code
547547
#j = 0
548548
#while j < len(self.R):
@@ -603,7 +603,7 @@ def crypt(self, data, crypt_type):
603603
# Xor with IV if using CBC mode
604604
if self.getMode() == CBC:
605605
if crypt_type == des.ENCRYPT:
606-
block = list(map(lambda x, y: x ^ y, block, iv))
606+
block = [b ^ v for b, v in zip(block, iv)]
607607
#j = 0
608608
#while j < len(block):
609609
# block[j] = block[j] ^ iv[j]
@@ -612,7 +612,7 @@ def crypt(self, data, crypt_type):
612612
processed_block = self.__des_crypt(block, crypt_type)
613613

614614
if crypt_type == des.DECRYPT:
615-
processed_block = list(map(lambda x, y: x ^ y, processed_block, iv))
615+
processed_block = [b ^ v for b, v in zip(processed_block, iv)]
616616
#j = 0
617617
#while j < len(processed_block):
618618
# processed_block[j] = processed_block[j] ^ iv[j]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.