mechanize-python

brute force script python and mechanize

brute force script python and mechanize Question: 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: 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(‘>>>’) print “continue at …

Total answers: 1

How to get filename from Content-Disposition in headers

How to get filename from Content-Disposition in headers Question: I am downloading a file with Mechanize and in response headers there is a string: Content-Disposition: attachment; filename=myfilename.txt Is there a quick standard way to get that filename value? What I have in mind now is this: filename = f[1][‘Content-Disposition’].split(‘; ‘)[1].replace(‘filename=’, ”) But it looks like …

Total answers: 3