On Mon, 18 Jun 2007 10:13:48 -0700 (PDT) Joe Kopra <[EMAIL PROTECTED]> wrote:
> Please forgive my ignorance if this question is misdirected, if you know a > better tool to do what I am attempting, please tell me. > > I am trying to upload a file from a unix script to a website (that is > interactive) and get the resulting .html back to the unix box. > > I am including a sample .mup file for use with the website and of course the > site itself. > > I believe IBM has found a vulnerability using their "programmatic" utility > and has such shut it down, so I am trying this as a workaround, please see > below: > > http://www14.software.ibm.com/webapp/set2/mds/fetch?page=mds.html > > see Upload a data file and About programmatic upload of survey files. > > .mup file included for testing purposes. > > If there is no solution with wget, please recommend anything you think might > help. hi joe, wget does not natively support multipart uploads at the moment. but you might be able to do what you need using this shell script: #!/bin/bash BOUNDARY="AaB03x" echo -n "--$BOUNDARY\r\nContent-disposition: form-data; name=\"mdsData\"\r\nContent-Type: text/plain\r\n\r\n" > tmpfile cat $1 >> tmpfile echo -n "--$BOUNDARY\r\n" >> tmpfile wget --header="Content-type: multipart/form-data, boundary=$BOUNDARY" \ --post-file="tmpfile" \ http://www14.software.ibm.com/webapp/set2/mds/mds rm -f tmpfile # end of script the usage, of course, is: sh scriptname filetoupload let me know if this solved your problem. but, please, let's continue this conversation on the wget ml. -- Mauro Tortonesi <[EMAIL PROTECTED]>
