Guest

CTR35 Login Bookmarklet

By: srl on Apr 8th, 2011  |  syntax: JavaScript  |  size: 1.01 KB  |  hits: 216  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. Source; http://fahmu.net/tech/?p=126
  2.  
  3. This bookmarklet
  4.  
  5. HTML:
  6. <a href='javascript:(function(){var f=document.createElement("form"),p=document.createElement("input");f.setAttribute("method","POST");f.setAttribute("action","http://cp/login/do_auth");p.setAttribute("name","password");p.setAttribute("value","YOURPASSWORD");f.appendChild(p);f.submit();})()'>ctr35login</a>
  7.  
  8. URL:
  9. javascript:(function(){var f=document.createElement("form"),p=document.createElement("input");f.setAttribute("method","POST");f.setAttribute("action","http://cp/login/do_auth");p.setAttribute("name","password");p.setAttribute("value","YOURPASSWORD");f.appendChild(p);f.submit();})()
  10.  
  11. ... will make a one-click login bookmarklet to your CTR35 Cradlepoint
  12. Router <http://www.cradlepoint.com/products/wireless-n-portable-router-ctr35>
  13.  
  14. Thanks to
  15. <http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit>
  16. for the idea of the dynamic form.
  17.  
  18. Note: I tried posting to this via wordpress, however, the XSS filter
  19. ate it.