Skip to content

Instantly share code, notes, and snippets.

import os
import glob
import sys
import gdb
gdb_path = gdb.PYTHONDIR
gcc_parent_path = os.path.dirname(os.path.dirname(gdb_path))
gcc_version_pattern = os.path.join(gcc_parent_path, "gcc-*")
"""
(Kind of) A template script to use to debug VMs
with their memory provided. breakpoints and opcodes can be edited
according to the current VM implementation.
"""
import gdb
import os
@the-m3chanic
the-m3chanic / function_parser.py
Created November 15, 2023 19:32
Script to parse original helpers.c function
import clang.cindex
import os
class CodebaseAnalyzer:
def __init__(self, codebase_path):
self.index = clang.cindex.Index.create()
self.cache = {} # Cache to store indexes and extracted data for each file
self.codebase_path = codebase_path
self.load_codebase()