File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -370,7 +370,18 @@ transfer() {
370
370
[[ ! -t 0 ]] && { curl " ${opts[@]} " " -" " https://${HS_TRANSFER_PROVIDER} /${1} " ; return ; }
371
371
[[ ! -e " $1 " ]] && { echo -e >&2 " Not found: $1 " ; return 255; }
372
372
[[ -d " $1 " ]] && { (cd " ${1} /.." && tar cfz - " ${1##*/ } " )| curl " ${opts[@]} " " -" " https://${HS_TRANSFER_PROVIDER} /${2:- ${1##*/ } .tar.gz} " ; return ; }
373
- curl " ${opts[@]} " " $1 " " https://${HS_TRANSFER_PROVIDER} /${2:- ${1##*/ } } "
373
+ curl " ${opts[@]} " " $1 " " https://${HS_TRANSFER_PROVIDER} /${2:- ${1##*/ } } " || echo -e >&2 " Try ${CDC} tb <file>${CN} instead [WARNING: not encrypted]."
374
+ }
375
+
376
+ tb () {
377
+ _hs_dep nc || return
378
+
379
+ [ $# -eq 0 ] && {
380
+ [ -t 0 ] && { echo -e >&2 " Usage:\n tb <file>" ; return 255; }
381
+ nc termbin.com 9999
382
+ return
383
+ }
384
+ nc terbmin.com 9999 < " $1 "
374
385
}
375
386
376
387
# SHRED without shred command
@@ -562,7 +573,7 @@ _hs_enc_init() {
562
573
[ -n " $HS_TOKEN " ] && return
563
574
[ -n " $GS_TOKEN " ] && { HS_TOKEN=" $GS_TOKEN " ; return ; }
564
575
command -v openssl > /dev/null || return
565
- command -v hostnamectl > /dev/null && HS_TOKEN=" $( hostnamectl | grep -Fm1 ' Machine ID ' | openssl sha256 -binary | openssl base64) "
576
+ [ -f " /etc/machine-id " ] && HS_TOKEN=" $( openssl sha256 -binary < " /etc/machine-id " | openssl base64) "
566
577
[ -z " $HS_TOKEN " ] && HS_TOKEN=" $( openssl rand -base64 24) "
567
578
HS_TOKEN=" ${HS_TOKEN// [^a-zA-Z0-9]/ } "
568
579
HS_TOKEN=" ${HS_TOKEN: 0: 16} "
You can’t perform that action at this time.
0 commit comments