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

Skip to content

Commit c27820d

Browse files
committed
Some more updates
1 parent fbd4222 commit c27820d

9 files changed

Lines changed: 626 additions & 79 deletions

File tree

lib/core/compat.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import binascii
99
import os
1010
import random
11+
import uuid
1112

1213
class WichmannHill(random.Random):
1314
"""
@@ -159,3 +160,7 @@ def whseed(self, a=None):
159160
y = (y + a) % 256 or 1
160161
z = (z + a) % 256 or 1
161162
self.__whseed(x, y, z)
163+
164+
# Reference: https://github.com/urllib3/urllib3/blob/master/src/urllib3/filepost.py
165+
def choose_boundary():
166+
return uuid.uuid4().hex

lib/core/patch.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ def dirtyPatches():
2424

2525
# Reference: https://github.com/nodejs/node/issues/12786#issuecomment-298652440
2626
codecs.register(lambda name: codecs.lookup("utf-8") if name == "cp65001" else None)
27+
28+
# Reference: http://bugs.python.org/issue17849
29+
if hasattr(_http_client, "LineAndFileWrapper"):
30+
def _(self, *args):
31+
return self._readline()
32+
33+
_http_client.LineAndFileWrapper._readline = _http_client.LineAndFileWrapper.readline
34+
_http_client.LineAndFileWrapper.readline = _

lib/core/settings.py

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

1919
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
20-
VERSION = "1.3.3.61"
20+
VERSION = "1.3.3.62"
2121
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2222
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2323
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/request/httpshandler.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,3 @@ def create_sock():
9797
class HTTPSHandler(_urllib.request.HTTPSHandler):
9898
def https_open(self, req):
9999
return self.do_open(HTTPSConnection if ssl else _http_client.HTTPSConnection, req)
100-
101-
# Bug fix (http://bugs.python.org/issue17849)
102-
103-
def _(self, *args):
104-
return self._readline()
105-
106-
_http_client.LineAndFileWrapper._readline = _http_client.LineAndFileWrapper.readline
107-
_http_client.LineAndFileWrapper.readline = _

lib/utils/har.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"""
77

88
import base64
9-
import BaseHTTPServer
109
import datetime
1110
import io
1211
import re
1312
import time
1413

1514
from lib.core.bigarray import BigArray
1615
from lib.core.settings import VERSION
16+
from thirdparty.six.moves import BaseHTTPServer as _BaseHTTPServer
1717

1818
# Reference: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HAR/Overview.html
1919
# http://www.softwareishard.com/har/viewer/
@@ -207,7 +207,7 @@ def __init__(self, response_text):
207207
def makefile(self, *args, **kwargs):
208208
return self._file
209209

210-
class HTTPRequest(BaseHTTPServer.BaseHTTPRequestHandler):
210+
class HTTPRequest(_BaseHTTPServer.BaseHTTPRequestHandler):
211211
# Original source:
212212
# https://stackoverflow.com/questions/4685217/parse-raw-http-headers
213213

0 commit comments

Comments
 (0)