This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/socket.h> | |
#include <netinet/tcp.h> | |
#include <unistd.h> | |
#include <netdb.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <iostream> | |
#include <cerrno> | |
#include <cstdlib> | |
#include <cstdio> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <asm/types.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <netinet/in.h> | |
#include <linux/netlink.h> | |
#include <linux/rtnetlink.h> | |
#include <malloc.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <arpa/inet.h> | |
#include <getopt.h> | |
#include <sys/types.h> | |
static unsigned char short_opts[] = "i:n:"; | |
static struct option long_options[] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* g++ pingxx.cxx -std=c++11 -lpthread | |
*/ | |
#include <iostream> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <cerrno> | |
#include <cstring> | |
#include <thread> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* $ sudo apt-get install libjsoncpp-dev | |
* $ g++ json_dir_tree.cpp -std=c++11 -ljsoncpp | |
* $ ./a.out $(pwd) | |
* Directory tree output in json format | |
* | |
*/ | |
#include <jsoncpp/json/json.h> | |
#include <dirent.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Detects interface plug or removal with given name, starts forks wpa_supplicant accordingly | |
* g++ wpa_forker.cpp -std=c++11 -lpthread | |
* | |
*/ | |
#include <iostream> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <csignal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* reads and parses /proc/net/route | |
* | |
* $ g++ routingtableparser.cpp -std=c++11 | |
* should not require root priviledges | |
* | |
*/ | |
#include <iostream> | |
#include <sstream> | |
#include <fstream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REPOSITORY_DIRS=$(find . -type d -name '.git' | xargs -n 1 dirname) | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
clean=true | |
for repo in $REPOSITORY_DIRS |