Category: Uncategorized

Find machine/host names on the network

Firstly we try to resolve the PTR records in DNS for the specified IP addresses.
It sends nothing to the hosts so there is no guarantee if it is really connected or turned on but we can get the actual DNS map including those devices which are within their DHCP lease timeout.

nmap -sn -sL

Then we scan for hosts really connected sending ARP requests. The disadvantage is that it only works on your subnet.

nmap -sP

or if we want to remove useless lines:

nmap -sP | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}"

output example:

cesare@cesare-desktop:~$ nmap -sP | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}"
 Nmap scan report for router (
 Nmap scan report for vpnudp (
 Nmap scan report for vpntcp (
 Nmap scan report for desktop (
 Nmap scan report for unas (
 Nmap scan report for pi2 (
 Nmap scan report for cloud (

or for a better output:

nmap -sP | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d ' ' -f5-
router (
vpnudp (
vpntcp (
desktop (
unas (
cloud (

How to install .ttf fonts in Xubuntu

Fonts only for your user

mkdir ~/.fonts
cp <myfont.ttf> ~./fonts/

Or system wide fonts

cp <myfont.ttf> /usr/share/fonts/truetype/

Then reload the fonts cache

sudo fc-cache -f

No frills DVD ripping tool

I found out an incredible useful utility to copy a DVD to hard disk.
Vobcopy copies DVD .vob files to harddisk, decrypting (if you have libdvdcss installed) them on the way (thanks to libdvdread and libdvdcss) and merges them into file(s) with the name extracted from the DVD. It checks for enough free space on the destination drive and copies into files of 2GB size into the current working directory.

apt-get install vobcopy

To start ripping:

vobcopy -l /dev/sr0

in Xubuntu 14.04 the optical device is /dev/sr0, the option -l (large-file) avoids the 2GB split so that we will get a unique single file .vob

Virtualbox: convert VDI/VMDK to physical disk and viceversa

VirtualBox command-line interface (VBoxManage) provides an easy way to convert VDI/VMDK disk images to the raw format and vice-versa.


Convert VDI to raw image, be sure to have enough room on disk:

vboxmanage clonehd disk.vdi disk.raw --format RAW


Convert raw to the VDI format (VirtualBox):

VBoxManage convertdd disk.raw disk.vdi --format VDI


Convert raw to the VMDK format (VMware):

VBoxManage convertdd disk.raw disk.vmdk --format VMDK


Convert between VDI/VMDK formats:

VBoxManage clonehd disk.vdi disk.vmdk --format VMDK
VBoxManage clonehd disk.vmdk disk.vdi --format VDI


To write  the raw image to the physical disk

sudo dd if=disk.raw of=/dev/sdx bs=8MB

To monitor what dd  is doing we can type from another terminal:

watch -n2 'sudo kill -USR1 $(pgrep ^dd)'


WordPress Themes