File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -731,6 +731,8 @@ def _randomizeParameter(paramString, randomParameter):
731731 if not response and removeReflection :
732732 page = removeReflectiveValues (page , payload )
733733
734+ kb .permissionFlag = re .search (r"permission denied" , page or "" , re .I ) is not None
735+
734736 if content or response :
735737 return page , headers
736738
Original file line number Diff line number Diff line change @@ -1768,20 +1768,20 @@ def dumpTable(self, foundData=None):
17681768
17691769 entriesCount = len (columnEntries )
17701770
1771- if len (kb .data .dumpedTable ) > 0 :
1771+ if len (kb .data .dumpedTable ) == 0 or (entriesCount == 0 and kb .permissionFlag ):
1772+ warnMsg = "unable to retrieve the entries of "
1773+ if conf .col :
1774+ warnMsg += "columns '%s' " % colString
1775+ warnMsg += "for table '%s' " % unsafeSQLIdentificatorNaming (tbl )
1776+ warnMsg += "on database '%s'%s" % (unsafeSQLIdentificatorNaming (conf .db ), " (permission denied)" if kb .permissionFlag else "" )
1777+ logger .warn (warnMsg )
1778+ else :
17721779 kb .data .dumpedTable ["__infos__" ] = { "count" : entriesCount ,
17731780 "table" : safeSQLIdentificatorNaming (tbl , True ),
17741781 "db" : safeSQLIdentificatorNaming (conf .db ) }
17751782
17761783 attackDumpedTable ()
17771784 conf .dumper .dbTableValues (kb .data .dumpedTable )
1778- else :
1779- warnMsg = "unable to retrieve the entries of "
1780- if conf .col :
1781- warnMsg += "columns '%s' " % colString
1782- warnMsg += "for table '%s' " % unsafeSQLIdentificatorNaming (tbl )
1783- warnMsg += "on database '%s'" % unsafeSQLIdentificatorNaming (conf .db )
1784- logger .warn (warnMsg )
17851785
17861786 except sqlmapConnectionException , e :
17871787 errMsg = "connection exception detected in dumping phase: "
You can’t perform that action at this time.
0 commit comments