Skip to content

Commit

Permalink
Merge pull request codingo#40 from youngyangyang04/0.5.1.1
Browse files Browse the repository at this point in the history
0.5.1.1
  • Loading branch information
tcstool committed May 20, 2016
2 parents b2da8f5 + b5cd606 commit 71cc226
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
11 changes: 11 additions & 0 deletions .idea/NoSQLMap-v0.5.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 21 additions & 14 deletions nosqlmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,19 @@ def options():
#Treat this as a DNS name
optionSet[0] = True
notDNS = False
else:
#If len(octets) != 4 is executed the block of code below is also run, but it is not necessary
#If the format of the IP is good, check and make sure the octets are all within acceptable ranges.
for item in octets:
try:
if int(item) < 0 or int(item) > 255:
print "Bad octet in IP address."
goodDigits = False

#If the format of the IP is good, check and make sure the octets are all within acceptable ranges.
for item in octets:
try:
if int(item) < 0 or int(item) > 255:
print "Bad octet in IP address."
goodDigits = False

except:
#Must be a DNS name (for now)
except:
#Must be a DNS name (for now)

notDNS = False
notDNS = False

#If everything checks out set the IP and break the loop
if goodDigits == True or notDNS == False:
Expand Down Expand Up @@ -307,9 +308,13 @@ def options():
elif select == "7":
#Unset the setting boolean since we're setting it again.
optionSet[4] = False
goodLen = False
goodDigits = False

while optionSet[4] == False:
goodLen = False
goodDigits = True
#Every time when user input Invalid IP, goodLen and goodDigits should be reset. If not do this, there will be a bug
#For example enter 10.0.0.1234 firtly and the goodLen will be set to True and goodDigits will be set to False
#Second step enter 10.0.123, because goodLen has already been set to True, this invalid IP will be put in myIP variables
myIP = raw_input("Enter the host IP for my " + platform +"/Shells: ")
#make sure we got a valid IP
octets = myIP.split(".")
Expand All @@ -327,8 +332,10 @@ def options():
print "Bad octet in IP address."
goodDigits = False

else:
goodDigits = True
# else:
# goodDigits = True
#Default value of goodDigits should be set to True
#for example 12.12345.12.12


#If everything checks out set the IP and break the loop
Expand Down
1 change: 0 additions & 1 deletion nsmcouch.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def netAttacks(target,port, myIP):
mgtSelect = True
#This is a global for future use with other modules; may change
dbList = []

print "Checking to see if credentials are needed..."
needCreds = couchScan(target,port,False)

Expand Down

0 comments on commit 71cc226

Please sign in to comment.