Skip to content

Instantly share code, notes, and snippets.

View Forgo7ten's full-sized avatar
😃
I may be slow to respond.

Forgo7ten Forgo7ten

😃
I may be slow to respond.
View GitHub Profile
@Forgo7ten
Forgo7ten / move_cert.sh
Created July 26, 2023 16:17
用于快速的转换证书并放入Android设备中
#!/bin/bash
# 检查是否提供了文件名参数
if [ -z "$1" ]; then
echo "请提供证书文件名作为参数!"
exit 1
fi
# 获取输入文件名和扩展名
input_file="$1"
@Forgo7ten
Forgo7ten / ReflectionUtils.java
Last active February 3, 2023 04:42
Java反射工具类 单文件,提取自XposedHelpers
package utils;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.*;
@Forgo7ten
Forgo7ten / 010_register.sh
Last active January 30, 2024 02:21
Linux and MacOS, 010Editor Register.
echo "[General]
D75BD954-8B63-84BA-75B3-019654928EE7=2786127075
E68B43C9-B732-8573-76A8-01AB75B3683A=253686975
F175B8C0-783C-8BA0-7045-014CA847B302=2765028028
F73529D0-8362-B7A9-7B25-01538B3C632A=1689813065
Hidden=false
LastDate=
Name=Forgo7ten
Password=1f93-56ac-c63e-540d-a9ab" > ~/.config/SweetScape/010\ Editor.ini
OS=`uname -s`
@Forgo7ten
Forgo7ten / clash.yaml
Last active August 31, 2022 14:55
手机clash抓包配置文件
mixed-port: 7890
allow-lan: false
mode: global
external-controller: 127.0.0.1:9090
log-level: info
@Forgo7ten
Forgo7ten / md5_algorithm.py
Created August 13, 2022 07:15
MD5算法实现
import binascii
import sys
import os.path
SV = [0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, 0xf57c0faf,
0x4787c62a, 0xa8304613, 0xfd469501, 0x698098d8, 0x8b44f7af,
0xffff5bb1, 0x895cd7be, 0x6b901122, 0xfd987193, 0xa679438e,
0x49b40821, 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa,
0xd62f105d, 0x2441453, 0xd8a1e681, 0xe7d3fbc8, 0x21e1cde6,
0xc33707d6, 0xf4d50d87, 0x455a14ed, 0xa9e3e905, 0xfcefa3f8,
@Forgo7ten
Forgo7ten / autoComments.js
Created June 20, 2022 11:52
方正教务系统自动评价
/*
* @FileName autoComments.js
* @Description 河北师范大学内网学生师德师风评教自动评价(方正教务系统)
* @Version 1.0.0
* @Author Forgo7ten
* @Date 2020/12/20
*/
var good_btn_classname = "radio-inline input-xspj input-xspj-1";
var better_btn_classname = "radio-inline input-xspj input-xspj-2";
var comment_element_id = "DF16FA9E24666431E0539A01A8C0A321_py";
@Forgo7ten
Forgo7ten / requestsWithCertificate.py
Created May 14, 2022 13:47
python requests发送网络请求携带证书(服务端证书校验)
import requests
# 将p12转换为pem,导入OpenSSL包,单使用pem不用该模块
import OpenSSL
# pip install requests pyOpenSSL==22.0.0
url = "https://180.76.60.244:18443/api/app5"
body = {"page": 2}
header = {
"Content-Type":
@Forgo7ten
Forgo7ten / watch_onclick.js
Created April 23, 2022 08:11
监听用户点击事件:hook onclick方法
/**
* HOOKonClick函数,打印onClick匿名类
*/
var jclazz = null;
var jobj = null;
function getObjClassName(obj) {
if (!jclazz) {
var jclazz = Java.use("java.lang.Class");
}
@Forgo7ten
Forgo7ten / hook_keystore.js
Created April 23, 2022 08:09
Frida hook KeyStore:客户端证书校验
/**
* hook证书密码及导出证书
*/
function hook_KeyStore_load() {
Java.perform(function () {
var myArray = new Array(1024);
var i = 0;
for (i = 0; i < myArray.length; i++) {
myArray[i] = 0x0;
}
@Forgo7ten
Forgo7ten / rc4.py
Created February 7, 2022 10:01
SM4加解密
from pysm4 import encrypt, decrypt
# 明文
clear_num = 0x0123456789abcdeffedcba9876543210
# 密钥
mk = 0x0123456789abcdeffedcba9876543210
# 加密
cipher_num = encrypt(clear_num, mk)
hex(cipher_num)[2:].replace('L', '')
'681edf34d206965e86b3e94f536e4246'
# 解密