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
parser = argparse.ArgumentParser() | |
parser.add_argument('--url', action='store', dest='url', help='Specify the url to test.') | |
results = parser.parse_args() | |
url = str(results.url) + "/LOGIN" | |
headers = {'Content-Type':'application/x-www-form-urlencoded;charset=utf-8'} | |
data = "credential_0=admin&credential_1=admin&destination=/index.html" | |
r = requests.post(url,data=data,headers=headers,verify=False) | |
if r.status_code == 200: | |
print("Successfully logged in using credentials 'admin:admin'") | |
else: |
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 | |
import argparse | |
import warnings | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
warnings.simplefilter('ignore',InsecureRequestWarning) | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--url', action='store', dest='url', help='Specify the url to test.') | |
results = parser.parse_args() |