command line (5)

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,, dirs.path from accounts a, pd_users […]

tangled up terminal output!?

ever cat a binary file and ended up with a terminal looking a complete corrupted mess? me too. perl to the rescue. again. [code language=”perl”]perl -e ‘print "x0f"'[/code] sorted.


using dig is very simple, and can provide some rather useful information about a domain. useful for finding out where a domain may be hosted, you can also see nameservers, mx records, ttl. the standard output is quite full of information: [code gutter=”false”] dig ; <<>> DiG 9.8.1-P1 <<>> ;; global options: +cmd […]

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

change email password

how to change a user’s email password from the command line. much quicker that waiting for the (sometimes) slow-ass Plesk web interface to reload itself for such a simple change. [code]/usr/local/psa/bin/mail -u -passwd ‘NeWPassWorD!’;[/code]