Skip to content

Instantly share code, notes, and snippets.

View ziozzang's full-sized avatar

Jioh L. Jung ziozzang

View GitHub Profile
@ziozzang
ziozzang / cloudflare-update-record.sh
Created August 12, 2019 07:19 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
#!/bin/bash
# ./tar-diff.sh dir_name_here 8
DIR_NAMES=${1:-"asdf"}
DAYS=${2:-"8"}
LASTDATE=`(date --date "${DAYS} days ago" --rfc-3339=seconds)`
TIMESTMP=`date '+%Y-%m-%d'`
tar -cvz --newer-mtime="${LASTDATE}" -f ${DIR_NAMES}-diff-${TIMESTMP}-${DAYS}d.tgz ${DIR_NAMES}
@ziozzang
ziozzang / install-agent.sh
Last active May 17, 2019 06:36
K3s-as-docker
#!/bin/bash
MASTER_IP="10.1.2.96"
HOSTNAME=`hostname`
CA_FILE="/opt/k3s-master/output/ca-certificates.crt"
TOKEN=`cat /opt/k3s-master/data/server/node-token`
WORK_DIRS="/opt/${HOSTNAME}"
mkdir -p ${WORK_DIRS} || true
cp -f ${CA_FILE} ${WORK_DIRS}/
@ziozzang
ziozzang / Dockerfile
Created May 16, 2019 23:29
RHEL8 Mirrors
# For RHEL8
FROM registry.access.redhat.com/ubi8
# For RHEL7
FROM registry.access.redhat.com/rhel
RUN subscription-manager register --username="id_here" --password="pass_here" --auto-attach && \
subscription-manager refresh && \
yum install -y yum-utils createrepo
# CentOS7
 yum install -y \
   git gcc wget make autoconf libtool automake perl o\
   penssl-* zlib-* libssh2-devel libssh2

mkdir -p ~/src
cd ~/src
curl https://curl.haxx.se/download/curl-7.29.0.tar.gz | tar xzv
@ziozzang
ziozzang / elastic-apm.md
Last active February 21, 2019 00:30
Elastic APM
  • Python3 에서 동작 가능
pip install elastic-apm

  • 환경 변수 설정
@ziozzang
ziozzang / socks-test-with-python.md
Last active February 19, 2019 02:37
socks proxy test using python
pip install PySocks
import urllib2
import socks
from sockshandler import SocksiPyHandler

opener = urllib2.build_opener(SocksiPyHandler(socks.SOCKS5, "127.0.0.1", 1080))
opener.open("http://www.naver.com/").read()[:100]
@ziozzang
ziozzang / SNIProxy.Test.Result.md
Created February 17, 2019 23:59
Korean SNI Censorship avoid Testing with https://github.com/ziozzang/SimpleSNIProxy

Notice

  • This code is over 4years. and works well in recent blocking issue. :)
  • This is for testing only. about techincal issue.
  • I masked URL from result. :)

TL;DR

  • Testing Result via Simple SNI Proxy Server by me.
  • This server is not intended to by-pass SNI censorship in korea. as you see, this code is 4 years old.
@ziozzang
ziozzang / huawei-e5885-backup.md
Last active February 11, 2019 02:18 — forked from ValdikSS/huawei-e5885-backup.md
How to backup current firmware on Huawei E5885

Huawei E5885 current firmware backup manual.

  1. Download modified usbloader, which will copy proper busybox into /system/busybox and enable telnetd on your device (will add additional line into /system/autorun.sh). Use it only on E5885, not on other device!
  2. Load it using balong-usbdload. Refer to this disassembling manual.
  3. After loading, wait about one minute, disconnect device from the computer and power off the device holding power button for ~15 seconds.
  4. Insert MicroSD card to the device and power it on.
  5. telnet 192.168.8.1 2323
/system/busybox sh
@ziozzang
ziozzang / README.md
Last active February 11, 2019 01:44
안드로이드 테더링에 대한 리서치
 Below are commands that Android talking to netd to start/stop tethering.

1. Start tethering
"softap fwreload wlan0 AP"
"softap start wlan0"
"softap set wlan0 wl0.1 hotspot456 open null 6 0 8"