d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Form Filling > C(libcurl), Bash Curl, C#
Add Reply New Topic New Poll
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Apr 18 2013 01:41pm
does anyone have experience in programically filling out web forms made by google?

its easy enough to send a post request with your values, but with google they append a random integer after their fixed post name as so.



does anyone know how to/have experience in parsing the current web document for all writable entries and then sending the post request to the form handler? i guess i could use some form of regex but i was hoping to avoid that.

edit: i just did 2 post dumps of the webform some integer values stayed the same while others changed. idk how google forms works for posting their results so if someone could enlighten me.

This post was edited by AbDuCt on Apr 18 2013 01:42pm
Member
Posts: 2,478
Joined: Jan 4 2007
Gold: 7,545.00
Apr 18 2013 01:50pm
Hmm this must have changed recently.
Before those were static numbers.

I made an Android app that would send data to a form and save it in my spreadsheet and it would just be entry1, entry2, etc.

I'll try looking around...
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Apr 18 2013 02:10pm
Quote (DirtyRasa @ Apr 18 2013 03:50pm)
Hmm this must have changed recently.
Before those were static numbers.

I made an Android app that would send data to a form and save it in my spreadsheet and it would just be entry1, entry2, etc.

I'll try looking around...


okay thanks. i tried submiting and logging two entries and some numbers changed others stayed the same. i guess its for anti spamming but that is pretty useless seeing how they could be regex'd out of the html
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Apr 21 2013 02:10pm
Quote (AbDuCt @ Apr 18 2013 04:10pm)
okay thanks. i tried submiting and logging two entries and some numbers changed others stayed the same. i guess its for anti spamming but that is pretty useless seeing how they could be regex'd out of the html


turns out that either this specific form was created differently or that google has indeed incorporated randomization. although the randomization doesnt really effect anything seeing how it only changes between 2 sets of data ever x number of form fills so i sitll have a 70% chance to fill out a form.

Code
#!/bin/bash

answers=( Yes No Maybe )

while true; do
 name=$(cat /dev/urandom | tr -dc '0-9a-zA-Z' | head -c 8)
 proxychains curl -d "entry.217360646=$name&entry.1389261975=$name&entry.547520411=${answers[$[($RANDOM % 3)]]}&entry.1089614339=${answers[$[($RANDOM % 3)]]}&entry.1554608796=${answers[$[($RANDOM % 3)]]}&entry.821172783=${answers[$[($RANDOM % 3)]]}&entry.1705301920=${answers[$[($RANDOM % 3)]]}&entry.1043202482=$name&draftResponse=%5B%5D%0D%0A&pageHistory=0" https://docs.google.com/forms/d/1X/formResponse
 killall -HUP tor
done


to run concurrent threads to spam the form simply

Code
for i in {1..15}; do ./script.sh & done


this simply randomly selects a yes, no, or maybe answer for the radio buttons for the page and then randomly generates a 8 character length ascii string generated from reading /dev/random

then the next line simply runs 15 instances of the script.

This post was edited by AbDuCt on Apr 21 2013 02:19pm
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll