mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +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 OptionParser
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
def hideAscii(data):
|
||||
|
|
|
@ -34,7 +34,7 @@ def convert(inputFile):
|
|||
fileContent = fp.read()
|
||||
|
||||
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:
|
||||
counter2 += 1
|
||||
|
|
|
@ -18,7 +18,7 @@ import sys
|
|||
from optparse import OptionError
|
||||
from optparse import OptionParser
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
# Regex used for recognition of hex encoded characters
|
||||
|
|
|
@ -166,7 +166,7 @@ class WichmannHill(random.Random):
|
|||
def choose_boundary():
|
||||
return uuid.uuid4().hex
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
else:
|
||||
xrange = xrange
|
||||
|
|
|
@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
|||
from lib.core.enums import OS
|
||||
|
||||
# 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_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)
|
||||
|
|
2
thirdparty/beautifulsoup/beautifulsoup.py
vendored
2
thirdparty/beautifulsoup/beautifulsoup.py
vendored
|
@ -89,7 +89,7 @@ import types
|
|||
import re
|
||||
import sys
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
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 .mbcssm import EUCJPSMModel
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
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 .charsetprober import CharSetProber
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
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 . import constants
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
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 .mbcssm import UTF8SMModel
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
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
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
# 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
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
_ITERATIONS = 16
|
||||
|
|
2
thirdparty/gprof2dot/gprof2dot.py
vendored
2
thirdparty/gprof2dot/gprof2dot.py
vendored
|
@ -32,7 +32,7 @@ import optparse
|
|||
import sys
|
||||
import xml.parsers.expat
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
try:
|
||||
|
|
2
thirdparty/xdot/xdot.py
vendored
2
thirdparty/xdot/xdot.py
vendored
|
@ -39,7 +39,7 @@ import cairo
|
|||
import pango
|
||||
import pangocairo
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
if sys.version_info >= (3, 0):
|
||||
xrange = range
|
||||
|
||||
# See http://www.graphviz.org/pub/scm/graphviz-cairo/plugin/cairo/gvrender_cairo.c
|
||||
|
|
Loading…
Reference in New Issue
Block a user