Skip to main content

cPanel Database Import script


This just makes live easier importing databases into cPanel and saves me time. This will create the database using cPanel’s uapi, create database user and password, assign all privelages and then import the database from the file to the newly created database.

Command

Usage: Upload a database to the home directory, run above as cPanel user and replace “filename.sql” with the filename of the database, and dbsuffix with the suffix you want the database to be created on.

Inode Finder


Made to provide breakdowns to customers, Shows the top 10 directories that are using the most amount of files/inodes and prints a total for the account.

Command

Usage: Copy pasta the command and run in terminal within the cPanel user.

IP Lookup


Does an IP lookup to ipinfo.io and finds the geolocation, hostname, city, and a bit more and prints it nicely.
1

Make a directory

You can put this anywhere you like, but for this example we will be putting it under the ~/.local/bin directory
2

Get the script and make it executable

3

Alias dat bitch

4

All done!

All you need to do is run in your terminal ip 1.1.1.1 (of course replacing 1.1.1.1 with the IP you would like to lookup) and it’ll print out some nice info

Traffic Scanner


Tails the domlogs of the server over 30 seconds and collects the IP addresses that make requests, sorts by number of hits and displays them with request urls and user agents

Command

Trafficscan.sh
Usage: Copy pasta and run in terminal

SSL Checker


This script checks a websites SSL certificate and sees if its valid

Example

Usage: ssl <domain> (-v verbose)