Skip to content

Instantly share code, notes, and snippets.

@SjonHortensius
SjonHortensius / systemd-callgroups.sh
Created April 30, 2020 07:39
generate a systemd service SystemCallFilter by specifying a list of syscalls, eg. from strace -c
#!/bin/bash
# generate SystemCallFilter from list of syscalls
#
# run this script, type or paste a list of syscalls and this script will return the required @callgroups
## Sjon Hortensius, 2020
set -ue
# dynamically initialize callgroups
declare -A callgroup
while IFS= read -r line
@SjonHortensius
SjonHortensius / es_dump.go
Last active April 10, 2017 12:17
ElasticSearch Scrolled Search handler in golang, can be used to backup/export a complete server in a configurable output
package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
"strings"
"time"
)