Answer the question
In order to leave comments, you need to log in
How to download a file with NCat like Wget?
I got a built-in Linux system without WGET and CURL, there is only NCat.
You need to write a one-liner to download a file ( pastebin.com/raw.php?i=kqqfkeDg) via http protocol, so that you can then insert it into a shell script.
Works in interactive mode
[email protected]:~# ncat pastebin.com 80
GET /raw.php?i=kqqfkeDg HTTP/1.1
Host: pastebin.com
User-Agent: Mozilla/5.0
HTTP/1.1 200 OK
....
[email protected]:~# echo -e "GET /raw.php?i=kqqfkeDg HTTP/1.1\nHost: pastebin.com\nUser-Agent: Mozilla/5.0\n\n" | ncat pastebin.com 80 -v
Ncat: Version 6.49BETA4 ( http://nmap.org/ncat )
Ncat: Connected to 190.93.243.15:80.
Ncat: 78 bytes sent, 0 bytes received in 0.29 seconds.
Answer the question
In order to leave comments, you need to log in
and there is no GET binary either?
Actually, it looks like cloudflare banned you. So the command is correct. Try to remove UA.
cat <<EOF > rq
GET /raw.php?i=kqqfkeDg HTTP/1.1
Host: pastebin.com
User-Agent: Mozilla/5.0
EOF
tail -n +0 -f rq | ncat pastebin.com 80
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question