ftp (2)


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 […]

Read more...



ncftp: getting and putting files over ftp

getting files and directories use ncftp to connect to a remote server and get a directory and everything in it. [code]ncftpget -R -u $FTP_USER $FTP_SERVER $LOCAL_DIR $REMOTE_SERVER_DIR[/code] putting files and directories to upload a directory to a remote server: [code]ncftpput -R -u $FTP_USER $FTP_SERVER $REMOTE_SERVER_DIR $LOCAL_DIR[/code] a few flags -R recursively copy directories -u the […]

Read more...