Skip to content

Commit f62e73a

Browse files
committed
Added missing code from master to handle text index exception
1 parent bf0f81b commit f62e73a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

nosqlmap.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,9 +1015,12 @@ def stealDBs(myDB):
10151015
return()
10161016

10171017
except:
1018-
#print str(sys.exc_info())
1019-
raw_input ("Something went wrong. Are you sure your MongoDB is running and options are set? Press enter to return...")
1020-
mainMenu()
1018+
if str(sys.exc_info()).find('text search not enabled') != -1:
1019+
raw_input("Database copied, but text indexing was not enabled on the target. Indexes not moved. Press enter to return...")
1020+
mainMenu()
1021+
else:
1022+
raw_input ("Something went wrong. Are you sure your MongoDB is running and options are set? Press enter to return...")
1023+
mainMenu()
10211024

10221025
def massMongo():
10231026
global victim

0 commit comments

Comments
 (0)