1616from lib .core .common import readInput
1717from lib .core .convert import getUnicode
1818from lib .core .data import conf
19+ from lib .core .data import kb
1920from lib .core .data import logger
2021from lib .core .enums import AUTOCOMPLETE_TYPE
2122from lib .core .enums import DBMS
@@ -48,7 +49,7 @@ def execCmd(self, cmd, silent=False):
4849 if Backend .isDbms (DBMS .PGSQL ) and self .checkCopyExec ():
4950 self .copyExecCmd (cmd )
5051
51- elif self .webBackdoorUrl and not isStackingAvailable ():
52+ elif self .webBackdoorUrl and ( not isStackingAvailable () or kb . udfFail ):
5253 self .webBackdoorRunCmd (cmd )
5354
5455 elif Backend .getIdentifiedDbms () in (DBMS .MYSQL , DBMS .PGSQL ):
@@ -67,7 +68,7 @@ def evalCmd(self, cmd, first=None, last=None):
6768 if Backend .isDbms (DBMS .PGSQL ) and self .checkCopyExec ():
6869 retVal = self .copyExecCmd (cmd )
6970
70- elif self .webBackdoorUrl and not isStackingAvailable ():
71+ elif self .webBackdoorUrl and ( not isStackingAvailable () or kb . udfFail ):
7172 retVal = self .webBackdoorRunCmd (cmd )
7273
7374 elif Backend .getIdentifiedDbms () in (DBMS .MYSQL , DBMS .PGSQL ):
@@ -104,7 +105,7 @@ def runCmd(self, cmd):
104105 self .execCmd (cmd )
105106
106107 def shell (self ):
107- if self .webBackdoorUrl and not isStackingAvailable ():
108+ if self .webBackdoorUrl and ( not isStackingAvailable () or kb . udfFail ):
108109 infoMsg = "calling OS shell. To quit type "
109110 infoMsg += "'x' or 'q' and press ENTER"
110111 logger .info (infoMsg )
0 commit comments