pstsrv: use curl -x
instead of torsocks
This commit is contained in:
parent
699363c409
commit
2e152aa82e
@ -43,18 +43,18 @@ check_runtime()
|
|||||||
|
|
||||||
pst_catbox_moe()
|
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
|
https://catbox.moe/user/api.php
|
||||||
}
|
}
|
||||||
|
|
||||||
pst_ix_io()
|
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()
|
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
|
https://pst.moe/paste
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,10 +75,10 @@ do_upload()
|
|||||||
return $rc
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
torsocks=torsocks
|
tor_flags="-x socks5h://localhost:9050"
|
||||||
while getopts T flag; do
|
while getopts T flag; do
|
||||||
case $flag in
|
case $flag in
|
||||||
T) torsocks= ;;
|
T) tor_flags= ;;
|
||||||
*) usage ;;
|
*) usage ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -90,7 +90,7 @@ fi
|
|||||||
srv=$1
|
srv=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
check_runtime curl $torsocks
|
check_runtime curl ${tor_flags:+tor}
|
||||||
|
|
||||||
url=
|
url=
|
||||||
[ $# -eq 0 ] && set -- -
|
[ $# -eq 0 ] && set -- -
|
||||||
|
Loading…
Reference in New Issue
Block a user