Files
crackhead_proxy/.slrp/bin/parse_pool_json.sh
T
2024-04-01 14:58:20 -06:00

16 lines
378 B
Bash

SLRP=$PWD/.slrp
PROXY_FILE=$SLRP/proxies.txt;
TEMP=$SLRP/proxies.tmp;
while true;
do
curl -s http://localhost:8089/api/pool | jq '.Records[] | .Proxy' | sed s/\"//g > $TEMP;
if [ ! -s $TEMP ]
then
echo "Nothing at the moment"; sleep 2;
else
cat $TEMP > $PROXY_FILE;
echo "updated- sleeping 2 seconds..."; sleep 2;
cat $PROXY_FILE;
fi
done;