mirror of
https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet.git
synced 2026-07-10 20:53:43 +02:00
Update README.md
This commit is contained in:
@@ -1195,10 +1195,9 @@ Using Python, download only:
|
||||
```sh
|
||||
# Declare a curl-alternative
|
||||
purl() {
|
||||
local p
|
||||
local url="${1:?}"
|
||||
{ [[ "${url:0:8}" == "https://" ]] || [[ "${url:0:7}" == "http://" ]]; } || url="https://${url}"
|
||||
"$(which python3 || which python || which pyton2 || which false)" -c "\
|
||||
local url="${1:?}"
|
||||
{ [[ "${url:0:8}" == "https://" ]] || [[ "${url:0:7}" == "http://" ]]; } || url="https://${url}"
|
||||
"$(which python3 || which python || which pyton2 || which false)" -c "\
|
||||
import urllib.request
|
||||
import sys
|
||||
import ssl
|
||||
@@ -1234,6 +1233,18 @@ surl() {
|
||||
# surl ipinfo.io
|
||||
```
|
||||
|
||||
using Perl, download only:
|
||||
```sh
|
||||
lurl() {
|
||||
local url="${1:?}"
|
||||
{ [[ "${url:0:8}" == "https://" ]] || [[ "${url:0:7}" == "http://" ]]; } || url="https://${url}"
|
||||
perl -e 'use LWP::Simple qw(get);
|
||||
my $url = '"'${1:?}'"';
|
||||
print(get $url);'
|
||||
}
|
||||
# lurl ipinfo.io
|
||||
```
|
||||
|
||||
Using bash, download only:
|
||||
```sh
|
||||
burl() {
|
||||
|
||||
Reference in New Issue
Block a user