title: Script to automate actions on ajax-enabled website
body: <p>Here in Switzerland, people under 26 that have a cell phone contract with Swisscom can send 500 sms per month for free using the website <a href="https://xtrazone.sso.bluewin.ch/" rel="nofollow noreferrer">https://xtrazone.sso.bluewin.ch/</a>.</p>
  
  <p>Until a few days ago, this site was structured quite simply, it had a login and an inputbox to enter the sms. That's why i wrote a perl script (<a href="http://github.com/gwrtheyrn/Xtrazone-SMS-Tool" rel="nofollow noreferrer">http://github.com/gwrtheyrn/Xtrazone-SMS-Tool</a>) to send sms over that service using curl. That worked perfectly.</p>
  
  <p>Now they rewrote the entire site, and I'm faced with the following problems to be able to rewrite the script:</p>
  
  <ol>
  <li>There's a CAPTCHA after the login has been entered</li>
  <li>The loginbox gets loaded using javascript and processes the input using ajax</li>
  <li>The box to enter the receiver isn't a standard input box, it's a special javascript inputbox</li>
  </ol>
  
  <p>My remaining questions:</p>
  
  <ul>
  <li>How can i bypass the captcha? I thought of Tesseract (<a href="http://code.google.com/p/tesseract-ocr/" rel="nofollow noreferrer">http://code.google.com/p/tesseract-ocr/</a>). That would probably work with perl (there's a wrapper for it).</li>
  <li><strong>Is there some way to execute the JavaScript actions without having to start a browser? I want to keep the tool command-line-only.</strong></li>
  </ul>
  
  <p>Thanks in advance.</p>