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

Skip to content

Commit 5bdb50c

Browse files
committed
code review part 3
1 parent 1fa8f0c commit 5bdb50c

7 files changed

Lines changed: 6 additions & 10 deletions

File tree

lib/controller/checks.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ def checkSqlInjection(place, parameter, value):
301301
boundPayload = agent.suffixQuery(boundPayload, comment, suffix)
302302
boundPayload = agent.cleanupPayload(boundPayload, value)
303303
reqPayload = agent.payload(place, parameter, newValue=boundPayload, where=where)
304-
unionVector = None
305304

306305
# Perform the test's request and check whether or not the
307306
# payload was successful
@@ -474,7 +473,7 @@ def checkSqlInjection(place, parameter, value):
474473
else:
475474
return None
476475

477-
def heuristicCheckSqlInjection(place, parameter, value):
476+
def heuristicCheckSqlInjection(place, parameter):
478477
if kb.nullConnection:
479478
debugMsg = "heuristic checking skipped "
480479
debugMsg += "because NULL connection used"
@@ -518,7 +517,6 @@ def simpletonCheckSqlInjection(place, parameter, value):
518517

519518
result = False
520519
randInt = randomInt()
521-
randStr = randomStr()
522520

523521
if value.isdigit():
524522
payload = "%s AND %d=%d" % (value, randInt, randInt)

lib/controller/controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def start():
282282
if __paramDict:
283283
conf.paramDict[PLACE.COOKIE] = __paramDict
284284
# TODO: consider the following line in __setRequestParams()
285-
__testableParameters = True
285+
# __testableParameters = True
286286

287287
if (len(kb.injections) == 0 or (len(kb.injections) == 1 and kb.injections[0].place is None)) \
288288
and (kb.injection.place is None or kb.injection.parameter is None):
@@ -344,7 +344,7 @@ def start():
344344
kb.testedParams.add(paramKey)
345345

346346
if testSqlInj:
347-
check = heuristicCheckSqlInjection(place, parameter, value)
347+
check = heuristicCheckSqlInjection(place, parameter)
348348
if not check and conf.realTest and\
349349
not simpletonCheckSqlInjection(place, parameter, value):
350350
continue

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ def beep():
16211621
try:
16221622
audio = file(dev, 'wb')
16231623

1624-
for i in xrange(250):
1624+
for _ in xrange(250):
16251625
audio.write(chr(32) * 4)
16261626
audio.write(chr(0) * 4)
16271627

lib/core/xmldump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def dbTableValues(self, tableValues):
415415

416416
logger.info("Table '%s.%s' dumped to XML file" % (db, table))
417417

418-
def dbColumns(self, dbColumns, _, dbs):
418+
def dbColumns(self, dbColumns, colConsider, dbs):
419419
'''
420420
Adds information about the columns
421421
'''

lib/techniques/inband/union/test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ def unionTest(comment, place, parameter, value, prefix, suffix, dbms):
128128
if conf.direct:
129129
return
130130

131-
oldTechnique = kb.technique
132131
kb.technique = PAYLOAD.TECHNIQUE.UNION
133132
validPayload, vector = __unionTestByCharBruteforce(comment, place, parameter, value, prefix, suffix, dbms)
134133

lib/utils/checkpayload.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"""
99

1010
import re
11-
import sre_constants
1211

1312
from lib.core.common import getCompiledRegex
1413
from lib.core.common import readXmlFile

lib/utils/getch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __call__(self): return self.impl()
2626

2727
class _GetchUnix:
2828
def __init__(self):
29-
import tty, sys
29+
import tty
3030

3131
def __call__(self):
3232
import sys, tty, termios

0 commit comments

Comments
 (0)