Fix python3 binary - character mismatch in search.py

Before:
python3 sqlmap.py -g <long random string>
(...)
[18:35:17] [INFO] using search result page #1
no usable links found. What do you want to do?
[1] (re)try with DuckDuckGo (default)
[2] (re)try with Bing
[3] quit
> 1
[18:35:21] [CRITICAL] unable to connect

After:
python3 sqlmap.py -g asfafw2fwesvzsdvaw
(...)
[18:37:30] [INFO] using search result page #1
no usable links found. What do you want to do?
[1] (re)try with DuckDuckGo (default)
[2] (re)try with Bing
[3] quit
> 1
[18:37:34] [INFO] found 26 results for your search dork expression, 16 of them are testable targets
[18:37:34] [INFO] found a total of 16 targets
URL 1:
GET https:...
do you want to test this URL? [Y/n/q]
This commit is contained in:
Tomas Zellerin 2020-01-15 18:38:10 +01:00
parent 0b715f7b0e
commit 23cc201cd8

View File

@ -132,7 +132,7 @@ def _search(dork):
regex = DUCKDUCKGO_REGEX
try:
req = _urllib.request.Request(url, data=data, headers=requestHeaders)
req = _urllib.request.Request(url, data=data.encode("utf-8"), headers=requestHeaders)
conn = _urllib.request.urlopen(req)
requestMsg = "HTTP request:\nGET %s" % url