Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bs4 import BeautifulSoup
- import requests
- username = input("Enter username ")
- password = input("Enter Password ")
- with requests.Session() as c:
- url = "http://192.168.1.2" #+url make it dynamic later
- print(url)
- username = username
- password = password
- r = c.get(url)
- print(r)
- login_data = dict(userName=username, pcPassword=password,next='/')
- c.post(url,data=login_data, headers={"Referer": "http://www.techruse.com/"})
- page = c.get('http://192.168.1.2//userRpm/WlanStationRpm.htm')
- print(page.content)
- <Response [200]>
- b'<body><script language="javaScript">window.parent.document.cookie="Authorization=;path=/";nwindow.parent.location.href = "http://192.168.1.2";n</script></body></html>n'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement