Skip to content

Instantly share code, notes, and snippets.

View h1code2's full-sized avatar
🎯
Focusing

Amelia Riski h1code2

🎯
Focusing
View GitHub Profile
@h1code2
h1code2 / readme.md
Last active September 27, 2020 02:48
ELF可执行程序加载so文件 #so #elf

ELF可执行程序加载so文件尝试

#include <unistd.h>
#include <stdio.h>
#include <dlfcn.h>

typedef void (*pfnfoo)(void);//函数类型指针
const char path[]="/data/local/tmp/1.so";///1.so就是要加载的动态链接库的名称
@h1code2
h1code2 / readme.md
Last active September 14, 2021 11:35
Proxmox VE /Debian /Ubuntu 设置合上笔记本盖子不休眠的方法 #pve #笔记本

设置合上笔记本盖子不休眠的方法

众所周知,服务器是没有AB面的(KVM当然不算了),燃鹅笔记本有,不能让屏幕一直打开亮着吧,但是默认都是关闭盖子休眠,咋办呢

ěi éi,这不是Debian系的嘛

编辑一哈/etc/systemd/logind.conf

#HandlePowerKey按下电源键后的行为,默认power off
#HandleSleepKey 按下挂起键后的行为,默认suspend
#HandleHibernateKey按下休眠键后的行为,默认hibernate
@h1code2
h1code2 / readmd.md
Last active September 27, 2020 02:44
PM2多进程运行Python程序配置文件 #pm2 #Python

PM2多进程运行Python程序配置文件参考

let apps =  [
    {
      name: 'youtube-spider',
      cwd: '/srv/spider/wuyi_spider',
      script: 'venv/bin/python cli.py youtube_basic_spider_task --max_threads 5',
      watch: false,
      number:2,
 },
@h1code2
h1code2 / config.md
Last active September 27, 2020 02:41
squid设置代理服务器 #squid #ubuntu #proxy #代理

squid 配置文件 / squid.conf

# Recommended minimum configuration:
#

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8	# RFC1918 possible internal network
acl localnet src 172.16.0.0/12	# RFC1918 possible internal network
@h1code2
h1code2 / main.js
Last active September 27, 2020 02:34
FRIDA HOOK软件账号Cookie信息 #frida # cookie #hook
var listJava = Java.use("java.util.List");
var CookieManager = Java.use("java.net.CookieManager");
CookieManager.getCookieStore.implementation = function () {
try{
ue_tool.showUETMenu();
}catch(e){
console.log(e)
}
console.log("getCookieStore ============= start");
var ret = this.getCookieStore();
@h1code2
h1code2 / main.py
Last active March 11, 2024 08:14
fastapi操作异步redis模块aioredis #fastapi #aioredis
import aioredis
from fastapi import FastAPI
from api.views import router as api_router
from ws.views import router as wss_router
from config import redis_config
async def redis_pool(db: int = 0):
"""
@h1code2
h1code2 / readme.md
Last active January 23, 2024 06:32
FRIDA抓包相关笔记/常用操作 #frida #抓包 #hook #okhttp #proxy #pinning # ssl

FRIDA抓包相关笔记/常用操作

原文链接:https://api-caller.com/2019/11/05/capture-note/

抓包应该是被问到最多的事情了, 记录一些片段.

珍惜Any 之前提过 一种思路 是遍历所有类, 按照特征去判断校验类和方法.

此处的思路则是, 先跑一遍并让它失败, 找到特征打印堆栈, 即可锁定位置, 再行 hook 即可.

@h1code2
h1code2 / main.js
Last active September 11, 2023 06:07
FRIDA过ROOT检测 #root # frida
function showStacks() {
Java.perform(function() {
console.log(Java.use("android.util.Log").getStackTraceString(Java.use("java.lang.Exception").$new()));
});
}
function hook() {
Java.perform(function () {
const commonPaths = [
"/data/local/bin/su",
@h1code2
h1code2 / openwrt-lede.md
Last active June 7, 2024 14:03
[frp设置自动自动] 不同平台设置frp自动启动 #frp #openwrt

给你的OpenWRT/LEDE 添加frp开机服务

添加PROC服务文件:

vi /etc/init.d/frpc

配置文件内容:

#!/bin/sh /etc/rc.common
@h1code2
h1code2 / readme.md
Created September 29, 2020 07:55
加载so后立即hook函数 #frida #hook #so

这没啥 就是hookdlopen 然后再去hook so的函数