Skip to content

Instantly share code, notes, and snippets.

@NyaMisty
NyaMisty / README.md
Last active February 13, 2025 06:39
Resync IDA Local Types

Resync Local Types in IDA

Sometimes there's some inconsistency between local types and structs view.

Typically, you can see the type in the "Structures" view are zero-lengthed, which should normally be the same size as local type's one.

When this happens, you'll not be able to rename the structure fields in HexRay Decompiler's view, and both hotkey N and right-clicking the item won't show the rename popup.

After reverse engineering the hexx64.dll, I found that IDA tries to do the following things:

@NyaMisty
NyaMisty / idapython_ctree.md
Created October 29, 2021 15:06 — forked from icecr4ck/idapython_ctree.md
Notes on CTREE usage with IDAPython

IDAPython CTREE

Important links

Description

The CTREE is built from the optimized microcode (maturity at CMAT_FINAL), it represents an AST-like tree with C statements and expressions. It can be printed as C code.

@NyaMisty
NyaMisty / XX_ida_with_struct_py3.py
Created September 18, 2021 21:01
Il2CppDumper Script Improved
# -*- coding: utf-8 -*-
import json
import idaapi
import idc
processFields = [
"ScriptMethod",
"ScriptString",
"ScriptMetadata",
"ScriptMetadataMethod",
@NyaMisty
NyaMisty / README.md
Last active September 9, 2022 23:12
Youtube Channel Backup without big hard disk
  1. Open a GCP instance and mount google drive: ~/fclone mount yuya_bak:/ /home/misty/remote_p -v --drive-chunk-size=16M
  2. Download ffmpeg wrapper and yt-dlp nightly version (after 2021.06.01)
  3. Download using yt-dlp: (Preparation: make the ytdl_mp4merged_log directory for log, change thread num 16 to a proper value, change /home/misty/remote_p to your mount point correspoindingly, change /home/misty/testmp4/ffmpeg to the ffmpeg wrapper)
yt-dlp -j --flat-playlist 'https://www.youtube.com/channel/UCjGE11ZnF0JSR8egVAwh-3A/videos' | jq -r '.url' \
  | parallel -j 16 -t -v --progress \
  | "yt-dlp --write-comments --downloader ffmpeg --merge-output-format mp4 --ffmpeg-location /home/misty/testmp4/ffmpeg -f 'bv[ext=mp4]+ba[ext=m4a]/b' -P 'home:/home/misty/remote_p' -i -o '%(uploader)s-mp4merged/%(title)s-%(id)s/%(id)s.%(ext)s' 'https://www.youtube.com/watch?v={0}' > ytdl_mp4merged_log/{0}.log 2>&1" \
  2> >(while read line; do echo -e "\e[01;31m$line\e[0m" >&2; done)
@NyaMisty
NyaMisty / FuckWordDefaultStyle.ipynb
Created May 24, 2021 22:44
Replace word's default style without touching direct style, for all paragraph before the first Title1 style paragraph
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NyaMisty
NyaMisty / fuck115.html
Last active April 16, 2021 19:03
fuck115
<!DOCTYPE html>
<!-- <html><head></head><body></body></html> -->
<html class="layout-frame bd-core layout-allscreen">
<head>
<meta charset="UTF-8">
<meta itemprop="name" content="115,一生相伴" />
<meta itemprop="image" content="web_icon.jpg" />
<meta name="baidu_union_verify" content="52cba82272ca074f2ef94d55d9083884">
<title>115,一生相伴</title>
This file has been truncated, but you can view the full file.
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on April 11, 2021 */
@font-face {
font-family: 'huakang_shaonv_for_powerlinRg';
src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAKf+sAA4AAABPgrAAKf9QAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgo5OCFwJFBEICoK1+mCCgIJiATYCJAOC+RwLgvkgAAQgBYNEByAMgR3P//8fm4nshUe3ChMqYycBQlFRcIXJTKz8J8k1CUqA0n7vNomqTvKpcUYYQzTaMaRwv8chfikqgYqXl0CkyN01o5ZARldbN5D02RyjLalQNRHu8L8Q/P//////////////////T9LxfLk5M/9lZt7MvL9/r+xu/t/kJkE5oogoBBRFLklEMLaUtrTYC1tUBLX20rb20F4nsGg2lM08ikKuxcys14uIiKbfi8GQEhE8gEGjMMrDHmiGBgyPE/UWJ9Nx9IhYOLOqEUsRMcGRvq3Qkcy4hnq+XNcTYDOzTJRCMpNcfaVqXVYHpRj29GuJ+lpKKcVwLJz1qhLi7oQunI2q7psRQfjC2aoaMY2IDkf6I1skb5NMrDTNTtM0Du5+1J0oNclMcgUmn2KSmXi6rJRSUM/MzIhSSObqx9KO6/r4ibqmgtbqJ9OuDEvZrWsmIt0zafV4xLNhlKc7RflzQp1+Xs68MIAXz4JBgxab0bmR4YAgh0wFcPW9RKblfMmUpb+QSNxf8kxZ+pcTiftFz5SleyXtqxulXCqFijSB+xmy4oGqEvraTAnVrBv9fj/q2AM2M8vQu+xX3L1sH7naXIu4cn2Hev3G/gEwvHEza36T4VbJUptlBr7Nwvgtpg4ZKaNG3/5a7vHXyQl5h0lmkhm/ut49ndE3Ltw5d9fWyDOVv5n25PZg8
@NyaMisty
NyaMisty / huawei-e5885-backup.md
Created August 6, 2020 05:12 — forked from ValdikSS/huawei-e5885-backup.md
How to backup current firmware on Huawei E5885

Huawei E5885 current firmware backup manual.

  1. Download modified usbloader, which will copy proper busybox into /system/busybox and enable telnetd on your device (will add additional line into /system/autorun.sh). Use it only on E5885, not on other device!
  2. Load it using balong-usbdload. Refer to this disassembling manual.
  3. After loading, wait about one minute, disconnect device from the computer and power off the device holding power button for ~15 seconds.
  4. Insert MicroSD card to the device and power it on.
  5. telnet 192.168.8.1 2323
/system/busybox sh
@NyaMisty
NyaMisty / add_nijisanji.py
Created July 27, 2020 04:26
NIJISANJI to vdb~
#coding: utf8
import sys
reload(sys)
sys.setdefaultencoding("UTF8")
import requests, re, json
sess = requests.Session()
r = sess.get("https://nijisanji.ichikara.co.jp/member/")
urls = re.findall(r"href=(https://nijisanji\.ichikara\.co\.jp/member/.*?)>", r.text)
### Keybase proof
I hereby claim:
* I am nyamisty on github.
* I am nyamisty (https://keybase.io/nyamisty) on keybase.
* I have a public key ASD7LTpwNB5Z8nVVe7ulyhPeHBI9MzdkccnsRkhNGZuh2wo
To claim this, I am signing this object: