Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
- ({ echo -ne "HTTP/1.0 200 OK\r\nContent-Type:application/octet-stream\r\nContent-Disposition:attachment\r\nContent-Length: $(wc -c < "$1")\r\n\r\n"; cat "$1"; } | nc -w 2 -l -p 1234 2>&1 > /dev/null) &
- xdg-open "http://docs.google.com/viewer?url=http://$IP:1234/$(basename "$1")"
Advertisement
Add Comment
Please, Sign In to add comment