Skip to content

Instantly share code, notes, and snippets.

View munsiwoo's full-sized avatar

Siwoo Mun munsiwoo

View GitHub Profile
@munsiwoo
munsiwoo / Dockerfile
Created March 4, 2023 08:38
Dockerfile sample (php:8.1-apache)
FROM php:8.1-apache
ENV MYSQL_HOST=localhost \
MYSQL_USER=admin \
MYSQL_PASS=password \
MYSQL_DB=dbname
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
@munsiwoo
munsiwoo / mun.sh
Last active December 18, 2020 08:55
php compile and run - sh
#!/bin/bash
# data: 2019-01-29
# made by munsiwoo
echo php compile and run
PHP_PATH="/php/php-7.0.30"
if [ -f /usr/local/bin/php ]; then
rm -rf /usr/local/bin/php
fi
@munsiwoo
munsiwoo / html_entities.py
Last active December 17, 2018 14:05
HTML Entities en/decoder
import urllib.parse
# made by munsiwoo
# <img src=# onerror="&#97;&#108;&#101;&#114;&#116;&#40;&#49;&#41;">
def htmlentities_encode(string, url_encoding=0) :
result = str()
for st in string :
result += '&#'+str(ord(st))+';'
if url_encoding :
@munsiwoo
munsiwoo / exploit.py
Created May 30, 2018 14:30
check via eval unintended solution
from requests import get
# peng.solveme.kr - checkviaeval (web/410pt)
# made by munsiwoo
def add_length(argv) :
result = argv
e = 49 - len(argv)
for x in range(e) :
result += '/'
return result
@munsiwoo
munsiwoo / exploit.py
Last active April 13, 2018 17:12
hitb-xctf-upload(web)
from requests import get, post
from base64 import b64decode
'''
hitb xctf 2018 quals
upload (web) - directory wildcard
made by munsiwoo
'''
@munsiwoo
munsiwoo / pagination.php
Last active February 14, 2018 03:53
pagination
<?php
function pagination($page, $limit, $count) {
echo "<style>a { text-decoration:none; color:black; }</style>";
for($x = ($page-1); ($x%$limit) != 0; --$x);
if(($page-1) >= $limit) {
echo "<a href=\"?page={$x}\">&lt;Prev</a> ";
}
$limit = (($x+$limit) > $count) ? $count : $x+$limit;
@munsiwoo
munsiwoo / zip.py
Created February 11, 2018 08:10
python zipfile lib (compress example)
import zipfile, string
from random import choice
# made by munsiwoo
def randGenerator(size=6, chars=string.ascii_uppercase + string.digits) :
return ''.join(choice(chars) for x in range(size))
fileName = "compress.txt"
packName = "./" + randGenerator() + ".zip"
@munsiwoo
munsiwoo / unzip.py
Last active February 11, 2018 08:10
python zipfile lib (unzip example)
import zipfile
# made by munsiwoo
extractFile = "./archive.zip"
extractNum = 0
while True :
unzip = zipfile.ZipFile(extractFile)
@munsiwoo
munsiwoo / dirty.php
Last active February 11, 2018 07:57
dirt-Y
<?php
error_reporting(0);
require("flag.php");
# made by munsiwoo
$x = 1337;
$e = array();
$cookies = $_COOKIE;
extract($cookies);