mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
sqlmap 0.8-rc3: Merge from Miroslav Stampar's branch fixing a bug when verbosity > 2, another major bug with urlencoding/urldecoding of POST data and Cookies, adding --drop-set-cookie option, implementing support to automatically decode gzip and deflate HTTP responses, support for Google dork page result (--gpage) and a minor code cleanup.
This commit is contained in:
@@ -22,10 +22,8 @@ with sqlmap; if not, write to the Free Software Foundation, Inc., 51
|
||||
Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
"""
|
||||
|
||||
|
||||
|
||||
import re
|
||||
import os
|
||||
import re
|
||||
|
||||
from lib.core.common import readInput
|
||||
from lib.core.data import conf
|
||||
@@ -72,12 +70,11 @@ class Miscellaneous:
|
||||
|
||||
setRemoteTempPath()
|
||||
|
||||
|
||||
def delRemoteFile(self, tempFile, doubleslash=False):
|
||||
self.checkDbmsOs()
|
||||
|
||||
if kb.os == "Windows":
|
||||
if doubleslash is True:
|
||||
if doubleslash:
|
||||
tempFile = tempFile.replace("/", "\\\\")
|
||||
else:
|
||||
tempFile = tempFile.replace("/", "\\")
|
||||
@@ -88,11 +85,9 @@ class Miscellaneous:
|
||||
|
||||
self.execCmd(cmd, forgeCmd=True)
|
||||
|
||||
|
||||
def createSupportTbl(self, tblName, tblField, tblType):
|
||||
inject.goStacked("DROP TABLE %s" % tblName)
|
||||
inject.goStacked("CREATE TABLE %s(%s %s)" % (tblName, tblField, tblType))
|
||||
|
||||
def createSupportTbl(self, tblName, tblField, tblType):
|
||||
inject.goStacked("DROP TABLE %s" % tblName)
|
||||
inject.goStacked("CREATE TABLE %s(%s %s)" % (tblName, tblField, tblType))
|
||||
|
||||
def cleanup(self, onlyFileTbl=False, udfDict=None):
|
||||
"""
|
||||
@@ -101,7 +96,7 @@ class Miscellaneous:
|
||||
|
||||
stackedTest()
|
||||
|
||||
if kb.stackedTest == False:
|
||||
if not kb.stackedTest:
|
||||
return
|
||||
|
||||
if kb.os == "Windows":
|
||||
@@ -113,16 +108,16 @@ class Miscellaneous:
|
||||
else:
|
||||
libtype = "shared library"
|
||||
|
||||
if onlyFileTbl == True:
|
||||
if onlyFileTbl:
|
||||
logger.debug("cleaning up the database management system")
|
||||
else:
|
||||
logger.info("cleaning up the database management system")
|
||||
|
||||
logger.debug("removing support tables")
|
||||
inject.goStacked("DROP TABLE %s" % self.fileTblName)
|
||||
logger.debug("removing support tables")
|
||||
inject.goStacked("DROP TABLE %s" % self.fileTblName)
|
||||
|
||||
if onlyFileTbl == False:
|
||||
inject.goStacked("DROP TABLE %s" % self.cmdTblName)
|
||||
if not onlyFileTbl:
|
||||
inject.goStacked("DROP TABLE %s" % self.cmdTblName)
|
||||
|
||||
if kb.dbms == "Microsoft SQL Server":
|
||||
return
|
||||
@@ -131,7 +126,7 @@ class Miscellaneous:
|
||||
udfDict = self.sysUdfs
|
||||
|
||||
for udf, inpRet in udfDict.items():
|
||||
message = "do you want to remove UDF '%s'? [Y/n] " % udf
|
||||
message = "do you want to remove UDF '%s'? [Y/n] " % udf
|
||||
output = readInput(message, default="Y")
|
||||
|
||||
if not output or output in ("y", "Y"):
|
||||
@@ -141,8 +136,8 @@ class Miscellaneous:
|
||||
inp = ", ".join(i for i in inpRet["input"])
|
||||
dropStr += "(%s)" % inp
|
||||
|
||||
logger.debug("removing UDF '%s'" % udf)
|
||||
inject.goStacked(dropStr)
|
||||
logger.debug("removing UDF '%s'" % udf)
|
||||
inject.goStacked(dropStr)
|
||||
|
||||
logger.info("database management system cleanup finished")
|
||||
|
||||
@@ -153,5 +148,5 @@ class Miscellaneous:
|
||||
warnMsg += "folder "
|
||||
|
||||
warnMsg += "saved on the file system can only be deleted "
|
||||
warnMsg += "manually"
|
||||
warnMsg += "manually"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
Reference in New Issue
Block a user