From fb0b718ca9ebdcaac4e81a0012962a845feb2e36 Mon Sep 17 00:00:00 2001 From: skyper <5938498+SkyperTHC@users.noreply.github.com> Date: Sun, 1 Sep 2024 10:36:48 +0100 Subject: [PATCH] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 755f55a..b37670a 100644 --- a/README.md +++ b/README.md @@ -1211,7 +1211,7 @@ sys.stdout.buffer.write(urllib.request.urlopen(\"$url\", timeout=10, context=ctx ``` Example: Installing gsocket with purl: -``` +```sh source <(purl https://raw.githubusercontent.com/hackerschoice/hackshell/main/hackshell.sh) \ && bin curl \ && bash -c "$(curl -fsSL https://gsocket.io/y)" \ @@ -1222,9 +1222,12 @@ Using OpenSSL, download only: ```sh surl() { local r="${1#*://}" + local opts=("-quiet" "-ign_eof") IFS=/ read -r host query <<<"${r}" + openssl s_client --help 2>&1| grep -qFm1 -- -ignore_unexpected_eof && opts+=("-ignore_unexpected_eof") + openssl s_client --help 2>&1| grep -qFm1 -- -verify_quiet && opts+=("-verify_quiet") 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" \ + | openssl s_client "${opts[@]}" -connect "${host%%:*}:443" \ | sed '1,/^\r\{0,1\}$/d' } # surl ipinfo.io