Skip to content

Instantly share code, notes, and snippets.

@blueperson
blueperson / ShadowsocksRandomMultiport
Created January 2, 2017 14:12
shadowsocks多端口随机
#ss-server 服务端(假设你的目前的服务端 ss 端口已经监听在 23 端口):
#-----------开始--------------
iptables -t nat -A PREROUTING -p tcp -m multiport --dport 81:1023 -j REDIRECT --to-ports 23
iptables -t nat -A PREROUTING -p udp -m multiport --dport 81:1023 -j REDIRECT --to-ports 23
#以下两条命令可选
service iptables save
service iptables restart
#-----------结束--------------
#ss-redir 本地端(104.224.156.199 自行修改成自己服务器 ip):
@blueperson
blueperson / README.rst
Created November 14, 2016 01:34 — forked from tonyseek/README.rst
Build Python binding of C++ library with cffi (PyPy/Py3K compatible)

Run with Python:

pip-2.7 install cffi
PYTHON=python2.7 sh go.sh

Run with PyPy:

pip-pypy install cffi
PYTHON=pypy sh go.sh
@blueperson
blueperson / sshpass.py
Created January 26, 2016 08:08 — forked from virtuald/sshpass.py
Simple python wrapper to give SSH a password for automation purposes (with output capture)
#!/usr/bin/env python3
import os
import sys
_b = sys.version_info[0] < 3 and (lambda x:x) or (lambda x:x.encode('utf-8'))
def ssh_exec_pass(password, args, capture_output=False):
'''
Wrapper around openssh that allows you to send a password to