mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
One more 2to3 baby step
This commit is contained in:
parent
7074365f8e
commit
2c270ed250
|
@ -148,7 +148,7 @@ class BigArray(list):
|
|||
if y < 0:
|
||||
y += len(self)
|
||||
|
||||
index = y / self.chunk_length
|
||||
index = y // self.chunk_length
|
||||
offset = y % self.chunk_length
|
||||
chunk = self.chunks[index]
|
||||
|
||||
|
@ -159,7 +159,7 @@ class BigArray(list):
|
|||
return self.cache.data[offset]
|
||||
|
||||
def __setitem__(self, y, value):
|
||||
index = y / self.chunk_length
|
||||
index = y // self.chunk_length
|
||||
offset = y % self.chunk_length
|
||||
chunk = self.chunks[index]
|
||||
|
||||
|
|
|
@ -2129,7 +2129,7 @@ def average(values):
|
|||
0.9
|
||||
"""
|
||||
|
||||
return (sum(values) / len(values)) if values else None
|
||||
return (1.0 * sum(values) / len(values)) if values else None
|
||||
|
||||
@cachedmethod
|
||||
def stdev(values):
|
||||
|
@ -3555,7 +3555,7 @@ def removeReflectiveValues(content, payload, suppressWarning=False):
|
|||
retVal = content.replace(payload, REFLECTED_VALUE_MARKER) # dummy approach
|
||||
|
||||
if len(parts) > REFLECTED_MAX_REGEX_PARTS: # preventing CPU hogs
|
||||
regex = _("%s%s%s" % (REFLECTED_REPLACEMENT_REGEX.join(parts[:REFLECTED_MAX_REGEX_PARTS / 2]), REFLECTED_REPLACEMENT_REGEX, REFLECTED_REPLACEMENT_REGEX.join(parts[-REFLECTED_MAX_REGEX_PARTS / 2:])))
|
||||
regex = _("%s%s%s" % (REFLECTED_REPLACEMENT_REGEX.join(parts[:REFLECTED_MAX_REGEX_PARTS // 2]), REFLECTED_REPLACEMENT_REGEX, REFLECTED_REPLACEMENT_REGEX.join(parts[-REFLECTED_MAX_REGEX_PARTS // 2:])))
|
||||
|
||||
parts = filter(None, regex.split(REFLECTED_REPLACEMENT_REGEX))
|
||||
|
||||
|
|
|
@ -19,7 +19,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.1.63"
|
||||
VERSION = "1.3.1.64"
|
||||
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)
|
||||
|
|
|
@ -621,7 +621,7 @@ class Metasploit:
|
|||
payloadSize = int(match.group(2))
|
||||
|
||||
if extra == "BufferRegister=EAX":
|
||||
payloadSize = payloadSize / 2
|
||||
payloadSize = payloadSize // 2
|
||||
|
||||
debugMsg = "the shellcode size is %d bytes" % payloadSize
|
||||
logger.debug(debugMsg)
|
||||
|
|
|
@ -57,7 +57,7 @@ def dnsUse(payload, expression):
|
|||
while True:
|
||||
count += 1
|
||||
prefix, suffix = ("%s" % randomStr(length=3, alphabet=DNS_BOUNDARIES_ALPHABET) for _ in xrange(2))
|
||||
chunk_length = MAX_DNS_LABEL / 2 if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.MYSQL, DBMS.PGSQL) else MAX_DNS_LABEL / 4 - 2
|
||||
chunk_length = MAX_DNS_LABEL // 2 if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.MYSQL, DBMS.PGSQL) else MAX_DNS_LABEL // 4 - 2
|
||||
_, _, _, _, _, _, fieldToCastStr, _ = agent.getFields(expression)
|
||||
nulledCastedField = agent.nullAndCastField(fieldToCastStr)
|
||||
extendedField = re.search(r"[^ ,]*%s[^ ,]*" % re.escape(fieldToCastStr), expression).group(0)
|
||||
|
|
|
@ -94,7 +94,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
|
|||
candidate = len(result) - len(kb.chars.stop)
|
||||
current = candidate if candidate != current else current - 1
|
||||
else:
|
||||
current = current / 2
|
||||
current = current // 2
|
||||
|
||||
if kb.errorChunkLength:
|
||||
hashDBWrite(HASHDB_KEYS.KB_ERROR_CHUNK_LENGTH, kb.errorChunkLength)
|
||||
|
|
|
@ -74,7 +74,7 @@ def _findUnionCharCount(comment, place, parameter, value, prefix, suffix, where=
|
|||
highCols += ORDER_BY_STEP
|
||||
else:
|
||||
while not found:
|
||||
mid = highCols - (highCols - lowCols) / 2
|
||||
mid = highCols - (highCols - lowCols) // 2
|
||||
if _orderByTest(mid):
|
||||
lowCols = mid
|
||||
else:
|
||||
|
|
|
@ -29,7 +29,7 @@ class ProgressBar(object):
|
|||
|
||||
def _convertSeconds(self, value):
|
||||
seconds = value
|
||||
minutes = seconds / 60
|
||||
minutes = seconds // 60
|
||||
seconds = seconds - (minutes * 60)
|
||||
|
||||
return "%.2d:%.2d" % (minutes, seconds)
|
||||
|
|
|
@ -58,7 +58,7 @@ class xrange(object):
|
|||
return self._len()
|
||||
|
||||
def _len(self):
|
||||
return max(0, int((self.stop - self.start) / self.step))
|
||||
return max(0, int((self.stop - self.start) // self.step))
|
||||
|
||||
def __contains__(self, value):
|
||||
return (self.start <= value < self.stop) and (value - self.start) % self.step == 0
|
||||
|
|
|
@ -28,8 +28,8 @@ c4d559a98cfc62b401ef7e0bfab782f0 lib/controller/controller.py
|
|||
c1da277517c7ec4c23e953a51b51e203 lib/controller/handler.py
|
||||
fb6be55d21a70765e35549af2484f762 lib/controller/__init__.py
|
||||
ed7874be0d2d3802f3d20184f2b280d5 lib/core/agent.py
|
||||
44ac129c1b3b6130b4f1bc7b93036278 lib/core/bigarray.py
|
||||
981783b71439d82e84b47fb9b9a88164 lib/core/common.py
|
||||
a932126e7d80e545c5d44af178d0bc0c lib/core/bigarray.py
|
||||
39860dfb1d1afa51b7ed9d4ddfdb82cd lib/core/common.py
|
||||
de8d27ae6241163ff9e97aa9e7c51a18 lib/core/convert.py
|
||||
abcb1121eb56d3401839d14e8ed06b6e lib/core/data.py
|
||||
db60c6ebb63b72ed119e304b359fc1a6 lib/core/datatype.py
|
||||
|
@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
|
|||
7d8a22c582ad201f65b73225e4456170 lib/core/replication.py
|
||||
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
|
||||
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
|
||||
9adcbe4eb038933aa8f9ef13f288dde6 lib/core/settings.py
|
||||
10790114fe549cd3e2eaf035e2594c95 lib/core/settings.py
|
||||
4483b4a5b601d8f1c4281071dff21ecc lib/core/shell.py
|
||||
10fd19b0716ed261e6d04f311f6f527c lib/core/subprocessng.py
|
||||
9c7b5c6397fb3da33e7a4d7876d159c6 lib/core/target.py
|
||||
|
@ -85,7 +85,7 @@ ac482ec52227daf48f523827dd67078f lib/request/pkihandler.py
|
|||
eafa28e4beb2b7492dfc8036033ac824 lib/takeover/abstraction.py
|
||||
ac9efea51eba120b667b4b73536d7f1c lib/takeover/icmpsh.py
|
||||
fb6be55d21a70765e35549af2484f762 lib/takeover/__init__.py
|
||||
838002e763b071ed6dc334cabf4fffd9 lib/takeover/metasploit.py
|
||||
d55029a4c048e345fbb07a8f91604d83 lib/takeover/metasploit.py
|
||||
6b5b841d445b7b973c2e033edfb01b16 lib/takeover/registry.py
|
||||
ad038ac567f97a4b940b7987792d64a4 lib/takeover/udf.py
|
||||
915a3fbd557fb136bd0e16c46d993be3 lib/takeover/web.py
|
||||
|
@ -94,12 +94,12 @@ ad038ac567f97a4b940b7987792d64a4 lib/takeover/udf.py
|
|||
fb6be55d21a70765e35549af2484f762 lib/techniques/blind/__init__.py
|
||||
fb6be55d21a70765e35549af2484f762 lib/techniques/dns/__init__.py
|
||||
ea48db4c48276d7d0e71aa467c0c523f lib/techniques/dns/test.py
|
||||
437786cd2f9c3237614e3cac0220b2a6 lib/techniques/dns/use.py
|
||||
13a80dfa26c53246d4a353c11c082d5d lib/techniques/dns/use.py
|
||||
fb6be55d21a70765e35549af2484f762 lib/techniques/error/__init__.py
|
||||
2c945522ce05c2a1204d1563ae64eff2 lib/techniques/error/use.py
|
||||
62d64b853bbc9353843376fff3a7f48d lib/techniques/error/use.py
|
||||
fb6be55d21a70765e35549af2484f762 lib/techniques/__init__.py
|
||||
fb6be55d21a70765e35549af2484f762 lib/techniques/union/__init__.py
|
||||
baa3946c23749d898f473dba0f4eecff lib/techniques/union/test.py
|
||||
9d9a6148f10693aaab5fac1273d981d4 lib/techniques/union/test.py
|
||||
d32988e13713417286ab83a00856858e lib/techniques/union/use.py
|
||||
78cd3133349e9cfdcc6b3512c7d5ce36 lib/utils/api.py
|
||||
544dee96e782560fe4355cbf6ee19b8c lib/utils/brute.py
|
||||
|
@ -112,13 +112,13 @@ d11f7f208ccf3a7753ccc417b4b01901 lib/utils/hashdb.py
|
|||
17009289bb5c0dc0cceaa483113101e1 lib/utils/htmlentities.py
|
||||
fb6be55d21a70765e35549af2484f762 lib/utils/__init__.py
|
||||
833b05c72c9fa60b0a25b0a26f8f31fb lib/utils/pivotdumptable.py
|
||||
5a8902fd6fa94ea73cf44952f9ed5a57 lib/utils/progress.py
|
||||
25bbebf0178b106e83ca5e95b51b43f6 lib/utils/progress.py
|
||||
b79654e49850937ab2dc8e0d73625cab lib/utils/purge.py
|
||||
503637fbdabaad5bc7f87dfcfbea4dd3 lib/utils/search.py
|
||||
272a538a3d36186113191f4c543bb34b lib/utils/sqlalchemy.py
|
||||
68f90f633d812ca428d2f15f016b2d96 lib/utils/timeout.py
|
||||
164f830baad3e13b226ee57d44d69dfa lib/utils/versioncheck.py
|
||||
1e5d24f1c629476bdf43363d2c8d8397 lib/utils/xrange.py
|
||||
a5007113e3cda726e1d131b99b927284 lib/utils/xrange.py
|
||||
b8656f4785d0945e68257107a171f945 plugins/dbms/access/connector.py
|
||||
b0e4f4aed8504f97d4044620d3a7d27d plugins/dbms/access/enumeration.py
|
||||
58d664d680087596965f95b482157320 plugins/dbms/access/filesystem.py
|
||||
|
|
Loading…
Reference in New Issue
Block a user