bash (2)


Get MySQL Passwords from Plesk (bash/command line)

Quick bash script to grep out MySQL passwords from Plesk’s PSA database. Script: [code language=”bash”]#!/bin/bash clear; echo "Searching MySQL user tables for: $1"; echo mysql psa -uadmin -p`cat /etc/psa/.psa.shadow` -e ‘SELECT domains.name AS domain_name, data_bases.name AS database_name, db_users.login, accounts.password FROM data_bases, db_users, domains, accounts WHERE data_bases.dom_id = domains.id AND db_users.db_id = data_bases.id AND db_users.account_id = […]




Get Protected Directory Logins from Plesk

Quick bash script to grep out protected directory logins from Plesk’s PSA database. Script: [code language=”bash”]#!/bin/bash clear; you=`who am i | cut -d’ ‘ -f1`; echo -e "Hello $you, looking in the protected dirs password list for \033[33;1m$1\033[0m eh?"; echo mysql psa -uadmin -p`cat /etc/psa/.psa.shadow` -e ‘select pd.login, a.password, d.name, dirs.path from accounts a, pd_users […]