Skip to content

C187/Table-Based-Secret-Message-Decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table Message Decoder

A Python tool that decodes secret messages from table-formatted documents containing coordinates and characters.

Description

This program reads a .docx file with a table containing x-coordinates, characters, and y-coordinates, then arranges them into a grid to reveal a hidden message.

Files

  • decoder.py - Main decoding script
  • example_table.docx - Sample input document with 356 coordinate entries
  • decoded_message.txt - Example output file

Installation

Install the required dependency:

pip install python-docx

Usage

Run the decoder:

python decoder.py

Or use it in your own code:

from decoder import decode_secret_message

decode_secret_message("example_table.docx", "decoded_message.txt")

Input Format

Your .docx file should contain a table with three columns:

x-coordinate Character y-coordinate
48 3
42 6
55 0

The decoder supports any Unicode characters and arbitrary grid sizes.

Example

Given the table in example_table.docx, the decoder outputs:

████████░       ███████░    ████████░   ████████░   ██████░    ██░     ██░     ██░     ██░
██░     ██░   ███░    ██░ ███░     ███░ ██░     ██░   ██░     ████░   ████░    ██░     ██░
██░      ██░ ███░         ██░       ██░ ██░     ██░   ██░     ██░██░ ██░██░    ██░     ██░
██░      ██░ ██░          ██░       ██░ ████████░     ██░    ███░ ██░██░ ██░   ██████████░
██░      ██░ ███░         ██░       ██░ ██░     ██░   ██░    ██░  █████░ ███░  ██░     ██░
██░     ██░   ███░    ██░ ███░     ███░ ██░     ██░   ██░   ███░   ███░   ██░  ██░     ██░
████████░       ███████░    ████████░   ████████░   ██████░ ██░           ███░ ██░     ██░

The decoded message is printed to the console and saved to the specified output file.

Requirements

  • Python 3.6+
  • python-docx

About

A Python tool that decodes secret messages hidden in table-formatted documents. The document contains coordinates and characters that, when arranged in a grid, reveal a hidden graphic message.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages