Skip to content

Instantly share code, notes, and snippets.

View sorz's full-sized avatar
😱
AAHHH

Shell Chen sorz

😱
AAHHH
View GitHub Profile
[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 March 26, 2018 15:10
`curl sorz.org`
-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 March 10, 2018 07:24
Copy from http://bruxy.regnet.cz/web/linux/EN/matrix-sh/, just change random chars to 啊.
#!/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 October 27, 2017 12:39
Forward SOCKSv5 requests to HTTP proxy.
#!/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 July 24, 2017 19:24
A simple SOCKSv5 wrapper for obfs4proxy.
#!/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 July 17, 2017 22:01
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.
#!/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 June 16, 2017 07:59
Decode SMS from CDMA PDU
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:
### 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:
@sorz
sorz / test
Last active April 3, 2017 12:22
test
aaaa
@sorz
sorz / ipn-tib-mixed.user.js
Last active April 3, 2017 12:23
在 IPN 首页显示字谈字畅的节目列表。
// ==UserScript==
// @name IPN - Add Type is Beautiful episodes
// @namespace org.sorz.lab.ipn
// @include https://ipn.li/
// @include http://ipn.li/
// @version 5
// @grant GM_xmlhttpRequest
// @grant GM_getResourceURL
// @grant GM_addStyle
// @require http://code.jquery.com/jquery-3.2.0.min.js