I wrote this little program originally for IIS stress testing tool. It's functionality is something between netcat and wget, and it's user interface is much like the classic CLI ftp client. It works like a typical command line shell, reading commands from standard input and writing the output to standard output. You can also write all the commands to a simple text file and redirect it to the program as input.
To get started, compile the program (or use a precompiled executable) and run it from the command line. Type '?' to get a short help message.
wput > ? WPUT version 1.0 Available commands are: ? show this text sh show parameters q return only HTTP status codes qq be quiet nq be noisy (default) h [host:port] change host and port p [host:port] use proxy server host:port r [port] change source port u [url] change base url v [string] change HTTP-version (1.0) a [string] additional HTTP-headers i [secs] idle time before sending data t [secs] network timeout s [string] send string x exit wput wput >Most of the above commands should be obvious but some of them needs to be explained with a little more details:
h - If the port is not given, the standard HTTP port (80) is used.
p - If the port is not given, a port 8080 is used.
u - This is the base URL that is used with all the s commands
s - This is the actual GET parameter (appended to base URL)
a - Newline between the headers is expressed with ";"
i - A random idle time can be defined as range "min-max"
t - Quit if there's no response from a server (UNIX only)
Now, try out the following command sequence:
wput > h www.microsoft.com wput > s /If it didn't work, you might need to define a proxy server:
wput > h www.microsoft.com wput > p proxy.mycompany.com:3128 wput > s /You can check out the current parameters any time with command "sh":
wput > sh Current parameters: host: www.microsoft.com source port: any base url: HTTP version: 1.0 additional headers: idle time: 0 secs timeout: 5 secs quiet: no wput >Next, try the same commands using a text file:
$ echo "h www.microsoft.com" > commands.txt $ echo "p proxy.mycompany.com:3128" >> commands.txt $ echo "s /" >> commands.txt $ wputHome
Last updated Apr 24, 2002