mirror of
https://github.com/cytopia/devilbox.git
synced 2025-04-12 13:27:50 +00:00
Use correct hostnames in check instead of 127.0.0.1
This commit is contained in:
parent
d4688be7e2
commit
ff81e6b897
@ -72,16 +72,16 @@ fi
|
||||
|
||||
printf "[TEST] Adminer MySQL login"
|
||||
# 1st Try
|
||||
if ! curl -sS "localhost${URL}?server=127.0.0.1&username=root" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
if ! curl -sS "localhost${URL}?server=mysql&username=root" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
# 2nd Try
|
||||
sleep 1
|
||||
if ! curl -sS "localhost${URL}?server=127.0.0.1&username=root" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
if ! curl -sS "localhost${URL}?server=mysql&username=root" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
# 3rd Try
|
||||
sleep 1
|
||||
if ! curl -sS "localhost${URL}?server=127.0.0.1&username=root" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
if ! curl -sS "localhost${URL}?server=mysql&username=root" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
printf "\r[FAIL] Adminer MySQL login\n"
|
||||
curl -sS "localhost${URL}?server=127.0.0.1&username=root" || true
|
||||
curl -sSI "localhost${URL}?server=127.0.0.1&username=root" || true
|
||||
curl -sS "localhost${URL}?server=mysql&username=root" || true
|
||||
curl -sSI "localhost${URL}?server=mysql&username=root" || true
|
||||
exit 1
|
||||
else
|
||||
printf "\r[OK] Adminer MySQL login (3 rounds)\n"
|
||||
@ -100,16 +100,16 @@ fi
|
||||
|
||||
printf "[TEST] Adminer PgSQL login"
|
||||
# 1st Try
|
||||
if ! curl -sS "localhost${URL}?pgsql=127.0.0.1&username=postgres" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
if ! curl -sS "localhost${URL}?pgsql=pgsql&username=postgres" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
# 2nd Try
|
||||
sleep 1
|
||||
if ! curl -sS "localhost${URL}?pgsql=127.0.0.1&username=postgres" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
if ! curl -sS "localhost${URL}?pgsql=pgsql&username=postgres" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
# 3rd Try
|
||||
sleep 1
|
||||
if ! curl -sS "localhost${URL}?pgsql=127.0.0.1&username=postgres" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
if ! curl -sS "localhost${URL}?pgsql=pgsql&username=postgres" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
printf "\r[FAIL] Adminer PgSQL login\n"
|
||||
curl -sS "localhost${URL}?pgsql=127.0.0.1&username=postgres" || true
|
||||
curl -sSI "localhost${URL}?pgsql=127.0.0.1&username=postgres" || true
|
||||
curl -sS "localhost${URL}?pgsql=pgsql&username=postgres" || true
|
||||
curl -sSI "localhost${URL}?pgsql=pgsql&username=postgres" || true
|
||||
exit 1
|
||||
else
|
||||
printf "\r[OK] Adminer PgSQL login (3 rounds)\n"
|
||||
@ -125,19 +125,24 @@ fi
|
||||
###
|
||||
### Test Adminer MongoDB login
|
||||
###
|
||||
DISABLED_VERSIONS=("7.3")
|
||||
if [[ ${DISABLED_VERSIONS[*]} =~ ${PHP_VERSION} ]]; then
|
||||
echo "Skipping Adminer Mongo login test for PHP 7.3"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf "[TEST] Adminer Mongo login"
|
||||
# 1st Try
|
||||
if ! curl -sS "localhost${URL}?mongo=127.0.0.1&username=" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
if ! curl -sS "localhost${URL}?mongo=mongo&username=" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
# 2nd Try
|
||||
sleep 1
|
||||
if ! curl -sS "localhost${URL}?mongo=127.0.0.1&username=" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
if ! curl -sS "localhost${URL}?mongo=mongo&username=" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
# 3rd Try
|
||||
sleep 1
|
||||
if ! curl -sS "localhost${URL}?mongo=127.0.0.1&username=" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
if ! curl -sS "localhost${URL}?mongo=mongo&username=" | tac | tac | grep -Eiq "Database.+Collation.+Tables"; then
|
||||
printf "\r[FAIL] Adminer Mongo login\n"
|
||||
curl -sS "localhost${URL}?mongo=127.0.0.1&username=" || true
|
||||
curl -sSI "localhost${URL}?mongo=127.0.0.1&username=" || true
|
||||
curl -sS "localhost${URL}?mongo=mongo&username=" || true
|
||||
curl -sSI "localhost${URL}?mongo=mongo&username=" || true
|
||||
exit 1
|
||||
else
|
||||
printf "\r[OK] Adminer Mongo login (3 rounds)\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user