Skip to content

Commit 1fa8f0c

Browse files
committed
code reviewing part 2
1 parent 6a0e0cd commit 1fa8f0c

File tree

9 files changed

+13
-6
lines changed

9 files changed

+13
-6
lines changed

lib/core/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def global_matches(self, text):
5757
def autoCompletion(sqlShell=False, osShell=False):
5858
# First of all we check if the readline is available, by default
5959
# it is not in Python default installation on Windows
60-
if not readline.haveReadline:
60+
if not readline._readline:
6161
return
6262

6363
if sqlShell:

lib/parse/banner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class MSSQLBannerHandler(ContentHandler):
2828
"""
2929

3030
def __init__(self, banner, info):
31+
ContentHandler.__init__(self)
32+
3133
self.__banner = sanitizeStr(banner)
3234
self.__inVersion = False
3335
self.__inServicePack = False

lib/parse/handler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class FingerprintHandler(ContentHandler):
1818
"""
1919

2020
def __init__(self, banner, info):
21+
ContentHandler.__init__(self)
22+
2123
self.__banner = sanitizeStr(banner)
2224
self.__regexp = None
2325
self.__match = None

lib/parse/html.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class htmlHandler(ContentHandler):
2525
"""
2626

2727
def __init__(self, page):
28+
ContentHandler.__init__(self)
29+
2830
self.__dbms = None
2931
self.__page = page
3032
self.__regexp = None

lib/request/comparison.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from lib.core.settings import LOWER_RATIO_BOUND
2424
from lib.core.settings import UPPER_RATIO_BOUND
2525

26-
def comparison(page, headers=None, getSeqMatcher=False, pageLength=None):
26+
def comparison(page, getSeqMatcher=False, pageLength=None):
2727
if page is None and pageLength is None:
2828
return None
2929

lib/request/connect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ def queryPage(value=None, place=None, content=False, getSeqMatcher=False, silent
472472
if content or response:
473473
return page, headers
474474
elif getSeqMatcher:
475-
return comparison(page, headers, getSeqMatcher=False, pageLength=pageLength), comparison(page, headers, getSeqMatcher=True, pageLength=pageLength)
475+
return comparison(page, getSeqMatcher=False, pageLength=pageLength), comparison(page, getSeqMatcher=True, pageLength=pageLength)
476476
elif pageLength or page:
477-
return comparison(page, headers, getSeqMatcher, pageLength)
477+
return comparison(page, getSeqMatcher, pageLength)
478478
else:
479479
return False

lib/takeover/web.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def webFileUpload(self, fileToUpload, destFileName, directory):
7878

7979
def __webFileStreamUpload(self, stream, destFileName, directory):
8080
stream.seek(0) # Rewind
81+
stream.name = destFileName
8182

8283
if self.webApi in ("php", "asp", "aspx", "jsp"):
8384
multipartParams = {

lib/techniques/inband/union/use.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
reqCount = 0
3333

34-
def unionUse(expression, direct=False, unescape=True, resetCounter=False, nullChar=None, unpack=True, dump=False):
34+
def unionUse(expression, direct=False, unescape=True, resetCounter=False, unpack=True, dump=False):
3535
"""
3636
This function tests for an inband SQL injection on the target
3737
url then call its subsidiary function to effectively perform an

plugins/dbms/mysql/filesystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def unionWriteFile(self, wFile, dFile, fileType, confirm=True):
9292
logger.debug(debugMsg)
9393

9494
sqlQuery = "%s INTO DUMPFILE '%s'" % (fcEncodedStr, dFile)
95-
unionUse(sqlQuery, direct=True, unescape=False, nullChar="''")
95+
unionUse(sqlQuery, direct=True, unescape=False)
9696

9797
if confirm:
9898
self.askCheckWrittenFile(wFile, dFile, fileType)

0 commit comments

Comments
 (0)