Skip to content

Instantly share code, notes, and snippets.

View xhlove's full-sized avatar
🏠
Working from home

xhlove xhlove

🏠
Working from home
View GitHub Profile
按钮文字 ![](/images/xxxx.png)
@xhlove
xhlove / peacock.js
Created January 20, 2022 14:32
peacock HMAC key frida hook script, use frida 14.2.18
function jhexdump(array) {
if(!array) return;
console.log("---------jhexdump start---------");
var ptr = Memory.alloc(array.length);
for(var i = 0; i < array.length; ++i)
Memory.writeS8(ptr.add(i), array[i]);
console.log(hexdump(ptr, {offset: 0, length: array.length, header: false, ansi: false}));
console.log("---------jhexdump end---------");
}
@xhlove
xhlove / fix_name.py
Created October 31, 2021 08:56
去除非法字符,确保文件名正常,文件可以正常写入
def fix_name(name: str):
'''
去除可能存在的非法字符
'''
exclude_chars = ["\\", "/", ":", ":", "*", "?", "\"", "<", ">", "|", "\r", "\n", "\t"]
# 去除非法符号
name = ''.join(char if char not in exclude_chars else ' ' for char in name)
# 将之前连续的非法符号 改为单个 _
return '_'.join(name.split())
@xhlove
xhlove / amp4_concat.py
Created November 2, 2020 14:56
合并amp4为eac3
'''
作者: weimo
创建日期: 2020-11-02 22:35:31
上次编辑时间: 2020-11-02 22:55:12
一个人的命运啊,当然要靠自我奋斗,但是...
'''
import sys
import gzip
from pathlib import Path
@xhlove
xhlove / xlsx_pasteTOcsv.ps1
Last active June 14, 2020 04:23
xlsx粘贴到txt文件中的数据,补充数据后转换到csv
$args = "path/to/paste/file"
$height = -2.333
$results = Select-String -Path $args -Pattern '(\d+[ |\t]{1})?(-?\d+\.?\d+)([ |\t]{1})(-?\d+\.?\d+)' -AllMatches
$ScriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
$ScriptPath = $ScriptPath + '\' + [System.IO.Path]::GetFileNameWithoutExtension($args) + '.csv'
$results | foreach{
$newline = "{0:0.000000},{1:0.000000},{2:0.000000}" -F [Double] $_.Matches[0].groups[2].value, [Double] $_.Matches[0].groups[4].value, $height
$newline | Out-File -Encoding UTF8 -Append $ScriptPath
}
from __future__ import print_function
import frida
import sys
session = frida.attach("chrome.exe")
script = session.create_script("""
var baseAddr = Module.findBaseAddress("chrome.exe");
print("chrome.exe baseAddress is at :"+baseAddr);
### Keybase proof
I hereby claim:
* I am xhlove on github.
* I am xhlove (https://keybase.io/xhlove) on keybase.
* I have a public key ASAZcYiIT8HJX42n3c1UN54URbLtogsFW93FUYjy_gmWAQo
To claim this, I am signing this object: