Print details of network interface ( IP address, mac, status etc ) using go language program

$ vim networkInterfaceDetails.go Now, we can compile the go program as, $ go build networkInterfaceDetails.go and execute as, $ ./networkInterfaceDetails 2018/09/04 09:01:23 Index:1 Name:lo addr:127.0.0.1/8, mac: Status : UP 2018/09/04 09:01:23 Index:1 Name:lo addr:::1/128, mac: Status : UP 2018/09/04 09:01:23 Index:3 Name:wlan0 addr:192.168.0.109/24, mac:0c:60:76:61:ce:49 Status : UP 2018/09/04 09:01:23 Index:3 Name:wlan0 addr:fe80::a2ca:2820:a122:7db4/64, mac:0c:60:76:61:ce:49 Status : … Read more

C program to monitor and notify changes in a directory / file using inotify

$ vim notify.c $ gcc -o notify notify.c Now open another terminal and lets create a test directory as, $ mkdir helloworld_dir In the previous terminal, start notify program as, $ ./notify helloworld_dir/ Watching:: helloworld_dir/ Now, go to another terminal and create a test file, $ cd helloworld_dir $ touch hello.txt In this case, the … Read more

WiFi monitor mode and commands to enforce monitor mode in Linux / Ubuntu

Monitor mode, or RFMON (Radio Frequency MONitor) mode, allows a computer with a wireless network interface controller (WNIC) to monitor all traffic received from the wireless network. Monitor mode allows packets to be captured without having to associate with an access point or ad hoc network first. Monitor mode is one of the eight modes … Read more

sniffex – C program to Capture wifi packets using libpcap

libpcap provides functions for user-level packet capture, used in low-level network monitoring. Following program captures the packets from the wireless interface of the device on which the compiled binary will be running. We have compiled this on ubuntu 16.04, and run it on laptop with wifi interface as wlan0, hence it will capture the wifi … Read more