This is a simple Python package for steganography
Now this package can automatically detect the encoding of the hidden text using the '-a' argument. Code to hide information in the given image:
import lsb
from PIL import Image
import numpy as np
img=Image.open('test.png')
img=np.array(img)
info=b'Some information'
hidden=lsb.lsbenc(img,info)
img_hidden=Image.fromarray(hidden)
img_hidden.save('hidden.png')# Must be a PNG,BMP,etc., not JPEG or WEBP
Code to get the hidden information from the given image:
import lsb
from PIL import Image
import numpy as np
img=Image.open('test.png')# Must be a PNG,BMP,etc., not JPEG or WEBP
img=np.array(img)
info=lsb.lsbdec(img)
print(info)
RSA
RSA is now supported in easylsb 1.0.7. Code:
import lsb
from PIL import Image
import numpy as np
import rsa
pub,priv=rsa.newkeys(200)
img=Image.open('test.png')
img=np.array(img)
info=b'Some information'
# Hide
hidden=lsb.lsbenc(img,info,rsakey=pub)
img_hidden=Image.fromarray(hidden)
img_hidden.save('hidden.png')# Must be a PNG,BMP,etc., not JPEG or WEBP
# Recover
info=lsb.lsbdec(hidden,rsakey=priv)
print(info)# b'Some information'
It's very easy to use the StegSolve tool to get the hidden information, but easylsb package allows you to encrypt the information using DES or RSA.
WARNING: Python 2 is unsupported by easylsb since easylsb 1.0.7, if you're using Python 2 and want to install this package, you should use the command "pip install easylsb==1.0.6"
Metadata
Release files for easylsb 1.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| easylsb-1.0.9.tar.gz | 5.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easylsb-1.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / easylsb-1.0.9.tar.gz
| Download URL | easylsb-1.0.9.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2802ed9ffff92ddcdc9e4ad6631d853800732a48ffc99c0aa5a0eece8c724892
|
|
BLAKE2b-256 checksum How to use checksums |
bd43f5900d51dab4d4ab5bee57458cebfaf6f092cc17c6f8f4c3860bf1f7ed87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.0
|
Release files / easylsb-1.0.9-py3-none-any.whl
| Download URL | easylsb-1.0.9-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d502fcb22cceba3efd7f73298cab047646a7d7e7dfaf74e297282c73a5bb701
|
|
BLAKE2b-256 checksum How to use checksums |
45b3dfe3dc69f6ab70ccc91b512d65a3e05c850b350fa3f22e5d66ab9f89e112
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.0
|
Security for easylsb 1.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.