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

Skip to content

Commit d2bbe80

Browse files
committed
Fixes #2243
1 parent 0398cbd commit d2bbe80

5 files changed

Lines changed: 14 additions & 8 deletions

File tree

lib/core/common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2410,7 +2410,10 @@ def findLocalPort(ports):
24102410

24112411
for port in ports:
24122412
try:
2413-
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
2413+
try:
2414+
s = socket._orig_socket(socket.AF_INET, socket.SOCK_STREAM)
2415+
except AttributeError:
2416+
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
24142417
s.connect((LOCALHOST, port))
24152418
retVal = port
24162419
break

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.0.10.53"
22+
VERSION = "1.0.10.54"
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/request/dns.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ def __init__(self):
6262
self._check_localhost()
6363
self._requests = []
6464
self._lock = threading.Lock()
65-
self._socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
65+
try:
66+
self._socket = socket._orig_socket(socket.AF_INET, socket.SOCK_DGRAM)
67+
except AttributeError:
68+
self._socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
6669
self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
6770
self._socket.bind(("", 53))
6871
self._running = False

thirdparty/socks/socks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
PROXY_TYPES = {"SOCKS4": SOCKS4, "SOCKS5": SOCKS5, "HTTP": HTTP}
7070
PRINTABLE_PROXY_TYPES = dict(zip(PROXY_TYPES.values(), PROXY_TYPES.keys()))
7171

72-
_orgsocket = _orig_socket = socket.socket
72+
socket._orig_socket = _orgsocket = _orig_socket = socket.socket
7373
_orgcreateconnection = socket.create_connection
7474

7575
class ProxyError(IOError):

txt/checksum.md5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ec007a1424da78cfdae90da6ae49ed9b lib/controller/handler.py
2626
cc9c82cfffd8ee9b25ba3af6284f057e lib/controller/__init__.py
2727
04f16204c899438dc7599a9a8426bfee lib/core/agent.py
2828
eb0bd28b0bd9fbf67dcc3119116df377 lib/core/bigarray.py
29-
7e424aadf807efa352733fb95a6ab431 lib/core/common.py
29+
8d32e43491ab8d7082dadd3155e6a9fb lib/core/common.py
3030
5680d0c446a3bed5c0f2a0402d031557 lib/core/convert.py
3131
e77cca1cb063016f71f6e6bdebf4ec73 lib/core/data.py
3232
1d042f0bc0557d3fd564ea5a46deb77e lib/core/datatype.py
@@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
c211b7b7ed1f4d628961e9e9457899da lib/core/settings.py
48+
e55dc07a3c4c414ab324167d03fd54f9 lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
c3ace7874a536d801f308cf1fd03df99 lib/core/target.py
@@ -69,7 +69,7 @@ b40a4c5d91770d347df36d3065b63798 lib/parse/sitemap.py
6969
c48285682a61d49982cb508351013cb4 lib/request/comparison.py
7070
9bff6fe291805380c6a74d0cda6684a5 lib/request/connect.py
7171
d4d52c1073c75a6eecd2ebb98b670b96 lib/request/direct.py
72-
1a46f7bb26b23ec0c0d9d9c95828241b lib/request/dns.py
72+
4ae7f4570fb859045f0487cc0b055a8e lib/request/dns.py
7373
70ceefe39980611494d4f99afb96f652 lib/request/httpshandler.py
7474
cc9c82cfffd8ee9b25ba3af6284f057e lib/request/__init__.py
7575
62aff2a7bdd43f6e4d33385f57ec3e4c lib/request/inject.py
@@ -349,7 +349,7 @@ ff80a22ee858f5331b0c088efa98b3ff thirdparty/prettyprint/prettyprint.py
349349
5c70f8e5f7353aedc6d8d21d4fb72b37 thirdparty/pydes/__init__.py
350350
a7f735641c5b695f3d6220fe7c91b030 thirdparty/pydes/pyDes.py
351351
d41d8cd98f00b204e9800998ecf8427e thirdparty/socks/__init__.py
352-
a2f0ee74ccc895150f310ef8d680edca thirdparty/socks/socks.py
352+
74fcae36f5a2cc440c1717ae8e3f64c4 thirdparty/socks/socks.py
353353
d41d8cd98f00b204e9800998ecf8427e thirdparty/termcolor/__init__.py
354354
ea649aae139d8551af513769dd913dbf thirdparty/termcolor/termcolor.py
355355
bf55909ad163b58236e44b86e8441b26 thirdparty/wininetpton/__init__.py

0 commit comments

Comments
 (0)