#!/bin/bash url=http://uploader/ bstr="--bstr"`date +%s` rm -f test.out test.post index.html* dd if=/dev/random of=test.out bs=1024 count=1 md5sum test.out ( printf -- "--$bstr\r\n" printf "Content-Disposition: form-data; name=\"uploaded_file\"; filename=\"a.dat\"\r\n" printf "Content-Type: application/octet-stream\r\n" printf "\r\n" cat test.out printf "\r\n" printf -- "--$bstr--\r\n" ) > test.post wget $url --header="Content-Type: multipart/form-data; boundary=$bstr" \ --post-file=test.post --proxy=off -S