apt-get install dnsmasq pxelinux syslinux-common syslinux-efi
mkdir /srv/tftpboot
ln -s /usr/lib/PXELINUX/pxelinux.0 /srv/tftpboot/
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 "logstream.hpp" | |
#include <chrono> | |
#include <ctime> | |
#include <mutex> | |
#include <thread> | |
using namespace std; | |
unsigned int thread_id() { | |
static unsigned int idx = 0; |
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
# Suricata rule lexer/parser | |
# | |
# http://www.dabeaz.com/ply/ply.html | |
# https://suricata.readthedocs.io/en/latest/rules/intro.html | |
# | |
# TODO Perhaps a better approach is to isolate the signature parsing code from the suricata source | |
# and create bindings for higher-level languages around that isolated code | |
# See https://github.com/OISF/suricata/tree/master/src/detect-parse.{c,h} SigParse() | |
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
import collections, datetime, threading, time | |
class MetricsThread(threading.Thread): | |
''' | |
Thread-safe metrics storage that calculates rate of change using linear regression (ie line-fitting). | |
Values can be stored by (external) increment calls and/or by periodic callback functions. | |
Keyword arguments: | |
callbacks -- metrics to be also determined periodically via callbacks, |
NewerOlder