Skip to content

isaac-app-dev/file-signatures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 

Repository files navigation

File Signatures (Magic Bytes)

This repository contains a Markdown table of common file signatures (magic bytes) and their corresponding Python 3 byte strings. This is useful for:

  • Crafting polyglot files (e.g., image + script hybrids)
  • Bypassing upload filters by mimicking file types

๐Ÿ› ๏ธ Usage

If you'd like to add a file signature (magic bytes) to any file with Python3, here's a generalized example:

# Read the original file content
file_content = open("file.extension", "rb").read()
# Define the magic bytes you want to prepend (e.g., for a GIF file)
magic_bytes = b"\x47\x49\x46\x38\x39\x61"  # GIF89a
# Combine the signature with the original content
file_content = magic_bytes + file_content
# Optionally, write it back out
with open("output_with_signature", "wb") as f:
    f.write(file_content)

You can replace the magic_bytes value with any of the signatures from Python3 Hex Signature Table.

๐Ÿ“„ File Signatures

๐Ÿ“š Source

Data was originally extracted and cleaned from Wikipediaโ€™s list of file signatures.


This project is intended for educational, testing, and research purposes only. Use Responsibly

About

Table of File signatures with ready to use byte strings for programs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published