Change cPanel’s email password through command line

This script will help you change any email’s account password without using cPanel, this is done through the command line. It was written in PHP but mostly uses shell commands so I guess it was easier to use elements from both worlds.

Use it at your own risk, this script requires to be executed as root and was done for educational purposes.

Save it as change_password.php and execute it to see how to use it: php change_password.php

PHP Generate Random Passwords

This is a small script written in PHP which will help you to generate N passwords of N length in less than 1ms 😛

Make sure you have PHP installed, then copy this code to a file called randompass.php

Now you have the file don’t forget to make it executable:

How it works? See some examples:

That’s all, use it for what you need, don’t try to break it or find stupid bugs 😛