Compare commits

...

2 Commits

4 changed files with 26 additions and 0 deletions

0
fuckman.sh Normal file → Executable file
View File

4
repo/packages.txt Normal file
View File

@ -0,0 +1,4 @@
# EXAMPLE
curl|8.0|https://repo.warceuproject.org/pkgs/curl-8.0.tar.gz
nano|6.5|https://repo.warceuproject.org/pkgs/nano-6.5.tar.gz
busybox|1.36|https://repo.warceuproject.org/pkgs/busybox-1.36.tar.gz

0
repo/pkgs/.null Normal file
View File

22
tests/tes-fuckdownload.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/sh
download_fuckman() {
URL="$1"
OUTPUT="$2"
HOST=$(echo "URL" | awk -F/ '{print $3}')
PATH=$(echo "URL" | cut -d '/' -f4-)
echo "[*]Downloading From $URL...."
exec 3<> /dev/tcp$HOST/80
echo -e "GET /$PATH HTTP/1.1\r\nHost: $HOST\r\Connection: close\r\n\r\n" >&3
{
HEADER=1
while IFS= read -r line; do
["$HEADER"] && [ -z "$line"] && HEADER=
[ -z "$HEADER" ] && echo "$line" >> "$OUTPUT"
done
} <&3
exec 3>&-
echo "[+] Downloaded $OUTPUT"
}