steganohide 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,51 @@
1
+ Metadata-Version: 2.4
2
+ Name: steganohide
3
+ Version: 1.0.0
4
+ Summary: A CLI tool to hide secret text inside PNG images using LSB steganography.
5
+ Author-email: Iva Bakalovska <iva.bakalovska@gmail.com>
6
+ Project-URL: Homepage, https://github.com/ivadebandit/steganography-tool
7
+ Project-URL: Bug Tracker, https://github.com/ivadebandit/steganography-tool/issues
8
+ Keywords: steganography,LSB,image,CLI,privacy
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Topic :: Multimedia :: Graphics
13
+ Classifier: Topic :: Security :: Cryptography
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: Pillow>=9.0
17
+
18
+ SteganoHide
19
+
20
+ A Python CLI tool for hiding secret text in PNG images using LSB (Least Significant Bit) steganography.
21
+
22
+ Demo
23
+
24
+
25
+
26
+
27
+ Features
28
+ Encodes secret messages into any standard .png image file.
29
+ Decodes hidden messages from processed images to reveal the original text.
30
+ Uses LSB steganography for invisible data embedding that preserves image quality.
31
+ Simple CLI menu to guide the user through the process.
32
+ Immediate feedback provided directly in your terminal.
33
+ Quick Start
34
+ 1. Installation
35
+
36
+ The easiest way to install this tool is using pip:
37
+
38
+ # Clone the repository
39
+ git clone https://github.com/ivadebandit/steganography-tool.git
40
+ cd steganography-tool
41
+
42
+ # Install the tool and its dependencies
43
+ pip install .
44
+ 2. Usage
45
+
46
+ Once installed, you can run the tool from anywhere in your terminal by simply typing:
47
+
48
+ steg-tool
49
+ Technical Details
50
+
51
+ This tool uses LSB steganography to modify the Red channel of pixels. The decoder scans the image in the exact sequence as the encoder, gathering values until it hits the STOP_SIGNAL (0), then maps the integers back to text via ASCII.
@@ -0,0 +1,34 @@
1
+ SteganoHide
2
+
3
+ A Python CLI tool for hiding secret text in PNG images using LSB (Least Significant Bit) steganography.
4
+
5
+ Demo
6
+
7
+
8
+
9
+
10
+ Features
11
+ Encodes secret messages into any standard .png image file.
12
+ Decodes hidden messages from processed images to reveal the original text.
13
+ Uses LSB steganography for invisible data embedding that preserves image quality.
14
+ Simple CLI menu to guide the user through the process.
15
+ Immediate feedback provided directly in your terminal.
16
+ Quick Start
17
+ 1. Installation
18
+
19
+ The easiest way to install this tool is using pip:
20
+
21
+ # Clone the repository
22
+ git clone https://github.com/ivadebandit/steganography-tool.git
23
+ cd steganography-tool
24
+
25
+ # Install the tool and its dependencies
26
+ pip install .
27
+ 2. Usage
28
+
29
+ Once installed, you can run the tool from anywhere in your terminal by simply typing:
30
+
31
+ steg-tool
32
+ Technical Details
33
+
34
+ This tool uses LSB steganography to modify the Red channel of pixels. The decoder scans the image in the exact sequence as the encoder, gathering values until it hits the STOP_SIGNAL (0), then maps the integers back to text via ASCII.
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "steganohide"
7
+ version = "1.0.0"
8
+ authors = [
9
+ { name="Iva Bakalovska", email="iva.bakalovska@gmail.com" },
10
+ ]
11
+ description = "A CLI tool to hide secret text inside PNG images using LSB steganography."
12
+ readme = "README.md"
13
+ license = { file = "LICENSE" }
14
+ requires-python = ">=3.8"
15
+ dependencies = [
16
+ "Pillow>=9.0",
17
+ ]
18
+ keywords = ["steganography", "LSB", "image", "CLI", "privacy"]
19
+ classifiers = [
20
+ "Programming Language :: Python :: 3",
21
+ "License :: OSI Approved :: MIT License",
22
+ "Operating System :: OS Independent",
23
+ "Topic :: Multimedia :: Graphics",
24
+ "Topic :: Security :: Cryptography",
25
+ ]
26
+
27
+ [project.scripts]
28
+ steganohide = "steg_tool:main"
29
+
30
+ [project.urls]
31
+ "Homepage" = "https://github.com/ivadebandit/steganography-tool"
32
+ "Bug Tracker" = "https://github.com/ivadebandit/steganography-tool/issues"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,201 @@
1
+ """
2
+ ==========================================================
3
+ IMAGE STEGANOGRAPHY PROJECT
4
+ ==========================================================
5
+
6
+ Hide a secret message inside a normal-looking image,
7
+ then decode it back out.
8
+
9
+ HOW IT WORKS:
10
+ Every pixel has a Red, Green, and Blue (RGB) value (0-255).
11
+ We secretly overwrite the Red channel of successive pixels
12
+ with the ASCII number of each character in our message.
13
+ The change is invisible to the human eye, but Python can
14
+ read it back.
15
+
16
+ Example: 'H' -> ord('H') -> 72 -> stored in pixel (0,0) Red
17
+ 'I' -> ord('I') -> 73 -> stored in pixel (1,0) Red
18
+ 0 (stop signal) -> stored in pixel (2,0) Red
19
+
20
+ IMPORTANT — USE PNG IMAGES ONLY
21
+
22
+ """
23
+
24
+ from PIL import Image
25
+
26
+
27
+ # ----------------------------------------------------------
28
+ # CONSTANTS
29
+ # ----------------------------------------------------------
30
+
31
+ STOP_SIGNAL = 0 # A Red value of 0 signals "message ends here"
32
+
33
+
34
+ # ----------------------------------------------------------
35
+ # HELPER FUNCTIONS
36
+ # ----------------------------------------------------------
37
+
38
+ def message_to_numbers(message):
39
+ """
40
+ Converts a text message into a list of ASCII numbers,
41
+ then appends the stop signal (0) at the end.
42
+
43
+ Example:
44
+ message_to_numbers("HI") -> [72, 73, 0]
45
+ """
46
+ numbers = []
47
+ for char in message:
48
+ numbers.append(ord(char)) # 'H' -> 72, 'I' -> 73, etc.
49
+ numbers.append(STOP_SIGNAL) # Mark the end of the message
50
+ return numbers
51
+
52
+
53
+ def numbers_to_message(numbers):
54
+ """
55
+ Converts a list of ASCII numbers back into a text string.
56
+
57
+ Example:
58
+ numbers_to_message([72, 73]) -> "HI"
59
+ """
60
+ message = ""
61
+ for num in numbers:
62
+ message += chr(num) # 72 -> 'H', 73 -> 'I', etc.
63
+ return message
64
+
65
+
66
+ # ----------------------------------------------------------
67
+ # ENCODER — Hide the message inside the image
68
+ # ----------------------------------------------------------
69
+
70
+ def encode_image(image_file, message, output_file):
71
+ img = Image.open(image_file).convert('RGB')
72
+ width, height = img.size
73
+ total_pixels = width * height
74
+
75
+ # Safety check
76
+ if len(message) + 1 > total_pixels:
77
+ print("ERROR: Your message is too long for this image!")
78
+ return
79
+
80
+ secret_numbers = message_to_numbers(message)
81
+ index = 0
82
+
83
+ for y in range(height):
84
+ for x in range(width):
85
+ if index < len(secret_numbers):
86
+ r, g, b = img.getpixel((x, y))
87
+ img.putpixel((x, y), (secret_numbers[index], g, b))
88
+ index += 1
89
+ else:
90
+ break
91
+ if index >= len(secret_numbers):
92
+ break
93
+
94
+ img.save(output_file)
95
+ print(f"\nSuccess! Encoded image saved as: '{output_file}'")
96
+
97
+ # -- Convert message to numbers -----------------------
98
+ secret_numbers = message_to_numbers(message)
99
+
100
+ print("Encoding message: '" + message + "'")
101
+ print("As ASCII numbers: " + str(secret_numbers))
102
+
103
+ # -- Inject numbers into the image, pixel by pixel ----
104
+
105
+ # We scan row by row (y first, then x) — same order used in decoding.
106
+ index = 0 # tracks which secret number we are writing next
107
+
108
+ for y in range(img.height):
109
+ for x in range(img.width):
110
+
111
+ if index < len(secret_numbers):
112
+ r, g, b = img.getpixel((x, y))
113
+ img.putpixel((x, y), (secret_numbers[index], g, b))
114
+ index += 1
115
+ else:
116
+ break # All data has been written; leave rest of image alone
117
+
118
+ if index >= len(secret_numbers):
119
+ break # Break out of the outer loop too
120
+
121
+ # -- Save the encoded image ---------------------------
122
+ img.save(output_file)
123
+ print("\nSuccess! Encoded image saved as: '" + output_file + "'")
124
+ print("To a human viewer it looks completely normal.")
125
+ print("Send it to a friend and have them run the decoder!")
126
+
127
+
128
+ # ----------------------------------------------------------
129
+ # DECODER - Reveal the hidden message from an image
130
+ # ----------------------------------------------------------
131
+
132
+ def decode_image(image_file):
133
+ img = Image.open(image_file).convert('RGB')
134
+ collected_numbers = []
135
+
136
+ print(f"Scanning image: '{image_file}'")
137
+ print("Reading hidden data from pixels...")
138
+
139
+ # -- Scan pixels in the same order as the encoder -----
140
+ for y in range(img.height):
141
+ for x in range(img.width):
142
+ # Get the pixel data using Pillow
143
+ r, g, b = img.getpixel((x, y))
144
+ red_value = r
145
+
146
+ # Did we hit the stop signal?
147
+ if red_value == STOP_SIGNAL:
148
+ if len(collected_numbers) == 0:
149
+ print("No hidden message was found in this image.")
150
+ return ""
151
+
152
+ # Convert the collected numbers back to text
153
+ secret_message = numbers_to_message(collected_numbers)
154
+ print(f"\nHidden message revealed: '{secret_message}'")
155
+ return secret_message
156
+
157
+ # Not a stop signal, keep collecting
158
+ collected_numbers.append(red_value)
159
+
160
+ # We scanned the whole image and never found a stop signal
161
+ print("Warning: No stop signal found.")
162
+ print("This image may not contain a hidden message.")
163
+ return ""
164
+
165
+ # ----------------------------------------------------------
166
+ # MAIN PROGRAM
167
+ # ----------------------------------------------------------
168
+
169
+ def main():
170
+ print("================================")
171
+ print(" Image Steganography Project ")
172
+ print("================================")
173
+ print("1 - Hide a secret message (Encode)")
174
+ print("2 - Reveal a secret message (Decode)")
175
+
176
+ choice = input("\nEnter 1 or 2: ").strip()
177
+
178
+ if choice == "1":
179
+ print("\n--- ENCODER ---")
180
+ print("Make sure you use a .png image file!")
181
+ image_file = input("Path to your original image (e.g. photo.png): ").strip()
182
+ message = input("Secret message to hide: ").strip()
183
+ output_file = input("Save encoded image as (e.g. secret.png): ").strip()
184
+ encode_image(image_file, message, output_file)
185
+
186
+ elif choice == "2":
187
+ print("\n--- DECODER ---")
188
+ image_file = input("Path to the encoded image (e.g. secret.png): ").strip()
189
+ decode_image(image_file)
190
+
191
+ else:
192
+ print("Invalid choice — please enter 1 or 2.")
193
+
194
+
195
+ # ----------------------------------------------------------
196
+ # Run the program
197
+ # ----------------------------------------------------------
198
+ if __name__ == "__main__":
199
+ main()
200
+
201
+ # thats it
@@ -0,0 +1,51 @@
1
+ Metadata-Version: 2.4
2
+ Name: steganohide
3
+ Version: 1.0.0
4
+ Summary: A CLI tool to hide secret text inside PNG images using LSB steganography.
5
+ Author-email: Iva Bakalovska <iva.bakalovska@gmail.com>
6
+ Project-URL: Homepage, https://github.com/ivadebandit/steganography-tool
7
+ Project-URL: Bug Tracker, https://github.com/ivadebandit/steganography-tool/issues
8
+ Keywords: steganography,LSB,image,CLI,privacy
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Topic :: Multimedia :: Graphics
13
+ Classifier: Topic :: Security :: Cryptography
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: Pillow>=9.0
17
+
18
+ SteganoHide
19
+
20
+ A Python CLI tool for hiding secret text in PNG images using LSB (Least Significant Bit) steganography.
21
+
22
+ Demo
23
+
24
+
25
+
26
+
27
+ Features
28
+ Encodes secret messages into any standard .png image file.
29
+ Decodes hidden messages from processed images to reveal the original text.
30
+ Uses LSB steganography for invisible data embedding that preserves image quality.
31
+ Simple CLI menu to guide the user through the process.
32
+ Immediate feedback provided directly in your terminal.
33
+ Quick Start
34
+ 1. Installation
35
+
36
+ The easiest way to install this tool is using pip:
37
+
38
+ # Clone the repository
39
+ git clone https://github.com/ivadebandit/steganography-tool.git
40
+ cd steganography-tool
41
+
42
+ # Install the tool and its dependencies
43
+ pip install .
44
+ 2. Usage
45
+
46
+ Once installed, you can run the tool from anywhere in your terminal by simply typing:
47
+
48
+ steg-tool
49
+ Technical Details
50
+
51
+ This tool uses LSB steganography to modify the Red channel of pixels. The decoder scans the image in the exact sequence as the encoder, gathering values until it hits the STOP_SIGNAL (0), then maps the integers back to text via ASCII.
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ steg_tool.py
4
+ steganohide.egg-info/PKG-INFO
5
+ steganohide.egg-info/SOURCES.txt
6
+ steganohide.egg-info/dependency_links.txt
7
+ steganohide.egg-info/entry_points.txt
8
+ steganohide.egg-info/requires.txt
9
+ steganohide.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ steganohide = steg_tool:main
@@ -0,0 +1 @@
1
+ Pillow>=9.0
@@ -0,0 +1 @@
1
+ steg_tool