· 9 years ago · Sep 18, 2016, 11:36 AM
1import requests
2import random
3import re
4import threading
5import time
6requests.packages.urllib3.disable_warnings();
7
8def register(username = '2', password = 'dudeno1234', email = ''):
9 if(username=='2'):
10 username = str(random.randint(9999,999999))
11 email = str(random.randint(9999,999999)) + '@gmail.com'
12 url = 'http://shitpostbot.com/register'
13 session = requests.Session()
14 token = re.search('_token\".+value=\"(.+)\"', session.get(url).content).group(1)
15 session.post(url, data = {
16 'username': username,
17 'email': email,
18 'password': password,
19 'password_confirmation': password,
20 '_token': token
21 })
22 print username, password, email
23 return session
24
25while True:
26 def bot():
27 acc = register()
28 acc.get('http://shitpostbot.com/submission/upvote/reads-my-mind-57b9292cc3a75')
29 acc.get('http://shitpostbot.com/submission/upvote/duck-57c7c2bc88655')
30 for i in range(1, 10):
31 threading.Thread(target=bot).start()
32 time.sleep(1)