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:

  1. take ff + firebug
  2. go network tab in firebug , set persistent data.
  3. do whatever need authenticate via wifi router's webpage.
  4. find request browser sent credentials.
  5. click right mouse button , choose copy curl
  6. past script file.
  7. if it's self signed ssl cert append -k curl
  8. enjoy

Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -