mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-04-25 11:23:44 +03:00
Patch for Python 2.6
This commit is contained in:
parent
f8eed1f365
commit
09be7cb361
|
@ -17,7 +17,7 @@ import zlib
|
||||||
from optparse import OptionError
|
from optparse import OptionError
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
def hideAscii(data):
|
def hideAscii(data):
|
||||||
|
|
|
@ -34,7 +34,7 @@ def convert(inputFile):
|
||||||
fileContent = fp.read()
|
fileContent = fp.read()
|
||||||
|
|
||||||
for fileChar in fileContent:
|
for fileChar in fileContent:
|
||||||
unsignedFileChar = fileChar if sys.version_info.major > 2 else ord(fileChar)
|
unsignedFileChar = fileChar if sys.version_info >= (3, 0) else ord(fileChar)
|
||||||
|
|
||||||
if unsignedFileChar != 0:
|
if unsignedFileChar != 0:
|
||||||
counter2 += 1
|
counter2 += 1
|
||||||
|
|
|
@ -18,7 +18,7 @@ import sys
|
||||||
from optparse import OptionError
|
from optparse import OptionError
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
# Regex used for recognition of hex encoded characters
|
# Regex used for recognition of hex encoded characters
|
||||||
|
|
|
@ -166,7 +166,7 @@ class WichmannHill(random.Random):
|
||||||
def choose_boundary():
|
def choose_boundary():
|
||||||
return uuid.uuid4().hex
|
return uuid.uuid4().hex
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
else:
|
else:
|
||||||
xrange = xrange
|
xrange = xrange
|
||||||
|
|
|
@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||||
from lib.core.enums import OS
|
from lib.core.enums import OS
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.3.75"
|
VERSION = "1.3.3.76"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
2
thirdparty/beautifulsoup/beautifulsoup.py
vendored
2
thirdparty/beautifulsoup/beautifulsoup.py
vendored
|
@ -89,7 +89,7 @@ import types
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
2
thirdparty/chardet/eucjpprober.py
vendored
2
thirdparty/chardet/eucjpprober.py
vendored
|
@ -33,7 +33,7 @@ from .chardistribution import EUCJPDistributionAnalysis
|
||||||
from .jpcntx import EUCJPContextAnalysis
|
from .jpcntx import EUCJPContextAnalysis
|
||||||
from .mbcssm import EUCJPSMModel
|
from .mbcssm import EUCJPSMModel
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
class EUCJPProber(MultiByteCharSetProber):
|
class EUCJPProber(MultiByteCharSetProber):
|
||||||
|
|
2
thirdparty/chardet/mbcharsetprober.py
vendored
2
thirdparty/chardet/mbcharsetprober.py
vendored
|
@ -31,7 +31,7 @@ import sys
|
||||||
from . import constants
|
from . import constants
|
||||||
from .charsetprober import CharSetProber
|
from .charsetprober import CharSetProber
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
class MultiByteCharSetProber(CharSetProber):
|
class MultiByteCharSetProber(CharSetProber):
|
||||||
|
|
2
thirdparty/chardet/sjisprober.py
vendored
2
thirdparty/chardet/sjisprober.py
vendored
|
@ -33,7 +33,7 @@ from .jpcntx import SJISContextAnalysis
|
||||||
from .mbcssm import SJISSMModel
|
from .mbcssm import SJISSMModel
|
||||||
from . import constants
|
from . import constants
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
class SJISProber(MultiByteCharSetProber):
|
class SJISProber(MultiByteCharSetProber):
|
||||||
|
|
2
thirdparty/chardet/utf8prober.py
vendored
2
thirdparty/chardet/utf8prober.py
vendored
|
@ -31,7 +31,7 @@ from .charsetprober import CharSetProber
|
||||||
from .codingstatemachine import CodingStateMachine
|
from .codingstatemachine import CodingStateMachine
|
||||||
from .mbcssm import UTF8SMModel
|
from .mbcssm import UTF8SMModel
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
ONE_CHAR_PROB = 0.5
|
ONE_CHAR_PROB = 0.5
|
||||||
|
|
2
thirdparty/clientform/clientform.py
vendored
2
thirdparty/clientform/clientform.py
vendored
|
@ -109,7 +109,7 @@ except ImportError:
|
||||||
|
|
||||||
import sys, types, copy, re, random
|
import sys, types, copy, re, random
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
# monkeypatch to fix http://www.python.org/sf/803422 :-(
|
# monkeypatch to fix http://www.python.org/sf/803422 :-(
|
||||||
|
|
2
thirdparty/fcrypt/fcrypt.py
vendored
2
thirdparty/fcrypt/fcrypt.py
vendored
|
@ -121,7 +121,7 @@ __all__ = ['crypt']
|
||||||
|
|
||||||
import string, struct, sys
|
import string, struct, sys
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
_ITERATIONS = 16
|
_ITERATIONS = 16
|
||||||
|
|
2
thirdparty/gprof2dot/gprof2dot.py
vendored
2
thirdparty/gprof2dot/gprof2dot.py
vendored
|
@ -32,7 +32,7 @@ import optparse
|
||||||
import sys
|
import sys
|
||||||
import xml.parsers.expat
|
import xml.parsers.expat
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
2
thirdparty/xdot/xdot.py
vendored
2
thirdparty/xdot/xdot.py
vendored
|
@ -39,7 +39,7 @@ import cairo
|
||||||
import pango
|
import pango
|
||||||
import pangocairo
|
import pangocairo
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info >= (3, 0):
|
||||||
xrange = range
|
xrange = range
|
||||||
|
|
||||||
# See http://www.graphviz.org/pub/scm/graphviz-cairo/plugin/cairo/gvrender_cairo.c
|
# See http://www.graphviz.org/pub/scm/graphviz-cairo/plugin/cairo/gvrender_cairo.c
|
||||||
|
|
Loading…
Reference in New Issue
Block a user