Skip to content

25 byte netpbm/shell script polyglot #159

@deepseagirl

Description

@deepseagirl

Entry Info

  • Date: 2025-11-02
  • BGGP Challenge: 2, 6
  • Name: ackmage
  • Contact Info:
  • Online Presence: herm.it
  • Writeup Link: tbd

File Info

  • Target File Type: .pbm (netpbm), .sh (shell script)
  • Target File Size: 25
  • SHA256 Hash: 0973848372fa87c9e05f8f3b5cd8660ef04ae4a832218fd728f78ff66dd1e6a5

File Contents

Please encode the file as Base64

UDEgMyA1IDExMTEwMDExMTEwO2VjaG8gNg==

Environment Info

Target Software and Version

macOS file viewer (Finder)

macOS terminal (or any shell)

Environment Setup

Description of Target Software's Environment (Platform/OS, Setup Instructions, etc.)

macOS Sonoma 14.5

Additional Info

Here attach any additional information about the file, including supporting notes, screenshots, videos, console output, etc.

this file is a polyglot consisting of a netpbm image file and a shell script

to view as a netpbm image, save file and view in Finder:

screenshot of 6.pbm rendering as image file in Finder app

double-click to open it in Preview:

screenshot of zoomed out, ultra tiny 6.pbm as image file in Preview app

you really gotta zoooooom in:

screenshot of zoomed in 6.pbm as image file in Preview app

to run as a shell script, make executable and run it:

chmod +x 6.pbm
./6.pbm
screenshot of 6.pbm running in shell

feel free to test this out on other image viewers and lmk what happens!

Metadata

Metadata

Assignees

No one assigned

    Labels

    BGGP EntryBGGP6This issue was created during BGGP6VerifiedThis entry has been verified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions