What's new

Python Help! http request web ui sign in

Yhaghetts

Eternal Poster
Joined
Apr 19, 2016
Posts
702
Reaction
3,065
Points
508
Good day mga boss!

Patulong sana ako pano mag sign in sa webui ng modem gamit python .

1675733228006.png


sana may magaling sa python .

1675733604112.png


ano mali ? self tought lang po ako at di na kaya ng power . Patulong nalang master.
 

Attachments

anjan na sagot sa terminal. láρág mo logs ng errors.

EDIT:
debug mo yung sa send part. Nag eexception sha jan.
 
Last edited:
anjan na sagot sa terminal. láρág mo logs ng errors.

EDIT:
debug mo yung sa send part. Nag eexception sha jan.
ito boss cinopy ko lang terminal log pagkapindot ng run

PS C:\Users\ASPIRE 3 RYZEN 5\Downloads\Programs> python -u "c:\Users\ASPIRE 3 RYZEN 5\Downloads\Programs\IP hunt proj.py"



IP: 112.198.112.156


Changing IP



Token: kHFRpXx8fwTwYmurXEigXd5CqqRibUWh


Headers:
{'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-US,en', 'Connection': 'keep-alive', 'Content-Length': '186', 'Content-Type': 'appli
cation/x-www-form-urlencoded; charset=UTF-8', 'cøøkíé': 'SessionID=5L5L5DW15fq36YJz0oipKYiXshAG9PBdRhl4osKxALunkls0ahswRBiX4alRAJfRKithmvLiX0YHyCm0aBw6VY9NchrSd
4oTUMO8lxFF0PF7bL8sSjZ0uqz9zz0bk0Ah', 'Host': '192.168.8.1', 'Origin': 'You do not have permission to view the full content of this post. Log in or register now.', 'Referer': 'You do not have permission to view the full content of this post. Log in or register now.', 'Sec-GPC': '1', 'Us
er-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36', 'X-Requested-With': 'XMLHttpReques
t', '_ResponseSource': 'Broswer', '__RequestVerificationToken': 'kHFRpXx8fwTwYmurXEigXd5CqqRibUWh'}



firstnonce: c831d889da893a72fcfcf59c4762fe1895625d487ec3627d9ef2faa418e097c0


xml: <?xml version="1.0" encoding="UTF-8"?><request><username>admin</username><firstnonce>c831d889da893a72fcfcf59c4762fe1895625d487ec3627d9ef2faa418e097c0</firs
tnonce><mode>1</mode></request>


Traceback (most recent call last):
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1374, in getresponse
response.begin()
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 318, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 489, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\packages\six.py", line 769, in reraise
raise value.with_traceback(tb)
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1374, in getresponse
response.begin()
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 318, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\Users\ASPIRE 3 RYZEN 5\Downloads\Programs\IP hunt proj.py", line 88, in <module>
response = requests.post(url='http://192.168.8.1/api/user/challenge_login', cøøkíés=cøøkíés, headers=headers, data=xml, verify=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
PS C:\Users\ASPIRE 3 RYZEN 5\Downloads\Programs>
 
check mo sa thread na to. You do not have permission to view the full content of this post. Log in or register now.
Thank you, etry ko mamaya after kumain. Feedback ko later

ayaw pa din
check mo sa thread na to. You do not have permission to view the full content of this post. Log in or register now.
nag eerror pa din sya


PS C:\Users\ASPIRE 3 RYZEN 5\Downloads\Programs> python -u "c:\Users\ASPIRE 3 RYZEN 5\Downloads\Programs\IP hunt proj.py"



IP: 112.198.112.156


Changing IP



Token: 006Bb2fRQrnsLm5DlWqLDDWkKEHyyIMM


Headers:
{'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36', 'Accept-Encoding': 'gzip, defl
ate', 'Accept': '/', 'Connection': 'keep-alive', 'Accept-Language': 'en-US,en', 'Content-Length': '186', 'Content-Type': 'application/x-www-form-urlencoded; c
harset=UTF-8', 'cøøkíé': 'SessionID=5L5L5DW15fq36YJz0oipKYiXshAG9PBdRhl4osKxALunkls0ahswRBiX4alRAJfRKithmvLiX0YHyCm0aBw6VY9NchrSd4oTUMO8lxFF0PF7bL8sSjZ0uqz9zz0b
k0Ah', 'Host': '192.168.8.1', 'Origin': 'You do not have permission to view the full content of this post. Log in or register now.', 'Referer': 'You do not have permission to view the full content of this post. Log in or register now.', 'Sec-GPC': '1', 'X-Requested-With': 'XMLHttpReques
t', '_ResponseSource': 'Broswer', '__RequestVerificationToken': '006Bb2fRQrnsLm5DlWqLDDWkKEHyyIMM'}



firstnonce: 64c636b9755bfcc97c9ba33d2d3cfe4db8e0db072b62cadfef70c29f8484a240


xml: <?xml version="1.0" encoding="UTF-8"?><request><username>admin</username><firstnonce>64c636b9755bfcc97c9ba33d2d3cfe4db8e0db072b62cadfef70c29f8484a240</firs
tnonce><mode>1</mode></request>


Traceback (most recent call last):
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1374, in getresponse
response.begin()
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 318, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 489, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\packages\six.py", line 769, in reraise
raise value.with_traceback(tb)
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1374, in getresponse
response.begin()
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 318, in begin
version, status, reason = self._read_status()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\Users\ASPIRE 3 RYZEN 5\Downloads\Programs\IP hunt proj.py", line 92, in <module>
r3 = requests.post(url='http://192.168.8.1/api/user/challenge_login', headers=headers, data=xml, timeout= 5)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ASPIRE 3 RYZEN 5\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
PS C:\Users\ASPIRE 3 RYZEN 5\Downloads\Programs>
 
Last edited:
If you're having trouble with making an HTTP request to sign in to a web UI, here are some steps you can try:

  1. Check the API documentation: Make sure that you have the correct endpoint URL and that you're using the correct request method (e.g., GET, POST, PUT, etc.). Also, check if the API requires any specific headers or authentication information.
  2. Verify the credentials: Ensure that you're using the correct username and password for the account you're trying to log into.
  3. Test the API: You can use a tool like Postman or cURL to test the API and see if you're getting the expected response.
  4. Check for any network issues: Make sure that you have a stable internet connection and that there are no firewalls or other network configurations that are blocking the request.
  5. Debug the code: If you're making the API request from a program or script, check the code for any syntax errors or typos that may be preventing the request from working.
If you're still having trouble after trying these steps, it may be best to reach out to the API provider or the support team for the web UI for further assistance.
 
Back
Top