Skip to main content

Simple spatial domain Steganography, made a CLI tool. Because... Why not?

Project description

Inck

Language GitHub license

Inck is a simple Python CLI tool to encode and decode data from images using LSB and MSB steganography. The project is very simple and doesn't aim to be something serious. But it's a fun experiment to show basics of steganography and people can take advantage of it.

Installation

To install Inck, simply use pip:

pip install inck

Ensure you have Python 3.6 or higher.

Usage

Inck offers two codec types to hide data: LSB (Least Significant Bit) and MSB (Most Significant Bit). The depth parameter adjusts their intensity. Higher depth values increase data capacity at the cost of image distortion.

  • LSB: As the name suggests, LSB deals with the least significant bits of the pixel values. Any modification is typically harder to perceive by the naked eye. This makes it an ideal choice when visual discretion is essential.
  • MSB: Manipulating the most significant bits will cause prominent changes to the image's appearance, but enhances the robustness of the encoded data against alterations. For image modifications or compression, MSB might be your best choice.

Keep in mind that Inck doesn't embed any header to identify an image as "encoded"; it only includes essential data information. As a result, attempting to decode images without encoded data or using incorrect parameters is possible, and will yield corrupted outputs.

Command Line

Encode:

inck encode -c codec_type -d depth -i input_data -im input_image -o output_image

Decode:

inck decode -c codec_type -d depth -im input_image -o output_data

As a Library

If for some reason you want to integrate this, Inck codecs can also be used within Python projects:

from inck.codec import LSBCodec, MSBCodec
from PIL import Image

input_image = Image.open('input.png')
input_data = bytes("Your super secret message", 'utf-8') # Or raw file
depth = 1

codec = LSBCodec(depth)

# Encode
output_image = codec.encode(input_image, input_data)
output_image.show()

# Decode
output_data = codec.decode(output_image)
print(output_data)

Usage Example

The examples folder contains an encoded 16x16 32-bit PNG image. To get started, decode it into an executable using LSB and a depth value of 2.

inck decode LSB -d 2 -im Pong.png -o Output.exe

It looks like a regular Minecraft texture, but when decoding, it's actually a tiny Pong game for Windows x86 and x64!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inck-1.0.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inck-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file inck-1.0.0.tar.gz.

File metadata

  • Download URL: inck-1.0.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for inck-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9afe4577eb3c1638e658623758bbc8f8e088b6ee8905f6598d709719c8cedb49
MD5 059d378baff5c529978857ded4315988
BLAKE2b-256 58bfbbd280e0bfaecd2dbfe39330d62b2ffeb985f1b389836182422bb9336dde

See more details on using hashes here.

File details

Details for the file inck-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: inck-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for inck-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7e946583e24cc2220516b6ce36efd6da00b94a7eb770462e26dc83c3bf6e01a
MD5 4de0299a1374f74e7f822d73bc406f0f
BLAKE2b-256 30d5ca85ad178e706f9a107f60fdea51d35085b6614282e3edd777450362d6bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page