· 9 years ago · Nov 20, 2016, 07:58 AM
1#Link to my google form : https://docs.google.com/forms/d/e/1FAIpQLSdGy4R6BfQu0mS-qNL3zN3GahJ9kTK16FzmEbe6kJ-AzLB2SA/viewform
2#The following code spams a multi-sectioned google form created by me with random data each time
3
4import random
5import requests
6
7def gen_email ():
8 email = ""
9 email += ''.join (random.sample ("abcdefghijklmnopqrstuvxyz1280", random.randint (8, 14)))
10 email += '@gmail.com'
11 return email
12
13names = ['Johnna', 'Valery', 'Kandy', 'Cherri', 'Deandrea', 'Nova', 'Amparo', 'Kellee', 'Sherlyn', 'Calandra', 'Santo', 'Malia', 'Violet', 'Jacquie', 'Lashanda', 'Leigh', 'Noella', 'Dolly', 'Karina', 'Florinda']
14
15i = 0
16url = 'https://docs.google.com/forms/d/e/1FAIpQLSdGy4R6BfQu0mS-qNL3zN3GahJ9kTK16FzmEbe6kJ-AzLB2SA/formResponse'
17
18user_agent ={
19 'Referer':'https://docs.google.com/forms/d/e/1FAIpQLSdG7vBnWcedxu8miF80-cfYN3e_CvrXxGTA-sVPiY9UtlQaZA/viewform',
20 'User-Agent':"Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36"
21 }
22
23while (i < 500):
24
25 form_data = {
26 'pageHistory' : '0,1',
27 'draftResponse' : '[[[,646535489,["' + random.choice (names) + '"],0],[,486993200,["' + gen_email () + '"],0],[,859229029,["1997-01-17"],0]],,"-1014143726553558735"]',
28 'entry.1786096135' : random.choice (['Yes', 'No', 'Maybe']),
29 'entry.1495219931' : str (random.randint (1,10)),
30 'entry.1307114851' : random.choice (['Little', 'Moderate', 'A Lot']),
31 'entry.93750948' : random.choice (['Little', 'Moderate', 'A Lot']),
32 'entry.774319921' : random.choice (['Little', 'Moderate', 'A Lot'])
33 }
34
35 r = requests.post (url, data = form_data, headers = user_agent)
36 i += 1