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

Skip to content

Commit 1745bac

Browse files
committed
Fixes #2625
1 parent 0f9c819 commit 1745bac

6 files changed

Lines changed: 14 additions & 13 deletions

File tree

lib/core/agent.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ def payload(self, place=None, parameter=None, value=None, newValue=None, where=N
130130
if header.upper() == HTTP_HEADER.AUTHORIZATION.upper():
131131
origValue = origValue.split(' ')[-1].split(':')[-1]
132132

133+
origValue = origValue or ""
134+
133135
if value is None:
134136
if where == PAYLOAD.WHERE.ORIGINAL:
135137
value = origValue

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.1.7.23"
22+
VERSION = "1.1.7.24"
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)

lib/core/target.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def process(match, repl):
120120
if kb.processUserMarks is None and kb.customInjectionMark in conf.data:
121121
message = "custom injection marker ('%s') found in option " % kb.customInjectionMark
122122
message += "'--data'. Do you want to process it? [Y/n/q] "
123-
choice = readInput(message, default='Y')
123+
choice = readInput(message, default='Y').upper()
124124

125125
if choice == 'Q':
126126
raise SqlmapUserQuitException
@@ -133,7 +133,7 @@ def process(match, repl):
133133
if re.search(JSON_RECOGNITION_REGEX, conf.data):
134134
message = "JSON data found in %s data. " % conf.method
135135
message += "Do you want to process it? [Y/n/q] "
136-
choice = readInput(message, default='Y')
136+
choice = readInput(message, default='Y').upper()
137137

138138
if choice == 'Q':
139139
raise SqlmapUserQuitException

lib/request/connect.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,8 +847,7 @@ def queryPage(value=None, place=None, content=False, getRatioValue=False, silent
847847
if place == PLACE.COOKIE or place == PLACE.CUSTOM_HEADER and value.split(',')[0] == HTTP_HEADER.COOKIE:
848848
if kb.cookieEncodeChoice is None:
849849
msg = "do you want to URL encode cookie values (implementation specific)? %s" % ("[Y/n]" if not conf.url.endswith(".aspx") else "[y/N]") # Reference: https://support.microsoft.com/en-us/kb/313282
850-
choice = readInput(msg, default='Y' if not conf.url.endswith(".aspx") else 'N')
851-
kb.cookieEncodeChoice = choice.upper().strip() == 'Y'
850+
kb.cookieEncodeChoice = readInput(msg, default='Y' if not conf.url.endswith(".aspx") else 'N', boolean=True)
852851
if not kb.cookieEncodeChoice:
853852
skip = True
854853

lib/takeover/abstraction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ def runCmd(self, cmd):
8080
if not self.alwaysRetrieveCmdOutput:
8181
message = "do you want to retrieve the command standard "
8282
message += "output? [Y/n/a] "
83-
choice = readInput(message, default='Y')
83+
choice = readInput(message, default='Y').upper()
8484

85-
if choice in ('a', 'A'):
85+
if choice == 'A':
8686
self.alwaysRetrieveCmdOutput = True
8787

88-
if not choice or choice in ('y', 'Y') or self.alwaysRetrieveCmdOutput:
88+
if choice == 'Y' or self.alwaysRetrieveCmdOutput:
8989
output = self.evalCmd(cmd)
9090

9191
if output:

txt/checksum.md5

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ c55b400b72acc43e0e59c87dd8bb8d75 extra/shellcodeexec/windows/shellcodeexec.x32.
2525
a66093c734c7f94ecdf94d882c2d8b89 lib/controller/controller.py
2626
a97df93b552ee4e4ba3692eae870de7c lib/controller/handler.py
2727
310efc965c862cfbd7b0da5150a5ad36 lib/controller/__init__.py
28-
49b4e3b75322bf5f95b1568633bc7914 lib/core/agent.py
28+
ca0a4eba91d73c9d7adedabf528ca4f1 lib/core/agent.py
2929
6cc95a117fbd34ef31b9aa25520f0e31 lib/core/bigarray.py
3030
0040490cdda0118a065ddc2e5bb8d108 lib/core/common.py
3131
5065a4242a8cccf72f91e22e1007ae63 lib/core/convert.py
@@ -46,10 +46,10 @@ fbf750dc617c3549ee423d6c2334ba4d lib/core/option.py
4646
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
4747
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
4848
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
49-
947bd803e9e364f0511cace7f4fb97dc lib/core/settings.py
49+
2b842e75ea7c83733e1efae89c2ffbb2 lib/core/settings.py
5050
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
5151
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
52-
080dad10c8350a66fd5321935b53fa70 lib/core/target.py
52+
4496a66116852bce7a7b27e41ed4a8c2 lib/core/target.py
5353
8970b88627902239d695280b1160e16c lib/core/testing.py
5454
40881e63d516d8304fc19971049cded0 lib/core/threads.py
5555
ad74fc58fc7214802fd27067bce18dd2 lib/core/unescaper.py
@@ -68,7 +68,7 @@ ad74fc58fc7214802fd27067bce18dd2 lib/core/unescaper.py
6868
403d873f1d2fd0c7f73d83f104e41850 lib/request/basicauthhandler.py
6969
3ba1c71e68953d34fc526a9d79d5a457 lib/request/basic.py
7070
ef48de622b0a6b4a71df64b0d2785ef8 lib/request/comparison.py
71-
b5094652c5e0a8b2bc29f95a484ceb27 lib/request/connect.py
71+
44528a7580f8ca598312e8c7b1d47c78 lib/request/connect.py
7272
fb6b788d0016ab4ec5e5f661f0f702ad lib/request/direct.py
7373
cc1163d38e9b7ee5db2adac6784c02bb lib/request/dns.py
7474
5dcdb37823a0b5eff65cd1018bcf09e4 lib/request/httpshandler.py
@@ -79,7 +79,7 @@ bb9c165b050f7696b089b96b5947fac3 lib/request/pkihandler.py
7979
602d4338a9fceaaee40c601410d8ac0b lib/request/rangehandler.py
8080
3ba71e1571d105386d4d30746f5d6ab2 lib/request/redirecthandler.py
8181
b373770137dc885889e495de95169b93 lib/request/templates.py
82-
992a02767d12254784f15501a7ab8dd8 lib/takeover/abstraction.py
82+
4f45a856e0273b9a8954a0e6b03d8eb5 lib/takeover/abstraction.py
8383
c6bc7961a186baabe0a9f5b7e0d8974b lib/takeover/icmpsh.py
8484
310efc965c862cfbd7b0da5150a5ad36 lib/takeover/__init__.py
8585
c90c993b020a6ae0f0e497fd84f37466 lib/takeover/metasploit.py

0 commit comments

Comments
 (0)