Unix / Linux: Run Cron Jobs on Last Day of Month

unix linux

Cron jobs can be scheduled based on minute, hour, day of month, month or by the day of the week. Flexible as it may seem, there is actually no simple way to schedule a job to be run on the last day of every month.

Android: Dial Number From ADB Shell Trick

android

Do you know that you can make your Android phone dial a number directly from the ADB shell? I am not sure if this trick will have any practical use, but this tutorial will show you how this can be done. No rooting is required.

Shell Script: Get Epoch Time

shell script

Unix time, POSIX time or Epoch time is defined as the number of seconds that have elapsed since 00:00:00 January 1, 1970 UTC. There are a few methods to retrieve the Epoch time on Unix and Linux.

Linux: Swap Usage per Process

unix linux

You run the free command on a Linux machine and it reports that swap space is being used. How do you determine if a process is using swap memory? Or how do you determine which processes are using swap memory? The short answer is to use the procfs or /proc filesystem.

Linux: Hide Processes from Other Users

unix linux

If you are into Linux OS hardening, then one of the ways to improve security is to hide the display of running processes and their arguments from other users. This feature is available if you are on a Linux kernel version of 3.2 or above that supports the new hidepid mount option for procfs or /proc filesystem.

UNIX / Linux: File Permissions in Octal

unix linux

To set file permissions using the chmod command, we can specify the permissions in either numeric mode or symbolic mode. But when we want to get the file permissions, most often with the ls -l command, we are normally only given a printout using the symbolic mode.

Extract WhatsApp Password on Android

WhatsApp uses a customised version of XMPP (Extensible Messaging and Presence Protocol) as the communication protocol. Upon installation, it creates a user account using one’s phone number (with country code prefix) as the username (Jabber ID: [phone number]@s.whatsapp.net). A password is generated using an unknown algorithm on the server end and sent to the client. Previously the password was derived from the phone’s IMEI or the WiFi MAC address.

Android ADB Backup, Extract, Restore

android

The Android backup file created using the ADB command is a compressed tar file. Compression is done using the zlib compression library and the DEFLATE compression algorithm. If a password is entered during the backup process, the file is encrypted, else it is only compressed. In this article, we will learn how to perform ADB backups, extract ADB backups and restore or repack ADB backups.

SSH Port Forwarding for TCP and UDP Packets

network

SSH port forwarding creates a secure tunnel between the client and server computers. As the connection is encrypted, SSH tunneling is useful for transmitting unencrypted (or non secure) protocols such as POP3, VNC, RDT, etc. SSH port forwarding also allows you to connect computers from two different networks that are not able to communicate with each other directly. In this article, we are going to see how we can use SSH tunnels to forward TCP and UDP packets.