Skip to content

Instantly share code, notes, and snippets.

@mikaelkall
mikaelkall / terminal_matrix.sh
Created Jun 17, 2021
Matrix in your terminal (Not mine, found it somewhere.)
View terminal_matrix.sh
#!/bin/bash
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@mikaelkall
mikaelkall / psp.yml
Last active Jun 12, 2020
PodSecurityPolicy to Prevent hostPath Mount
View psp.yml
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: developers-psp
spec:
privileged: false
allowPrivilegeEscalation: false
hostNetwork: false
hostPID: false
hostIPC: false
View htb
curl -sd '{"key":"value"}' https://www.hackthebox.eu/api/invite/generate | jq .data.code |tr -d '"' |base64 -d | xargs
Update this was shorter.
curl -s -X POST https://www.hackthebox.eu/api/invite/generate | egrep -o "[a-Z0-9]+\=" |base64 -d
View forensics
# Dump VM meory on Virtualbox
vboxmanage debugvm dumpvmcore Windows10 --filename windows10.img
volatility -f windows10.img vboxinfo
@mikaelkall
mikaelkall / pgp.txt
Last active Mar 3, 2018
pgp public key
View pgp.txt
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: https://keybase.io/download
Version: Keybase Go 1.0.39 (linux)
xsFNBFpjsvcBEAC3J+/YcN6F2Wvf8pzbiH2SF96w7z2Thg5rz9GgfCxtHbNS+X45
ONvFgD272ppOt6hPz/7iMeVlHDWkrlmKOl6BN16eLl31zoYFSJhy5jp7Nqs6bupz
2Q8B3JWkGPUv47cK2X0lm6eRIUm1QPHUz0FUtHy+4N+oPgSh4aIUKbzBxuI5Niv8
7AV7rol16hGWmwfvJsED9IpN0ytjXCDsLovGpHi6/Tp+jlILNJ4+mDgORTGP0Fmi
l4MTxTgX24RvXeMurOKp9Pgkn1R8sB7WWL7+jigMqzWvUyW61wbtDNmfkU8knwFz
YvsCJtJWlEsGw3NtUpLZMRkvj5UdbYa1dmvN16uDmNuiIPuGKO/fFWLWL4d7X1eE
View keybase.md

Keybase proof

I hereby claim:

  • I am mikaelkall on github.
  • I am mikaelkall (https://keybase.io/mikaelkall) on keybase.
  • I have a public key whose fingerprint is A15F 4F1B 0E7E 6342 7A5D 57D3 A2FB 1DFE 298A 2EF6

To claim this, I am signing this object:

@mikaelkall
mikaelkall / sysadmin.md
Last active May 28, 2021
Documents good sysadmin solutions and oneliners to problems.
View sysadmin.md

Scp files between two servers without the need to first copy the file locally.

scp -3 'username@server1:/home/user/filename.tar.gz' username@server2:/home/user/

Create point to point tunnel between two servers over ssh with a tun interface to avoid the need to open a firewall.