mirror of
https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet.git
synced 2026-05-18 06:04:43 +02:00
Update README.md
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user