PyMemoryExplorer - A lightning speed CPython object explorer via pure memory reading.


PyMemoryExplorer

A lightning speed CPython object explorer via pure memory reading.
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Features
  3. Usage
  4. Known Limitations

About The Project

PyMemoryExplorer can scan and parse objects contained in a CPython program.

The application of this library may vary. Often this is useful to fetch information from a 3rd party software that is using a Python interpreter.

It can also be used for high-performance debugging needs, where eval is too slow to do the job.

Part of this library contains source code from CPython.

Features

PyMemoryExplorer come with two features:

  • Object Scanner - it finds the base address of a linked list named _gc_head in CPython and scans it to find all Python Object that the garbage collector manages.
  • Object Parser - it supports to read the memory of a object and parse it into C++ Objects for developer to use

Usage

Please check PyMemoryExplorerTest which demonstrate basic usage of this library.

Please read known limitations before use.

Object scanning via _gc_head

image

Parsed PyDictObject

image

Parsed PyListObject(all the numbers are the memory address that points to the object in this list.)

image

Parsed PyTupleObject

image

Walk through a PyTupleObject and parse str in it.

image

All the basic data types is supported

image

Known Limitations

  • This library is hardcoded for official CPython 2.7.18 x64. However, only minimal effort should be needed to support other versions and architecture of CPython.
  • The target Python program can be running and change the object while it's reading, so object parsed can be partial or incorrect in some cases. To avoid this, simply pause the interpreter while reading memory.
  • To ensure its performance, this library is hardcoded to omit object contents too much stuff, such as a dict with 10000+ objects. You should read the source code and update them correspondingly.

image

  • This project was compiled using MSVC 2019.
Owner
5-year experience developer primarily working on Desktop GUI and Web Application with C#, C++, and JS. I write SOILD CURD codes
null
Similar Resources

Tsdf-plusplus - TSDF++: A Multi-Object Formulation for Dynamic Object Tracking and Reconstruction

TSDF++: A Multi-Object Formulation for Dynamic Object Tracking and Reconstruction TSDF++ is a novel multi-object TSDF formulation that can encode mult

Dec 29, 2022

Trackable ptr - Smart pointer for any movable objects. When trackable object moved/destroyed, trackers updated with new object's pointer.

trackable_ptr Trackable pointer. When trackable object moved/destroyed, trackable_ptrs updated with new object's location. Allow to have stable pointe

Mar 3, 2022

Blazingly fast multi-object tracker. Works on 1 (x, y) point per object.

Blazingly fast multi-object tracker. Works on 1 (x, y) point per object.

Norfair++ This is a C++ implementation of Techainer's Norfair, which originates from Norfair, a library for real-time 2D object tracking. Its function

Jan 26, 2022

Beacon Object File (BOF) for remote process injection via thread hijacking

cThreadHijack ___________.__ .______ ___ .__ __ __ ___\__ ___/| |_________ ____ _____

Dec 28, 2022

Ncnn version demo of [CVPR21] LightTrack: Finding Lightweight Neural Network for Object Tracking via One-Shot Architecture Search

LightTrack: Finding Lightweight Neural Networks for Object Tracking via One-Shot Architecture Search (ncnn) The official implementation by pytorch: ht

Dec 26, 2022

Test cpu and memory speed at linux-vps

Тест скорости процессора и памяти на linux-vps. Занимается бессмысленным перемножением массивов случайных чисел, для определения скорости процессора и

Nov 30, 2021

HashTableBenchmark - A simple cross-platform speed & memory-efficiency benchmark for the most common hash-table implementations in the C++ world

Hash-Tables Benchmarks This repository contains a bunch of extendable benchmarks mostly for following containers: std:unordered_map from STL. google::

Nov 20, 2022

A Gen implementation in C. With memory efficiency, portability and speed in mind

A Gen implementation in C. With memory efficiency, portability and speed in mind

Jul 31, 2022

Building and Executing Position Independent Shellcode from Object Files in Memory

PIC-Privileges Building and Executing Position Independent Shellcode from Object Files in Memory. This is a pingback to the blogpost I wrote at https:

Dec 26, 2022

A tool to pull C++ object names from kernel memory

kobject A tool to pull C++ object names from kernel memory Implementation is a bit hacky, lots of room for improvement. Just someting I threw together

Aug 3, 2022

CredBandit - Proof of concept Beacon Object File (BOF) that uses static x64 syscalls to perform a complete in memory dump of a process and send that back through your already existing Beacon communication channel

CredBandit CredBandit is a proof of concept Beacon Object File (BOF) that uses static x64 syscalls to perform a complete in memory dump of a process a

Dec 25, 2022

🖼️ A writeable in-memory Image JSI Host Object

