27 lines
866 B
Bash
Executable File
27 lines
866 B
Bash
Executable File
#!/bin/bash
|
|
################################################################################
|
|
# Author: Fred (support@qo-op.com)
|
|
# Version: 0.1
|
|
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
|
################################################################################
|
|
|
|
curl https://g1.duniter.org/wot/members > "./members.json"
|
|
total=$(cat "./members.json" | jq '.results' | jq length)
|
|
|
|
|
|
# Forever Loop
|
|
while :
|
|
do
|
|
|
|
member=$((RANDOM % $total))
|
|
|
|
uid=$(cat "./members.json" | jq ".results[$member].uid" | sed s/\"//g)
|
|
pubkey=$(cat "./members.json" | jq ".results[$member].pubkey" | sed s/\"//g)
|
|
test=$(curl https://g1pod.madeinzion.org/user/profile/${pubkey} | jq '._source.avatar._content')
|
|
if [[ $test != null ]]; then
|
|
echo "$pubkey $uid" >> /tmp/qrcode.scan
|
|
sleep 45
|
|
fi
|
|
sleep 5
|
|
done
|