Zurück zum Ranking

DavidBuchanan314/tweetable-polyglot-png

Python

Pack up to 3MB of data into a tweetable PNG polyglot file.

polyglotpolyglot-filespngziptwittersteganography
Sterne-Wachstum
Sterne
2.6k
Forks
153
Wochenwachstum
Issues
2
2k2.5k
März 2021Dez. 2022Okt. 2024Juli 2026
ArtefaktePyPIpip install tweetable-polyglot-png
README

tweetable-polyglot-png

Pack up to 3MB of data into a tweetable PNG polyglot file.

See it in action here: https://twitter.com/David3141593/status/1371974874856587268

image

Other image hosts I've verified this technique to work on:

Image hosts I've confirmed it doesn't work on:

  • Reddit (Perhaps it could be made to work by embedding data within the DEFLATE stream, rather than appending?)

How?

Twitter strips unnecessary data from PNG uploads, however, they do not strip trailing data from the DEFLATE stream inside the IDAT chunk, provided that the overall image file meets the requirements to avoid being re-encoded.

Why?

Dunno.

Cover image requirements

The cover image must compress well, such that the compressed filesize is less than (width * height) - size_of_embedded_file. If the cover image does not have a palette, then it must have at least 257 unique colours (otherwise twitter will optimise it to use a palette).

The resolution can be up to 4096x4096, however, be aware that twitter will serve a downscaled version by default, for images greater than 680x680 (depending on your display DPI, etc.).

The image should not have any unecessary metadata chunks. I used these export settings in GIMP:

image

Embedded file requirements

The total output file size must be less than 3MB (maybe 5MB?), otherwise twitter will convert the PNG to a JPEG.

If the embedded file is a .zip, then the offsets are automatically adjusted so that the overall file is still a valid zip. For any other file formats, you're on your own (many will work without any special handling, notably .pdf, .mp3).

Ähnliche Repositories
jart/cosmopolitan

build-once run-anywhere c library

CISC Licensepolyglotcontainers
21.2k766
enso-org/enso

Enso Analytics is a self-service data prep and analysis platform designed for data teams.

JavaMavenApache License 2.0visuallanguage
ensoanalytics.com
7.4k343
dotnet/interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.

C#MIT Licensecsharpfsharp
3.2k465
niklasf/python-chess

A chess library for Python, with move generation and validation, PGN parsing and writing, Polyglot opening book reading, Gaviota tablebase probing, Syzygy tablebase probing, and UCI/XBoard engine communication

PythonPyPIGNU General Public License v3.0chessfen
python-chess.readthedocs.io/en/latest/
2.8k574
liou666/polyglot

🤖️ Cross-platform AI language practice app (跨平台AI语言练习应用)

TypeScriptnpmGNU General Public License v3.0azurechatgpt
doc.polyglotai.xyz
2.6k271
MinhasKamal/CreepyCodeCollection

A Nonsense Collection of Disgusting Codes

Cquinepolyglot
minhaskamal.github.io/CreepyCodeCollection/
2.4k136
metacall/core

MetaCall: The ultimate polyglot programming experience.

CApache License 2.0metacallfunction-mesh
metacall.io
1.8k254
wireghoul/htshells

Self contained htaccess shells and attacks

ShellGNU General Public License v3.0webshellpolyglot
justanotherhacker.com/projects.html
1.1k195
kkoomen/vim-doge

(Do)cumentation (Ge)nerator for nearly 20 languages 📚 Generate proper code documentation with a single keypress. ⚡️🔥

Rustcrates.ioGNU General Public License v3.0vimdoge
1.1k56