Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;This is as far as I got... it's SSL now. Not sure what isn't working with it now.
- ;I would look at it later, but I'm going to sleep now.
- ;using the form at https://docs.google.com/spreadsheet/embeddedform?formkey=dENEU2dXdkZLR01wYkVSclpxRTNYanc6MQ as example
- alias fillform {
- set %test $urlencode($1-)
- sockopen -e fillform https://docs.google.com 80
- }
- on *:sockopen:fillform:{
- var %x sockwrite -n $sockname
- ;now looking at chrome developer console online I saw the request payload for answering just the first question is
- ;entry.0.single=THE_ANSWER&entry.1.single=&pageNumber=0&backupCache=&submit=Submit
- ;so I am just going to replace that answer part with what I filled above with $1- (assuming you use /fillform this is the answer to question 1)
- set %test $+(entry.0.single=,%test,&entry.1.single=&pageNumber=0&backupCache=&submit=Submit)
- echo -a %test
- %x POST /spreadsheet/embeddedform?formkey=dENEU2dXdkZLR01wYkVSclpxRTNYanc6MQ HTTP/1.1
- %x Host: https://docs.google.com
- %x Content-Length: $len(%test)
- ;the length of test is the content length because that's what i'm posting
- %x Content-type: application/x-www-form-urlencoded; charset=UTF-8
- %x
- %x %test
- }
- on *:sockread:fillform:{
- if ($sockerr) { echo -a $sockerr | return }
- sockread &t
- echo -a $bvar(&t,1-).text
- }
Add Comment
Please, Sign In to add comment