Skip to content

Instantly share code, notes, and snippets.

@soffchen
soffchen / hitch
Created June 13, 2016 15:03 — forked from lkarsten/hitch
hitch init script for debian
#! /bin/sh
### BEGIN INIT INFO
# Provides: hitch
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The Scalable TLS Unwrapping Daemon
# Description: The Scalable TLS Unwrapping Daemon
@soffchen
soffchen / duckdns.script
Last active June 24, 2016 09:07
Duckdns script for RouterOS
:global currentIP;
:local newIP [/ip address get [find interface="cnc"] address];
:local newIP [:pick $newIP 0 [:find $newIP "/"]];
:if ($newIP != $currentIP) do={
:log info "IP address $currentIP changed to $newIP";
:set currentIP $newIP;
/tool fetch mode=https url="https://www.duckdns.org/update?domains=xxx&token=xxx&ip=$newIP" dst-path=duckdns.txt;
:local result [/file get duckdns.txt contents];
:log info "Duck DNS update result: $result";
}
@soffchen
soffchen / KuaidiCode
Last active November 15, 2016 02:29
Kuaidi Code for Guoguo
YKM => 易客满(亚马逊直邮)
yamaxunwuliu => 亚马逊物流(z.cn)
dhl => DHL
100003451 => 芝麻开门
100003676 => 晟邦物流
100004795 => 黄马甲配送
2639775697_301 => 筋斗云物流
4PX => 递四方
AIR => 亚风速递
@soffchen
soffchen / 1
Last active March 8, 2018 15:08
159.65.135.84:8080
110.77.210.32:45169
213.108.18.72:53281
195.234.87.211:53281
43.229.88.98:53281
209.52.241.147:53281
109.72.234.147:53281
178.136.192.223:53281
150.161.21.203:8080
109.105.40.39:53281
@soffchen
soffchen / wrbl_eml.py
Created July 11, 2022 07:39
Write each block from eml file for Proxmark
# 新卡的默认密码,6字节十六进制表示
DEFAULT_PASSWORD = "FFFFFFFFFFFF"
# hf-mf-00000000-dump.eml是卡内容的16进制ASCII表示,其中00000000用卡号替换
with open('hf-mf-4C00E3AB-dump.eml', 'r') as f:
card_content = f.read()
card_arr = card_content.split()
# 设置UID卡的卡号
print(f"hf mf csetblk --blk 0 -d {card_arr[0]}")
@soffchen
soffchen / Surge.md
Last active August 10, 2023 13:56
Surge

Feature

  • 替代 PAC,实现根据规则区分选择代理线路
  • 支持 SOCKS5 和 Shadowsocks 协议
  • 完整支持所有的 Shadowsocks 加密方式 (table, rc4-md5, salsa20, chacha20, aes-256-cfb, aes-192-cfb, aes-128-cfb, bf-cfb, cast5-cfb, des-cfb, rc2-cfb, rc4, seed-cfb)
  • 全面支持双向 HTTP Keep-Alvie
  • 快,各种黑科技加速
  • 直接临时修改某个域名的访问规则 (暂时仅 Mac 版本)
  • 支持使用 GeoIP 规则决定线路

Usage

{
id: 'cn.com.weilaihui3',
name: '蔚来',
groups: [
{
key: 1,
name: '自动点击领取红包',
activityIds: ['cn.com.weilaihui3.im.session.activity.ChatActivity'],
rules: [
{
@soffchen
soffchen / surge.conf
Last active March 4, 2024 05:23
surge.conf
[General]
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
loglevel = notify
[Proxy]
BJ-All = custom
BJ-HK-Azure = custom
BJ-US-Azure = custom