Removed --error-test, --stacked-test and --time-test switches and adapted the code accordingly. This is due to the fact that the new XML based detection engine already supports all of those tests (and more).

This commit is contained in:
Bernardo Damele
2010-11-29 11:47:58 +00:00
parent e8c6c01e27
commit c22338ce90
12 changed files with 1 additions and 234 deletions

View File

@@ -44,9 +44,7 @@ from lib.request import inject
from lib.request.connect import Connect as Request
from lib.techniques.brute.use import columnExists
from lib.techniques.brute.use import tableExists
from lib.techniques.error.test import errorTest
from lib.techniques.inband.union.test import unionTest
from lib.techniques.outband.stacked import stackedTest
from lib.utils.hash import dictionaryAttack
class Enumeration:
@@ -80,9 +78,7 @@ class Enumeration:
logger.info(infoMsg)
if not kb.data.banner:
if conf.errorTest:
conf.dumper.technic("error-based injection payload", errorTest())
elif conf.unionTest:
if conf.unionTest:
conf.dumper.technic("inband injection payload", unionTest())
query = queries[kb.dbms].banner.query
@@ -1745,9 +1741,6 @@ class Enumeration:
return output
else:
if kb.stackedTest is None:
stackedTest()
if not kb.stackedTest and not conf.direct:
warnMsg = "execution of custom SQL queries is only "
warnMsg += "available when stacked queries are supported"

View File

@@ -21,7 +21,6 @@ from lib.core.data import logger
from lib.core.enums import DBMS
from lib.core.exception import sqlmapUndefinedMethod
from lib.request import inject
from lib.techniques.outband.stacked import stackedTest
class Filesystem:
"""
@@ -253,8 +252,6 @@ class Filesystem:
def readFile(self, rFile):
fileContent = None
stackedTest()
self.checkDbmsOs()
if conf.direct or kb.stackedTest:
@@ -295,8 +292,6 @@ class Filesystem:
return rFilePath
def writeFile(self, wFile, dFile, fileType=None, confirm=True):
stackedTest()
self.checkDbmsOs()
if conf.direct or kb.stackedTest:

View File

@@ -23,8 +23,6 @@ from lib.core.exception import sqlmapNoneDataException
from lib.core.exception import sqlmapUnsupportedFeatureException
from lib.core.session import setRemoteTempPath
from lib.request import inject
from lib.techniques.outband.stacked import stackedTest
class Miscellaneous:
"""
@@ -96,8 +94,6 @@ class Miscellaneous:
Cleanup database from sqlmap create tables and functions
"""
stackedTest()
if not kb.stackedTest and not conf.direct:
return

View File

@@ -25,7 +25,6 @@ from lib.takeover.abstraction import Abstraction
from lib.takeover.icmpsh import ICMPsh
from lib.takeover.metasploit import Metasploit
from lib.takeover.registry import Registry
from lib.techniques.outband.stacked import stackedTest
from plugins.generic.misc import Miscellaneous
@@ -41,8 +40,6 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry, Miscellaneous):
Abstraction.__init__(self)
def osCmd(self):
stackedTest()
if kb.stackedTest or conf.direct:
web = False
elif not kb.stackedTest and kb.dbms == DBMS.MYSQL:
@@ -64,8 +61,6 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry, Miscellaneous):
self.cleanup()
def osShell(self):
stackedTest()
if kb.stackedTest or conf.direct:
web = False
elif not kb.stackedTest and kb.dbms == DBMS.MYSQL:
@@ -89,8 +84,6 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry, Miscellaneous):
def osPwn(self):
goUdf = False
stackedTest()
self.checkDbmsOs()
msg = "how do you want to establish the tunnel?"
@@ -251,8 +244,6 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry, Miscellaneous):
self.cleanup()
def osSmb(self):
stackedTest()
self.checkDbmsOs()
if kb.os != "Windows":
@@ -303,8 +294,6 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry, Miscellaneous):
self.smb()
def osBof(self):
stackedTest()
if not kb.stackedTest and not conf.direct:
return
@@ -331,8 +320,6 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry, Miscellaneous):
raise sqlmapUndefinedMethod, errMsg
def __regInit(self):
stackedTest()
if not kb.stackedTest and not conf.direct:
return