mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Removing some obsolete functions
This commit is contained in:
parent
bcc907ce09
commit
4d5bae7131
|
@ -1307,20 +1307,6 @@ def getCharset(charsetType=None):
|
|||
|
||||
return asciiTbl
|
||||
|
||||
def searchEnvPath(filename):
|
||||
retVal = None
|
||||
path = os.environ.get("PATH", "")
|
||||
paths = path.split(";") if IS_WIN else path.split(":")
|
||||
|
||||
for _ in paths:
|
||||
_ = _.replace(";", "")
|
||||
retVal = os.path.exists(os.path.normpath(os.path.join(_, filename)))
|
||||
|
||||
if retVal:
|
||||
break
|
||||
|
||||
return retVal
|
||||
|
||||
def directoryPath(filepath):
|
||||
"""
|
||||
Returns directory path for a given filepath
|
||||
|
@ -1428,13 +1414,6 @@ def showStaticWords(firstPage, secondPage):
|
|||
|
||||
logger.info(infoMsg)
|
||||
|
||||
def isWindowsPath(filepath):
|
||||
"""
|
||||
Returns True if given filepath is in Windows format
|
||||
"""
|
||||
|
||||
return re.search("\A[\w]\:\\\\", filepath) is not None
|
||||
|
||||
def isWindowsDriveLetterPath(filepath):
|
||||
"""
|
||||
Returns True if given filepath starts with a Windows drive letter
|
||||
|
@ -2467,20 +2446,6 @@ def showHttpErrorCodes():
|
|||
for code, count in kb.httpErrorCodes.items())
|
||||
logger.warn(warnMsg)
|
||||
|
||||
def getComparePageRatio(firstPage, secondPage, filtered=False):
|
||||
"""
|
||||
Returns comparison ratio between two given pages
|
||||
"""
|
||||
|
||||
if filtered:
|
||||
(firstPage, secondPage) = map(getFilteredPageContent, (firstPage, secondPage))
|
||||
|
||||
seqMatcher = getCurrentThreadData().seqMatcher
|
||||
seqMatcher.set_seq1(firstPage)
|
||||
seqMatcher.set_seq2(secondPage)
|
||||
|
||||
return seqMatcher.quick_ratio()
|
||||
|
||||
def openFile(filename, mode='r'):
|
||||
"""
|
||||
Returns file handle of a given filename
|
||||
|
@ -2734,16 +2699,6 @@ def unsafeSQLIdentificatorNaming(name):
|
|||
|
||||
return retVal
|
||||
|
||||
def isBinaryData(value):
|
||||
"""
|
||||
Tests given value for binary content
|
||||
"""
|
||||
|
||||
retVal = False
|
||||
if isinstance(value, basestring):
|
||||
retVal = reduce(lambda x, y: x or not (y in string.printable or ord(y) > 255), value, False)
|
||||
return retVal
|
||||
|
||||
def isNoneValue(value):
|
||||
"""
|
||||
Returns whether the value is unusable (None or '')
|
||||
|
|
|
@ -47,25 +47,6 @@ def hexdecode(value):
|
|||
def hexencode(value):
|
||||
return utf8encode(value).encode("hex")
|
||||
|
||||
def md5hash(value):
|
||||
if "hashlib" in sys.modules:
|
||||
return hashlib.md5(value).hexdigest()
|
||||
else:
|
||||
return md5.new(value).hexdigest()
|
||||
|
||||
def orddecode(value):
|
||||
packedString = struct.pack("!" + "I" * len(value), *value)
|
||||
return "".join(chr(char) for char in struct.unpack("!" + "I" * (len(packedString) / 4), packedString))
|
||||
|
||||
def ordencode(value):
|
||||
return tuple(ord(char) for char in value)
|
||||
|
||||
def sha1hash(value):
|
||||
if "hashlib" in sys.modules:
|
||||
return hashlib.sha1(value).hexdigest()
|
||||
else:
|
||||
return sha.new(value).hexdigest()
|
||||
|
||||
def unicodeencode(value, encoding=None):
|
||||
"""
|
||||
Return 8-bit string representation of the supplied unicode value:
|
||||
|
|
Loading…
Reference in New Issue
Block a user