This is for begginers in C++ to learn how to use sockets. This (just like the python sniffer) will not capture any passwords (it's still cool though). This saves a significate ammount of data to a log file in the same directory the code is run(log.txt).
To compile simply run this command on your Linux system:
gcc sniffer.c -o sniffer
To run, you must have root privlages:
./sniffer