javascript - BASH CURL SCRIPT / Automatic Web Form Login -
i need login automatically wi-fi network shell script (terminal / os x).
the web form submit controlled through javascript:
function submitaction(){ var link = document.location.href; var searchstring = "redirect="; var equalindex = link.indexof(searchstring); var redirecturl = ""; var urlstr = ""; if(equalindex > 0) { equalindex += searchstring.length; redirecturl = link.substring(equalindex); if(redirecturl.length > 0){ if(redirecturl.length > 255) redirecturl = redirecturl.substring(0,255); document.forms[0].redirect_url.value = redirecturl; } } document.forms[0].buttonclicked.value = 4; document.forms[0].submit(); }
two fields used (password & username) , form method="post".
question: possible through shell script in os x? how proceed when submit triggered way javascript?
many thanks!
i don't know os x think can helpful anyway. did:
- take ff + firebug
- go network tab in firebug , set persistent data.
- do whatever need authenticate via wifi router's webpage.
- find request browser sent credentials.
- click right mouse button , choose copy curl
- past script file.
- if it's self signed ssl cert append -k curl
- enjoy
Comments
Post a Comment