Get FTP Passwords from Plesk

Quick bash script to grep out ftp passwords from Plesk’s PSA database.

Script:

[code language=”bash”]#!/bin/bash

clear;

echo "Searching the FTP password list for: $1";
echo

mysql psa -uadmin -p`cat /etc/psa/.psa.shadow` -e ‘SELECT REPLACE(sys_users.home,"/home/httpd/vhosts/","") AS domain, sys_users.login,accounts.password FROM sys_users LEFT JOIN accounts on sys_users.account_id=accounts.id ORDER BY sys_users.home ASC’ | grep $1;[/code]

Usage:

[code gutter=”false”][root@mail bin]# grepftp searchfordomain[/code]

Output:

[code gutter=”false”]Searching the FTP password list for: xcalib

/var/www/vhosts/xcalibrationtechtest.com test testp455
[root@mail bin]#

[/code]




No Comments


No comments yet.



Leave a Reply

Your email address will not be published. Required fields are marked *