Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
"strconv"
#!/usr/bin/env python
import glob
RED = "\033[1;31m"
BLUE = "\033[1;34m"
CYAN = "\033[1;36m"
GREEN = "\033[0;32m"
RESET = "\033[0;0m"
BOLD = "\033[;1m"
package main
import (
"bufio"
"encoding/csv"
"encoding/json"
"fmt"
"io"
"os"
"path/filepath"

Make windows (10) great (again)

cmder ConEmu connection string for specific WSL linux app, in case you are running multiple Windows 10 linux distributions. Find UUID from registry.

set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -C~ --distro-guid={UUID} -cur_console:pm:/mnt
FROM debian:stretch
RUN apt-get update && apt-get install -qq -y git build-essential autogen autoconf libtool pkg-config checkinstall python-docutils flex bison libgrok1 librdkafka1 libestr-dev zlib1g-dev uuid-dev libsystemd-dev libgcrypt20-dev liblogging-stdlog-dev libcurl4-gnutls-dev librdkafka-dev libgrok-dev libpcre3-dev libtokyocabinet-dev libglib2.0-dev gnutls-dev libestr-dev && apt-get -y autoremove && apt-get -y autoclean && apt-get clean
ENV INSTALL_PATH /src
RUN mkdir -p $INSTALL_PATH
RUN git clone https://github.com/rsyslog/libfastjson.git \
&& cd libfastjson \
&& git checkout tags/v0.99.8 \
#!/usr/bin/env python3
# pip3 install kafka-python
# pip3 install python-snappy
from kafka import KafkaConsumer
import json
topic = "TOPICNAME"
gid = "MYUNIQUEID"
@markuskont
markuskont / new-cert.lua
Last active December 5, 2018 16:05
Lua script to get suricata alert when newly created TLS certificate is observed on wire. Courtesy of regit - https://github.com/regit
-- courtesy of regit - https://github.com/regit
function init (args)
local needs = {}
needs["tls"] = tostring(true)
needs["flowint"] = {"cert-age"}
return needs
end
function match(args)
notbefore = TlsGetCertNotBefore()
function init (args)
local needs = {}
needs["type"] = "packet"
return needs
end
function setup (args)
name = "hello.log"
filename = SCLogPath() .. "/" .. name
file = assert(io.open(filename, "a"))
# vi: set ft=ruby :
#
$buildSuricata = <<SCRIPT
export DEBIAN_FRONTEND=noninteractive
apt-get update && apt-get build-dep suricata -y
git clone https://github.com/OISF/suricata
cd suricata
git clone https://github.com/OISF/libhtp.git -b 0.5.x
./autogen.sh
[Unit]
Description=scirius daemon
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/usr/share/python/scirius
ExecStart=/usr/share/python/scirius/bin/gunicorn --log-syslog -t 600 -w 4 --bind unix:/tmp/scirius.sock scirius.wsgi:application
Environment=VIRTUAL_ENV=/usr/share/python/scirius
Environment=GIT_PYTHON_GIT_EXECUTABLE=/usr/bin/git