Skip to content

Instantly share code, notes, and snippets.

@luckypoem
luckypoem / proxy_server.go
Created March 6, 2022 10:12 — forked from hellojukay/proxy_server.go
A http(s) proxy server
package main
import (
"bytes"
"fmt"
"io"
"log"
"net"
"regexp"
"strings"
@luckypoem
luckypoem / autopin.sh
Created July 4, 2021 03:10 — forked from bao3/autopin.sh
reaver PIN时每10分钟模拟键盘输入Ctrl+C中断,因为无线网卡运行在monitor模式大约10分钟后就性能下降,因此需要强制中断reaver。使用时 sudo ./10pin aa:bb:cc:dd:ee:ff:11(即路由器MAC) 额外的reaver指令 请在空格后使用""(双引号)中写入,例如channel 6 ,可以使用 sudo ./10pin aa:bb:cc:dd:ee:ff:11 "-c 6" 如果你要实时查看进度,可以使用 tail -f /var/log/reaer.pin.log
#!/bin/sh
reaverCMD()
{
reaver -i mon0 -b $1 -v -a -S -N -r 100:60 $2 >>/var/log/reaver.pin.log &
tmp_pid=$(ps a| grep reaver | grep -v grep | awk '{print $1}' );
echo $tmp_pid;
}
while true :
do
@luckypoem
luckypoem / socat-tcp-to-unix-socket.sh
Created August 17, 2019 08:56 — forked from ljjjustin/socat-tcp-to-unix-socket.sh
socat-unix-socket-to-tcp.sh
#!/bin/bash
if [ $# -ne 3 ]; then
echo "usage: $0 <unix socket file> <host> <listen port>"
exit
fi
SOCK=$1
HOST=$2
PORT=$3
@luckypoem
luckypoem / ss-redir 透明代理.md
Created November 29, 2018 12:45 — forked from wen-long/ss-redir 透明代理.md
ss-redir 透明代理.md

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /etc/ss-redir.json 本地监听 7777 运行ss-redir -v -c /etc/ss-redir.json

iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
@luckypoem
luckypoem / across.client.js
Created September 19, 2018 02:14 — forked from yueyuzhao/across.client.js
代理翻墙 (nodejs实现)
// 客户端实现
const net = require('net')
const tls = require('tls')
const localServer = new net.Server()
localServer.on('connection', (socket) => {
socket.pause()
const context = {
@luckypoem
luckypoem / gist:c5951b57b89b100bc16f57402faa4d6d
Created April 12, 2018 10:31 — forked from jordelver/gist:3073101
Set the Mac OS X SOCKS proxy on the command line

Set the Mac OS X SOCKS proxy on the command line

a.k.a. what to do when your ISP starts blocking sites :(

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Ethernet" localhost 8080

To clear the domain and port