i am trying to login to a webpage using arduino
i used http client to connect, and got the html code of the page, but now i need to login
i have tried
client.prinntln("POST name='admin'")
but didnt work
i am new to html and http, if anyone can help me or tell me what i need to learn (just give hint)
this is the part of the code that displays the login text boxes ids
use Fiddler to inspect http headers of the requests to the page after the login. if there is a Authorization header with value Basic ..., then it should be easy to create that header
Juraj:
use Fiddler to inspect http headers of the requests to the page after the login. if there is a Authorization header with value Basic ..., then it should be easy to create that header
thanks for replying
i have downloaded fiddler and tried to enter correct and wrong passwords
i looked through all the results selected "auth" but all were saying "no Authorization Header is present."
and i found this when logginin
Accept-Language: en-US,en;q=0.8,ar-LB;q=0.5,ar;q=0.3
Content-Type: text/plain;charset=UTF-8
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
Content-Length: 116
Host: 192.168.88.1
Connection: Keep-Alive
Pragma: no-cache
Cookie: username=admin
Juraj:
the cookie should by on one line. the encoded part is shown wrong decoded. don't just copy it.
this cookie is a 'ticket' which permits enter. with login page you 'buy a new ticket'.
you should first make this hack from a PC program.
if there is a telnet api use it.
there is telnet
when i use telnet client example i get non sense chars
when i use cmd i can easily access and control the router but on arduino after i connect as telnet client i get some none sence chars like >/' and stuff
i tried to send the username and password as client.println("admin") but i didnt get any reply, not even to tell me that username and password are wrong
i mean, when i connect with cmd the router asks me to login, so i tried to do the same using arduino, after connecting but it didnt work
i also tried connecting with api port 8728 and port 80 on both cmd and arduino , it was connected but also no reply from the router.
is it possible to contact you on facebook for faster communication?
this things are complex. I know the standards and usual tricks, but if it is proprietary without docs than it is hard. I want try it with my huawai router, but it is low priority for me now, so I can't help you more.
See http standard, http authentication rfc, base64 encoding.
Try to get that cookie in binary.
Telnet server can send options on connect. Ignore those chars. And google telnet protocol.
Telnet client on PC handles the login for you. From Arduino you must handle it.