Tag Archives: linux

Shell Script: Check If Weekend

I have some shell scripts that will perform certain actions only on a weekend (Saturday or Sunday). There are two ways to solve the “is it a weekend” logic.

K, Ki Key Conversion Tool for AUC / HLR

I have been looking for a tool to encrypt Ki values (into eKi) using AES encryption. Ki is a 128-bit value used in authenticating the SIMs on the mobile network.

Generate Random Password on Linux

Linux has all the tools you need to generate a random password. This can be accomplished by a special file /dev/random, that serves as a random number generator.

How to Completely Wipe Hard Disk Contents

If you are planning to discard your old hard disk, make sure that they do not contain any valuable information when they head out of your door. The last thing on your mind is the potential of having your identity stolen from sensitive information stored in that hard disk.

How to Get the Home Directory of an User

To perform disk usage monitoring of users on a UNIX system, you will, first of all, need to determine the home directories of the users. You might ask, “Aren’t all the user home directories found under /home?”. Well, typically yes, but it’s not always true.

How to Perform Reverse DNS Lookup

unix linux

Everyone knows that DNS is used to translate hostnames to IP addresses, but do you know that DNS can also be used to retrieve the domain name when the IP address is known?

Transfer Files Using Netcat

unix linux

Netcat is often known as the swiff army knife for TCP/IP. It’s features include but not limited to UDP/TCP port scanning, file transfers, tunneling of UDP over TCP, port forwarding and so on.

How to Intrepret Shadow Passwords in UNIX

In modern UNIX and Linux systems, user passwords are encrypted and stored in the /etc/shadow file. On BSD systems, the passwords are kept in the /etc/master.passwd file. The encrypted password field in the file contains more than just the encrypted password, it contains additional information.