88import os
99
1010from lib .core .common import Backend
11+ from lib .core .common import isStackingAvailable
1112from lib .core .common import isTechniqueAvailable
1213from lib .core .common import readInput
1314from lib .core .common import runningAsAdmin
@@ -41,9 +42,9 @@ def __init__(self):
4142 Abstraction .__init__ (self )
4243
4344 def osCmd (self ):
44- if isTechniqueAvailable ( PAYLOAD . TECHNIQUE . STACKED ) or conf .direct :
45+ if isStackingAvailable ( ) or conf .direct :
4546 web = False
46- elif not isTechniqueAvailable ( PAYLOAD . TECHNIQUE . STACKED ) and Backend .isDbms (DBMS .MYSQL ):
47+ elif not isStackingAvailable ( ) and Backend .isDbms (DBMS .MYSQL ):
4748 infoMsg = "going to use a web backdoor for command execution"
4849 logger .info (infoMsg )
4950
@@ -63,9 +64,9 @@ def osCmd(self):
6364 self .cleanup (web = web )
6465
6566 def osShell (self ):
66- if isTechniqueAvailable ( PAYLOAD . TECHNIQUE . STACKED ) or conf .direct :
67+ if isStackingAvailable ( ) or conf .direct :
6768 web = False
68- elif not isTechniqueAvailable ( PAYLOAD . TECHNIQUE . STACKED ) and Backend .isDbms (DBMS .MYSQL ):
69+ elif not isStackingAvailable ( ) and Backend .isDbms (DBMS .MYSQL ):
6970 infoMsg = "going to use a web backdoor for command prompt"
7071 logger .info (infoMsg )
7172
@@ -153,7 +154,7 @@ def osPwn(self):
153154 if Backend .getIdentifiedDbms () in (DBMS .MYSQL , DBMS .PGSQL ):
154155 self .sysUdfs .pop ("sys_bineval" )
155156
156- if isTechniqueAvailable ( PAYLOAD . TECHNIQUE . STACKED ) or conf .direct :
157+ if isStackingAvailable ( ) or conf .direct :
157158 web = False
158159
159160 self .getRemoteTempPath ()
@@ -202,7 +203,7 @@ def osPwn(self):
202203 self .uploadIcmpshSlave (web = web )
203204 self .icmpPwn ()
204205
205- elif not isTechniqueAvailable ( PAYLOAD . TECHNIQUE . STACKED ) and Backend .isDbms (DBMS .MYSQL ):
206+ elif not isStackingAvailable ( ) and Backend .isDbms (DBMS .MYSQL ):
206207 web = True
207208
208209 infoMsg = "going to use a web backdoor to establish the tunnel"
@@ -250,7 +251,7 @@ def osSmb(self):
250251 errMsg += "relay attack"
251252 raise SqlmapUnsupportedDBMSException (errMsg )
252253
253- if not isTechniqueAvailable ( PAYLOAD . TECHNIQUE . STACKED ) and not conf .direct :
254+ if not isStackingAvailable ( ) and not conf .direct :
254255 if Backend .getIdentifiedDbms () in (DBMS .PGSQL , DBMS .MSSQL ):
255256 errMsg = "on this back-end DBMS it is only possible to "
256257 errMsg += "perform the SMB relay attack if stacked "
@@ -292,7 +293,7 @@ def osSmb(self):
292293 self .smb ()
293294
294295 def osBof (self ):
295- if not isTechniqueAvailable ( PAYLOAD . TECHNIQUE . STACKED ) and not conf .direct :
296+ if not isStackingAvailable ( ) and not conf .direct :
296297 return
297298
298299 if not Backend .isDbms (DBMS .MSSQL ) or not Backend .isVersionWithin (("2000" , "2005" )):
@@ -328,7 +329,7 @@ def uncPathRequest(self):
328329 raise SqlmapUndefinedMethod (errMsg )
329330
330331 def _regInit (self ):
331- if not isTechniqueAvailable ( PAYLOAD . TECHNIQUE . STACKED ) and not conf .direct :
332+ if not isStackingAvailable ( ) and not conf .direct :
332333 return
333334
334335 self .checkDbmsOs ()
0 commit comments