Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5c8707

Browse files
committed
Infinite loop fix when 'SELECT DB_NAME(...)' method used for --dbs in MsSQL
1 parent 1028afc commit b5c8707

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

plugins/generic/databases.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ def getDbs(self):
148148
kb.data.cachedDbs = []
149149
while True:
150150
query = rootQuery.inband.query2 % count
151-
value = inject.getValue(query, blind=blind)
152-
if not value:
151+
value = unArrayizeValue(inject.getValue(query, blind=blind))
152+
if not (value or "").strip():
153153
break
154154
else:
155-
kb.data.cachedDbs.append(unArrayizeValue(value))
155+
kb.data.cachedDbs.append(value)
156156
count += 1
157157
if kb.data.cachedDbs:
158158
break

0 commit comments

Comments
 (0)