Pop up authentication with python requests

Viewed 109

Is there any way to authenticate a router login page that has a pop up window similar to alert("hello") in javascript


def simple_login(url, usr , passwd ):
    heads = { "User-Agent":generate_user_agent() }
    resp = requests.post(url, headers=heads, auth=(usr, passwd ))
    puts(colored.yellow(f"[{url}] responeded [{resp.status_code}] creds :[{usr}]-[{passwd}]"))
    return 


simple_login("http://<IP>/" , "admin" , "admin")

when I run this code it does not do anything and after a minute or so it throws this error

requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

how do login in to the router without using selenium

0 Answers
Related