Login Register


Question about sending a javascript:submitform() to a website filter_list
Author
Message
Question about sending a javascript:submitform() to a website #1
Hello guys,
let's say I want to make a script that auto-sends a request to this site: http://makemehost.com/

So I can host maps without inserting each and every parameter every time.

I looked around for a bit, but I can't seem to figure out how to do it.

Could any of you help with that?
Not asking to be spoon-fed, just to be directed.

Thanks in advance

Reply

RE: Question about sending a javascript:submitform() to a website #2
I got nothing, but I think StackOverflow is your friend on this one
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply

RE: Question about sending a javascript:submitform() to a website #3
I looked around for a short while, and found this, might be useful. It's about sending a GET or POST request to a URL.

Or this, which is on submitting a form.

Both are in stackoverflow, in Python. Sorry if you've already seen these Tongue

Reply

RE: Question about sending a javascript:submitform() to a website #4
Thank you for the answer.
I first looked around for POST and GET, but the thing is: this is some javascript code (javascriptConfusedubmitform()) that I activate on the site by the mean of the big button, then (i suppose) the parameters that I have inserted into the form are somewhat processed by the site...
Is this a "normal" POST request? This javascript code makes me uncomfortable...

I think my biggest problem is that I don't know how does the whole process works.

Reply

RE: Question about sending a javascript:submitform() to a website #5
Simplified, lightweight HTTP request client libraries.

This is worth a look.

Reply

RE: Question about sending a javascript:submitform() to a website #6
Thank you Lux. I'll check it out.

Reply

RE: Question about sending a javascript:submitform() to a website #7
Sorry for the double posting, and a question: there is a way to edit the older post and let others know there is something new in the thread?

Anyway: Thank you Lux! After a while I managed to make it work.
I used Wireshark to see exactly the content of the packet being sent when i clicked on the button in the site, then I coded the header and the payload like that and it worked!

Thanks again!

Reply

RE: Question about sending a javascript:submitform() to a website #8
(06-23-2015, 11:41 AM)Lysergide Wrote: Sorry for the double posting, and a question: there is a way to edit the older post and let others know there is something new in the thread?

Anyway: Thank you Lux! After a while I managed to make it work.
I used Wireshark to see exactly the content of the packet being sent when i clicked on the button in the site, then I coded the header and the payload like that and it worked!

Thanks again!

Good that you got it to work!

I assume you're making some kind of bot to create free game servers without having to visit the site? if so, that's awesome!

Reply

RE: Question about sending a javascript:submitform() to a website #9
(06-23-2015, 03:21 PM)Lux Wrote: Good that you got it to work!

I assume you're making some kind of bot to create free game servers without having to visit the site? if so, that's awesome!

Not precisely a bot, because the designated "owner" has to join the game within 5 minutes, so I need to be active anyway.
The usefulness of this script is that it let me host a game just executing the file from my desktop, without visiting the site or inserting parameters.

I found a weird thing tho: under a certain number of characters, the post request didnt work, gave a strange timeout error and I still don't understand why.
Edit: watching the header it occurred to me: maybe the "certain number of characters" is the number that I put in the "Content-Length" field. I have to run some tests...

The code, for those who are interested:
Spoiler:
Code:
import unirest response = unirest.post( "http://makemehost.com/gamestart.php", headers={ "Host": "makemehost.com", "Connection":"keep-alive", "Content-Length":"81", "Cache-Control":"max-age=0", "Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Origin":"http://makemehost.com", "User-Agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36", "Content-Type":"application/x-www-form-urlencoded", "Referer":"http://makemehost.com", "Accept-Encoding":"gzip,deflate", "Accept-Language":"it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4,es;q=0.2"}, params={ "map": "Parasite%202%20[v1.14B].w3x", "pp": "Public", "gn":"PARASITE+2", "owner":"Owner_name", "location":"ALL"} ) print response.code # The HTTP status code #print response.headers # The HTTP headers #print response.body # The parsed response #print response.raw_body # The unparsed response

Reply







Users browsing this thread: 1 Guest(s)