From 2e152aa82e59fdcfdb37ac1601997f7be9c7de53 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 3 Dec 2021 18:20:02 +0000 Subject: [PATCH] pstsrv: use `curl -x` instead of `torsocks` --- bin/pstsrv.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/pstsrv.sh b/bin/pstsrv.sh index fc55e13..b1fa49a 100644 --- a/bin/pstsrv.sh +++ b/bin/pstsrv.sh @@ -43,18 +43,18 @@ check_runtime() pst_catbox_moe() { - $torsocks curl -F "reqtype=fileupload" -F "fileToUpload=@$1" \ + curl $tor_flags -F "reqtype=fileupload" -F "fileToUpload=@$1" \ https://catbox.moe/user/api.php } pst_ix_io() { - $torsocks curl -F "f:1=@$1" http://ix.io/ + curl $tor_flags -F "f:1=@$1" http://ix.io/ } pst_pst_moe() { - $torsocks curl -F "content=<$1" -F "expire_after=86400" \ + curl $tor_flags -F "content=<$1" -F "expire_after=86400" \ https://pst.moe/paste } @@ -75,10 +75,10 @@ do_upload() return $rc } -torsocks=torsocks +tor_flags="-x socks5h://localhost:9050" while getopts T flag; do case $flag in - T) torsocks= ;; + T) tor_flags= ;; *) usage ;; esac done @@ -90,7 +90,7 @@ fi srv=$1 shift -check_runtime curl $torsocks +check_runtime curl ${tor_flags:+tor} url= [ $# -eq 0 ] && set -- -