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
## Configure bro to write JSON logs | |
mkdir -p /opt/bro/share/bro/site/scripts | |
sudo tee /opt/bro/share/bro/site/scripts/json-logs.bro << EOF | |
@load tuning/json-logs | |
redef LogAscii::json_timestamps = JSON::TS_ISO8601; | |
redef LogAscii::use_json = T; | |
EOF | |
sudo tee -a /opt/bro/share/bro/site/local.bro << EOF |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="text" encoding="utf-8"/> | |
<xsl:template match="/*[node()]"> | |
<xsl:text>{</xsl:text> | |
<xsl:apply-templates select="." mode="detect" /> | |
<xsl:text>}</xsl:text> | |
</xsl:template> | |
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 <libproc.h> | |
#include <sys/proc_info.h> | |
static const char* USAGE = "Usage: %s pid\n"; | |
static const char* INVALID_PID = "Invalid pid: %s\n"; | |
static const char* UNABLE_TO_GET_PROC_FDS = "Unable to get open file handles for %d\n"; | |
static const char* OUT_OF_MEMORY = "Out of memory. Unable to allocate buffer with %d bytes\n"; |
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
#!/usr/bin/env python3 | |
import http.server | |
import socketserver | |
PORT = 8000 | |
Handler = http.server.SimpleHTTPRequestHandler | |
Handler.extensions_map.update({ | |
'.wasm': 'application/wasm', |