🖼️ react-native-jsi-image 🏗️ This library is work in progress! 🏗️ A writeable in-memory Image JSI Host Object. JSI-Image is a modern library that p

Dec 20, 2022

Tetris on a Raspberry Pi Pico mounted on a Pimoroni Pico Explorer

PicoTetris Classic Tetris game running on a Raspberry Pi Pico microcontroller. Pico C port by Richard Birkby Original JavaScript implementation - Jake

Dec 3, 2022

Inject dll to explorer.exe and hide file from process.

Hide-FS Inject dll to explorer.exe and hide file from process. Requierments: Microsoft Detours Library - https://github.com/microsoft/Detours Compile:

Dec 26, 2022

A cross-platform OpenXR capabilities explorer and runtime switcher with a CLI and GUI.

A cross-platform OpenXR capabilities explorer and runtime switcher with a CLI and GUI.

OpenXR Explorer OpenXR Explorer is a handy debug tool for OpenXR developers. It allows for easy switching between OpenXR runtimes, shows lists of the

Dec 13, 2022

"Sigma File Manager" is a free, open-source, quickly evolving, modern file manager (explorer / finder) app for Windows, MacOS, and Linux.

"Sigma File Manager" is a free, open-source, quickly evolving, modern file manager (explorer / finder) app for Windows, MacOS, and Linux.

Dec 31, 2022

Registry Explorer - enhanced Registry editor/viewer

Registry Explorer - enhanced Registry editor/viewer

Registry Explorer Replacement for the Windows built-in Regedit.exe tool. Improvements over that tool include: Show real Registry (not just the standar

Jan 2, 2023

Assembly HellGate implementation that directly calls Windows System Calls and displays the PPID of the explorer.exe process

Assembly HellGate implementation that directly calls Windows System Calls and displays the PPID of the explorer.exe process

Custom HellsGate Implementation Assembly HellGate implementation that directly calls Windows System Calls and displays the PPID of the explorer.exe pr

Oct 18, 2022

use classic context menu in Windows 11 file explorer

Classic Context Menu for Windows 11 Shell32Patcher allows you to use classic context menu in Windows 11 file explorer. Usage Uncheck 'Launch folder wi

Sep 17, 2022
An In-memory Embedding of CPython

An In-memory Embedding of CPython This repository contains all the build artifacts necessary to build an embedding of CPython 3.8.2 that can be run en

Dec 5, 2022
MaixPy3 is a Python3 toolkit based on cpython
MaixPy3 is a Python3 toolkit based on cpython

MaixPy3 is a Python3 toolkit based on cpython, which simplifies the development of applications on Linux AI edge devices through Python programming.

Jan 2, 2023
Improved build system generator for CPython C, C++, Cython and Fortran extensions

scikit-build Improved build system generator for CPython C/C++/Fortran/Cython extensions. Better support is available for additional compilers, build

Dec 29, 2022
Speed Running and Competition Doom. For strictly vanilla speed runs and competitions - forked from CNDoom

Speed Running and Competition Doom Speed Running and Competition Doom is based on Chocolate Doom and aims to accurately reproduce the original DOS ver

May 24, 2022
The KISS file manager: CLI-based, ultra-lightweight, lightning fast, and written in C
 The KISS file manager: CLI-based, ultra-lightweight, lightning fast, and written in C

CliFM is a CLI-based, shell-like (non-curses) and KISS terminal file manager written in C: simple, fast, and lightweight as hell

Jan 8, 2023
Offline lightning PoS
Offline lightning PoS

LNURLPoS Cheap, offline(!), DIY bitcoin lightning-network PoS Lightning-network uses hot wallets and real-world payments are made from phones. The bur

Dec 5, 2022
⚡️Lightning-fast linter for .env files. Written in Rust 🦀

⚡️ Lightning-fast linter for .env files. Written in Rust ?? Dotenv-linter can check / fix / compare .env files for problems that may cause the applica

Dec 30, 2022
A simple C library for sending messages over the lightning network

A simple C library for sending messages over the lightning network

Dec 23, 2022
Object Based Generic Perception Object Model
 Object Based Generic Perception Object Model

This model is a highly parameterizable generic perception sensor and tracking model. It can be parameterized as a Lidar or a Radar. The model is based on object lists and all modeling is performed on object level.

Jun 11, 2022
OpenGL Object Loading can load virtually every 3d.obj file you can find on the internet, without using another object loading library
OpenGL Object Loading can load virtually every 3d.obj file you can find on the internet, without using another object loading library

OpenGL Object Loading can load virtually every 3d.obj file you can find on the internet, without using another object loading library (assimp for example). The program can load Object with 12M+ triangles and more

Dec 18, 2022