Skip to content

Instantly share code, notes, and snippets.

😱
AAHHH

Shell Chen sorz

😱
AAHHH
Block or report user

Report or block sorz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wireguard@.service
[Unit]
Description=Setup WireGuard link
After=network-online.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/wg-quick up %i
ExecStop=/usr/bin/wg-quick down %i
@sorz
sorz / check_release.py
Last active May 12, 2018
Sending new release notification (via email) for GitHub repos.
View check_release.py
#!/usr/bin/env python3
"""GitHub New Release Checker
./check_release.py path/to/releases.ini
It fetches release tag from GitHub, then comparing it with the
old one in ini file. If tag changed, send a email to configured
address.
"""
import re
View comment-sender.service
[Unit]
Description=Comment sender for example.com
[Service]
Type=simple
User=nobody
Group=nobody
ExecStart=/usr/bin/python3 /opt/comment-sender/sender.py
PrivateDevices=True
@sorz
sorz / ah.plain.txt
Last active Mar 26, 2018
`curl sorz.org`
View ah.plain.txt
-oooooooooooo- -::::::::::::::::::::-
.---------. oMMMMMMMMMMMM+ dMMMMMMMMMMMMMMMMMMMMM.
.NMMMMMMMMMN` oMMN:...-yMMM: /+++++++++++++yMMMo+++`
.NMMhyyydMMN` oMMN. `mMMd /MMN`
.NMM/ oMMN` oMMN. +MMN: /MMN`
.NMM/ oMMN` oMMN. `dMMs /MMN`
.NMM/ oMMN` oMMN. /MMN. -hhhhhhhhhh/ /MMN`
.NMM/ oMMN` oMMN. dMMo :MMMNmmmNMMs /MMN`
.NMM/ oMMN` oMMN. +MMN. :MMN.```yMMs /MMN`
@sorz
sorz / matriahix.sh
Created Mar 10, 2018
Copy from http://bruxy.regnet.cz/web/linux/EN/matrix-sh/, just change random chars to 啊.
View matriahix.sh
#!/bin/bash
echo -e "\033[2J\033[?25l"; R=`tput lines` C=`tput cols`;: $[R--] ; while true
do ( e=echo\ -e s=sleep j=$[RANDOM%C] d=$[RANDOM%R];for i in `eval $e {1..$R}`;
do c=`printf ''` # fork from http://bruxy.regnet.cz/web/linux/EN/matrix-sh/ #
$e "\033[$[i-1];${j}H\033[32m$c\033[$i;${j}H\033[37m"$c; $s 0.1;if [ $i -ge $d ]
then $e "\033[$[i-d];${j}H ";fi;done;for i in `eval $e {$[i-d]..$R}`; #[mat!rix]
do echo -e "\033[$i;${j}f ";$s 0.1;done)& sleep 0.05;done #(c) 2011 -- [ BruXy ]
@sorz
sorz / sockshttp.py
Created Oct 27, 2017
Forward SOCKSv5 requests to HTTP proxy.
View sockshttp.py
#!/usr/bin/env python3
"""Forward SOCKSv5 requests to HTTP proxy.
Frontend: accept SOCKSv5 CONNECT request.
Backend: HTTP proxy with CONNECT support.
"""
import asyncio
import logging
from struct import pack, unpack
from ipaddress import IPv4Address, IPv6Address
@sorz
sorz / obfs4-client.py
Last active Jul 24, 2017
A simple SOCKSv5 wrapper for obfs4proxy.
View obfs4-client.py
#!/usr/bin/env python3
import asyncio
from struct import pack
from ipaddress import ip_address
TIMEOUT = 300
OBFS_BIN = '/usr/bin/obfs4proxy'
OBFS_EXEC_PARAMS = ['-enableLogging', '-logLevel', 'DEBUG']
@sorz
sorz / dnsrelay.py
Last active Jul 17, 2017
Forward DNS query (in UDP) to a set of servers in parallel, then send back the fastest reply and ignore others. TCP queries are directly forward to a fixed server.
View dnsrelay.py
#!/usr/bin/env python3
"""
Forward DNS query (in UDP) to a set of servers in parallel, then send back
the fastest reply and ignore others. TCP queries are directly forward to a
fixed server.
"""
import asyncio
import socket
@sorz
sorz / cdma_pdu.py
Created Jun 16, 2017
Decode SMS from CDMA PDU
View cdma_pdu.py
from datetime import datetime
import binascii
import logging
import io
def _parse_fields(raw):
"""Return a iterators of (id, value)."""
raw = io.BytesIO(raw)
while True:
View keybase.md
### Keybase proof
I hereby claim:
* I am sorz on github.
* I am sorz (https://keybase.io/sorz) on keybase.
* I have a public key ASAiBGBuAlnIQQZyMycLhfqfUdOoLsNj_hHy0MlBUZjfZQo
To claim this, I am signing this object:
You can’t perform that action at this time.