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
// Needs to be linked with BSD message digest library libmd (-lmd) | |
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <sys/types.h> | |
#include <sysexits.h> | |
#include <sha1.h> | |
#include <md5.h> | |
typedef unsigned char u_char; |
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
openvpn_virtual_server_defaults: &openvpn_virtual_server_defaults | |
port: 1194 | |
scheduler: wlc | |
type: tun | |
method: NAT | |
control_cipher: AES-256-GCM | |
control_mac: SHA384 | |
tunnel_mtu: 1400 | |
# Renegotiate after half a day | |
renegotiation_interval: 43200 |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <security/pam_appl.h> | |
#include <security/pam_modules.h> | |
struct handler { | |
int handler_type; | |
int (*func)(pam_handle_t *pamh, int flags, int argc, char **argv); | |
int actions[_PAM_RETURN_VALUES]; |
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
import codecs | |
from scapy.all import BOOTP, DHCP, Ether, IP, UDP, sendp | |
def do_request(iface, hwaddr, ip): | |
pkt = Ether(src=hwaddr, dst="ff:ff:ff:ff:ff:ff") | |
pkt /= IP(src="0.0.0.0", dst="255.255.255.255") | |
pkt /= UDP(sport=68, dport=67) | |
pkt /= BOOTP( | |
chaddr=codecs.decode(hwaddr.replace(':', ''), 'hex'), |
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
============================= test session starts ============================== | |
platform linux -- Python 3.6.3, pytest-3.3.1, py-1.5.0, pluggy-0.6.0 | |
rootdir: /tmp/tmp.qJ0GaB9IXd/build, inifile: | |
plugins: cov-2.5.1 | |
collected 5 items | |
test.py ..... [100%] | |
==================================== PASSES ==================================== | |
_________________________________ Test1.test_1 _________________________________ |
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
# SECRET must be a bytes object | |
SECRET = b"correcthorsebatterystaple" | |
TARGET_DIR = "/var/www/htdocs/my-site" | |
REPO_DIR = "/var/lib/my-repo.git" |