How to Update Nmap scanner database

Nmap (or Network Mapper) is probably the most popular network mapper around. However if you are running a very stable long-term support server, there are chances that your nmap database installation isn’t keep up to that.

Updating Nmap database

Nmap detection database consists of these files:

  • nmap-os-db
  • nmap-mac-prefixes
  • nmap-payloads
  • nmap-protocols
  • nmap-rpc
  • nmap-service-probes
  • nmap-services

What you need to do is to download  these files from Nmap Github project  page and copy it to /usr/share/nmap/ folder.

Alternatively, you can use this script ‘’ which I’ve created based on this gist.

Copy all the files to /usr/share/nmap/ once all of them have been downloaded.

(y) (y)


Automatically generate gallery with llgal

LLGAL (llgal) is an tool which can automatically generate gallery on your website. llgal is handy if you want to generate photo album out of photos organized in directories/folders.

Running llgal from the console is easy as typing the llgal command at the root directory of your photos.

llgal --exif --li -L -R --title "Album Name" --sx 960 --sy 720 --tx 250 --ty 150

In Ubuntu, the gallery’s theme is located in “/usr/share/llgal/” directory and my customized theme which supports mobile phone can be downloaded here: (mobile enabled)

llgal Screenshot

Personally, i use llgal to generate cctv tiles automatically on my Ubuntu server from which my TP-LINK NC450 and NC250 IP camera uploads through its FTP functions when it detects movements/motion.



llgal can be installed on Ubuntu by running this command

apt -y install llgal

Alternatively you can compile and install llgal directly from its repository

crack zip password with cracker-ng

Cracking zip password can be made easy with cracker-ng


Installation is simple, assuming you use Debian, Ubuntu or any other similar operating system :

$ git clone
$ cd cracker-ng

# For testers and contributors, always work with on the devel branch:
$ git checkout devel

$ make


Cracking is relatively simple, assuming you have downloaded the awesome Crackstation’s wordlist dictionary.

$ zipcracker-ng -f -w crackstation-human-only.txt

Additionally zipcracker-ng can also be used with other brute-forcing cracking tool such as john and

$ john --incremental --stdout | zipcracker-ng -f FILE -

$ crunch 1 8 -f charset.lst lalpha | zipcracker-ng -f FILE -

Screenshot of zipcracker-ng in action


Nano command for search and replace

I spend most of my time with headless Ubuntu server or Raspbian (a Debian derivatives distro for Raspberry Pi).

So naturally I use ‘nano’ to edit various configurations files and Python Scripts.

Here are several ‘nano’ shortcuts for your references


  • CTRL-W : search text string
  • ALT-W : repeat search
  • ALT-B : Backward search

Search and Replace

  • CTRL-\  search and replace

Cut, Copy and Paste

  • CTRL-K : Cut text
  • CTRL-V : Paste text
  • M-^ or ESc-^ : Copy text

Save and Exit

  • CTRL-O : Save file
  • CTRL-X : Exit nano

Indentation (useful for Python)

  • M-} :  Indent Right
  • M-{ : Indent Left (unindent)


That’s all which I can share for today…


A Bash script for sending telegram messages in Linux

Would it be nice to be able to receive notification from your Linux system in Telegram?


I’ve come up with a rudimentary bash script which lets you integrate the telegram-cli into your own script which is useful for sending messages or notification within automated process to your Telegram account.

The bash script is very useful when you want to send notification to your Telegram account. Example usage: notifying you instantly whenever a backup has been completed or whenever somebody logged into your system or if there’s a brute-force attempt to log into your SSH. Basically anything that you can imagine!

First Step: Install telegram-cli

The first step is to install the telegram-cli client on your Linux system. You may choose to:

  1. Build it on your own – using source code, or
  2. Install telegram-cli from *.deb (Ubuntu LTS only)

IMPORTANT: Please read on how to initialize and sign-in the telegram-cli and key in the required telegram “CODE” in your phone.

Second Step: Copy script to /usr/local/bin

You may copy this telegram bash script and chmod it to be executed from command line (up to you).

Download the script at:

# telegram-cli bash script r0.1
# change 'to' to your own  Telegram account name
# by =  Mohammad Hafiz bin Ismail  []
# url=

## Replace 'to' with your account name


function show_usage {

 echo "Usage $0 [message]"

if [ $# -lt 1 ]

telegram-cli -W -e "msg $to $1"

IMPORTANT: Do not forget to “chmod a+x” the “” script.
IMPORTANT: Change the “to” variable in the script to match your own Telegram username.

Third Step: Using the script

Using the is easy!

Once you’ve logged in and initialized your telegram-cli application. You only need to execute the “” to send instant messages to your Telegram account!

Just do this

wget -c
cp /usr/local/bin/

Then chmod it, to make it executable,

sudo chmod a+x  /usr/local/bin/

IMPORTANT: Change the “to” variable in the script to match your own Telegram username.

sudo nano /usr/local/bin/

To test your telegram script, just make sure you’ve logged into Telegram and telegram-cli, and have entered the correct activation “CODE”. Read Step 1, if you are unsure.

Then you may try out the script "this is my message"

To send telegram message with timestamp type: "`date -I` : this is a message with timestamp"

What should I do next?

Use your imagination! You can integrate this script in crontab, or put it inside another another bash script or conditional operation, or even launch it from a web application, the potential is limitless.

Happy trying!