|
|
|
@ -19,10 +19,9 @@ until [[ $ALL =~ 'TW_1' ]]; do |
|
|
|
ALL=$(wget -qO- --header="cookie: $TOKEN" https://tcp$STACK.ping.pe/ajax_getPingResults_v2.php?stream_id=$STREAM_ID) |
|
|
|
ALL=$(wget -qO- --header="cookie: $TOKEN" https://tcp$STACK.ping.pe/ajax_getPingResults_v2.php?stream_id=$STREAM_ID) |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo -e "地方\tISP\t\t状态" |
|
|
|
echo -e "地方\tISP\t状态" |
|
|
|
|
|
|
|
for ((i=0;i<${#NODE_ID[@]};i++)); do |
|
|
|
for ((i=0;i<${#NODE_ID[@]};i++)); do |
|
|
|
RESULT[i]=$(echo $ALL | python3 -m json.tool | grep -A 2 ${NODE_ID[i]} | grep result | sed "s#[\":, ]##g") |
|
|
|
RESULT[i]=$(echo $ALL | python3 -m json.tool | grep -A 2 ${NODE_ID[i]} | grep result | sed "s#[\":, ]##g") |
|
|
|
RESULT[i]=${RESULT[i]:-'result1'} |
|
|
|
RESULT[i]=${RESULT[i]:-'result1'} |
|
|
|
echo -e "${NODE_ZH[i]}\t$(eval echo "\$${RESULT[i]}")" |
|
|
|
echo -e "${NODE_ZH[i]}\t\t$(eval echo "\$${RESULT[i]}")" |
|
|
|
done |
|
|
|
done |
|
|
|
|