2727from lib .core .enums import PAYLOAD
2828from lib .core .enums import PLACE
2929from lib .core .exception import sqlmapNoneDataException
30+ from lib .core .settings import INBAND_FROM_TABLE
3031from lib .core .settings import PAYLOAD_DELIMITER
3132
3233class Agent :
@@ -515,8 +516,8 @@ def forgeInbandQuery(self, query, position, count, comment, prefix, suffix, char
515516 intoRegExp = intoRegExp .group (1 )
516517 query = query [:query .index (intoRegExp )]
517518
518- if getIdentifiedDBMS () == DBMS . ORACLE and inbandQuery .endswith (" FROM DUAL" ):
519- inbandQuery = inbandQuery [:- len (" FROM DUAL" )]
519+ if getIdentifiedDBMS () in INBAND_FROM_TABLE and inbandQuery .endswith (INBAND_FROM_TABLE [ getIdentifiedDBMS ()] ):
520+ inbandQuery = inbandQuery [:- len (INBAND_FROM_TABLE [ getIdentifiedDBMS ()] )]
520521
521522 for element in range (count ):
522523 if element > 0 :
@@ -535,9 +536,9 @@ def forgeInbandQuery(self, query, position, count, comment, prefix, suffix, char
535536 conditionIndex = query .index (" FROM " )
536537 inbandQuery += query [conditionIndex :]
537538
538- if getIdentifiedDBMS () == DBMS . ORACLE :
539+ if getIdentifiedDBMS () in INBAND_FROM_TABLE :
539540 if " FROM " not in inbandQuery :
540- inbandQuery += " FROM DUAL"
541+ inbandQuery += INBAND_FROM_TABLE [ getIdentifiedDBMS ()]
541542
542543 if intoRegExp :
543544 inbandQuery += intoRegExp
@@ -554,8 +555,8 @@ def forgeInbandQuery(self, query, position, count, comment, prefix, suffix, char
554555 else :
555556 inbandQuery += char
556557
557- if getIdentifiedDBMS () == DBMS . ORACLE :
558- inbandQuery += " FROM DUAL"
558+ if getIdentifiedDBMS () in INBAND_FROM_TABLE :
559+ inbandQuery += INBAND_FROM_TABLE [ getIdentifiedDBMS ()]
559560
560561 inbandQuery = self .suffixQuery (inbandQuery , comment , suffix )
561562
0 commit comments