Skip to content

Instantly share code, notes, and snippets.

View lojikil's full-sized avatar
🌊
cantankerous and querulous, he was as the sea to the shore

Logyi, hajnalvédő lojikil

🌊
cantankerous and querulous, he was as the sea to the shore
View GitHub Profile
@lojikil
lojikil / cvss2markdown.py
Last active June 13, 2024 03:49
Filthy hack to convert CVSS 3.0 base to Markdown tables in multiple styles.
import sys
defaults = {
'PR': {'H': 'High (H)', 'L': 'Low (L)', 'N': 'None (N)'},
'A': {'H': 'High (H)', 'L': 'Low (L)', 'N': 'None (N)'},
'C': {'H': 'High (H)', 'L': 'Low (L)', 'N': 'None (N)'},
'I': {'H': 'High (H)', 'L': 'Low (L)', 'N': 'None (N)'},
'AC': {'H': 'High (H)', 'L': 'Low (L)'},
'S': {'C': 'Changed (C)', 'U': 'Unchanged (U)'},
'UI': {'R': 'Required (R)', 'N': 'None (N)'},
@lojikil
lojikil / brewinst.sh
Created July 31, 2016 13:10
backup copy of a single-user `brew` installation
# change to whatever location to where homebrew is installed
if [ -z "$HOMEBREW_HOME" ]; then
export HOMEBREW_HOME=$HOME/homebrew
echo "HOMEBREW_HOME=$HOME/homebrew" >> ~/.profile
fi
# install homebrew for single user
if [ ! -d "$HOMEBREW_HOME" ]; then
mkdir -p $HOMEBREW_HOME && curl -L https://github.com/Homebrew/homebrew/tarball/master | tar xz --strip 1 -C $HOMEBREW_HOME
fi
package main
import (
"fmt"
"os"
"bufio"
"strings"
)
func main() {
@lojikil
lojikil / datasploit-etl.c
Last active August 25, 2018 12:48
converts datasploit text dumps to CSV, consumable by other tools
/* @(#) converts datasploit text dumps to CSV, consumable by other tools
* @(#) copyright 2018 Stefan Edwards, released under ISC license
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <regex.h>
int etlfile(FILE *, regex_t *, regex_t *);
@lojikil
lojikil / analysis.draft.md
Created April 15, 2021 16:49 — forked from MattPD/analysis.draft.md
Program Analysis Resources (WIP draft)