Perceptio
A python module to visualize binary data
Install / Use
/learn @tryexceptpass/PerceptioREADME
Overview
This is a simple python script that generates an image given binary data from any file. It doesn't matter what type of file, it's meant to explore internal file organization and structure by visualizing it as a bitmap.
Why?
This was inspired by the TED talk "The 1s and 0s behind cyber warfare"
Also, because python can do anything! I know there are other tools out there that do something similar, but I didn't find one written in python and I thought it would be a great exercise with which to learn a little numpy and image manipulation.
Usage
Python 3 is required.
visualize.py <filename> [--mmap | --np-memmap | --np-fullcolor]
Options:
--np-fullcolor Use numpy to extract data in 4-byte chunks and draw in full color
--np-memmap Use numpy but run it with .memmap instead of .fromfile
--mmap Use mmap and regular file i/o instead of numpy fromfile.
--version Show version.
-h --help Show this screen.
Under the covers
The default mode for reading data is through the use of numpy .fromfile to load it into memory and generate the image pixels. As you can see from the command line options, I'm experimenting with different modes trying to learn a bit about what could be more performant.
If you find any problems or have a suggestion, feel free to drop an issue I can look at or send a message to @tryexceptpass.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
