Skip to content

Instantly share code, notes, and snippets.

#!name=Set Proxy Lists
#!desc=
[Rule]
DOMAIN-SUFFIX,linkedin.com,Proxy
#!name=Skip Proxy Lists
#!desc=跳过部分应用的代理检测
[General]
skip-proxy = %APPEND% www.baidu.com,yunbusiness.ccb.com,wxh.wo.cn,gate.lagou.com,www.abchina.com.cn,www.shanbay.com,login-service.mobile-bank.psbc.com,mobile-bank.psbc.com
## www.baidu.com:网上国网、多看阅读、顺丰金融、广东农信、丰云行、中国银行缤纷生活、通信行程卡app、趣智校园、趣听音乐、光大手机银行、掌上12333、沃视频
## yunbusiness.ccb.com:建行生活
## wxh.wo.cn:沃小号
@smallyunet
smallyunet / prompt.txt
Last active May 24, 2023 10:29
Midjourney prompt Bot
rt
@smallyunet
smallyunet / priKey_to_addr.go
Created February 20, 2023 05:58
Eth private key to address
package main
import (
"encoding/hex"
"fmt"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
"github.com/wealdtech/go-merkletree/keccak256"
)
@smallyunet
smallyunet / pkl_to_txt.py
Created February 7, 2023 06:02
Decode .pkl file to .txt
import numpy, gzip
import _pickle as cPickle
list = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]
for i in list:
filename = 'data' + str(i)
with gzip.open(filename + '.pkl.gz', 'rb') as f:
addrs = cPickle.load(f)
print(type(addrs))
for addr in addrs:
from ecpy.curves import Curve
from sha3 import keccak_256
private_key = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
cv = Curve.get_curve('secp256k1')
pu_key = private_key * cv.generator # just multiplying the private key by generator point (EC multiplication)
concat_x_y = pu_key.x.to_bytes(32, byteorder='big') + pu_key.y.to_bytes(32, byteorder='big')
eth_addr = '0x' + keccak_256(concat_x_y).digest()[-20:].hex()
@smallyunet
smallyunet / build.sh
Created January 15, 2023 01:56
Userful shell
../go/bin/go build .
#!name= Skip ABChina
#!desc= Skip ABChina
#!homepage=https://gist.github.com/smallyunet
#!author= smallyu
[General]
skip-proxy = %APPEND% www.abchina.com.cn
@smallyunet
smallyunet / export_picture.py
Created September 21, 2022 10:00
handle excel and img
#Importing the modules
import openpyxl
from openpyxl_image_loader import SheetImageLoader
#loading the Excel File and the sheet
pxl_doc = openpyxl.load_workbook('imgs2.xlsx')
# print(pxl_doc.sheetnames)
sheet = pxl_doc[pxl_doc.sheetnames[0]]
@smallyunet
smallyunet / rsa.go
Last active May 5, 2022 04:30
Golang RSA encrypt and decrypt example
package crypto
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
)
func RSAGenerateKey() (*rsa.PrivateKey, *rsa.PublicKey) {
// here 2048 is the number of bits for RSA