This file contains hidden or 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
| /* | |
| !!!------ | |
| This is an updated code from Designing BSD Rootkits 1st Edition (Joseph Kong, No Starch Press). The code displayed here is original except where noted. | |
| !!!------ | |
| */ | |
| #include <sys/types.h> | |
| #include <sys/param.h> |
This file contains hidden or 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 | |
| install_precommit_package() { | |
| if command -v pre-commit &> /dev/null | |
| then | |
| echo "pre-commit is already installed." | |
| else | |
| echo "Installing pre-commit" | |
| pip install pre-commit | |
| fi |
This file contains hidden or 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 <stdio.h> | |
| #include <unistd.h> | |
| #include <netinet/ip.h> | |
| #include <arpa/inet.h> | |
| #include <sys/socket.h> | |
| #include <ifaddrs.h> | |
| #include <string.h> | |
| #include <netdb.h> | |