views:

29

answers:

2

how can i create a batch that can send HTTPS requests ? byfar i used Fiddler Request Builder so i can send requests like:

GET https://website.com/index.aspx?typeoflink=**[HERE-VARIABLE-FROM-FILE]**&min=1 HTTP/1.1
Accept: */*
Referer: https://website.com/index.aspx?chknumbertypeoflink&min=1
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Host: website.com
Connection: Keep-Alive
Cookie: cookieverrylongstringD%FG^&N*MJ( CVV%^B&N*&*(NHN*B*&BH*&H

But i have to mannualy change the variable NOT GOOD... So the script would send many Requests and just changing the [HERE-VARIABLE-FROM-FILE] variable The variables are textnames in a file (one variable per line) if this could be done in a batch file or vbs or jscript or anything!

Thanks in advance! adam

A: 

I'm going to assume Windows because you mention Fiddler.
You can use curl which runs under cygwin. curl is a command line tool which will allows you to initiates GET requests.

Shay Erlichmen
yes it's under windows
adam
+1  A: 

One way would be to download a version of curl for Windows, and then write a batch file that invokes curl.

set TYPEOFLINK=foo
curl https://website.com/index.aspx?typeoflink=%TYPEOFLINK%&min=1 > savedfile
Mike Morearty
and it could send cookies also ?
adam
i need to send the whole thing with User-Agent Cookie and etc
adam
Mike i used your script and it works... but how can i make it to send the User-Agent and Cookie ?
adam
"curl --help" will show options for these things: `--cookie <name=string/file>` and `--user-agent <string>`.
Mike Morearty
adam
Mike Morearty