PDA

View Full Version : [SOLVED] pipe out a download to the bash?



hakermania
June 19th, 2010, 09:53 PM
wget http://www.hakermania.t35.com/test | sh
doesn't seem to work...
any ideas?

soltanis
June 19th, 2010, 10:04 PM
To the current shell?

Try



wget -O - http://example.site.com/url.ext


Curl also works



curl http://example.site.com/url.ext


It generates output to the standard out by default.

hakermania
June 19th, 2010, 11:52 PM
hm, i'll better try this:
wget http://www.hakermania.t35.com/test; chmod +x test; sh test

...

soltanis
June 20th, 2010, 01:55 AM
How about eval?



SCRIPT=`wget -O - http://path/to/script`
eval "$SCRIPT"

hakermania
June 20th, 2010, 09:50 AM
No, ok, this I mentioned before work perfectly...See ya.