A tool for embedding and extracting files and strings with AES encryption.
Project description
Mymra
This project allows you to embed and extract files or strings within other files using AES encryption.
Installation
Install library:
pip install mymra
Usage Examples
Library Functions
Embedding a File
Embed a file into a host file:
from mymra import embed_file
embed_file(
input_file_path='123.mp4', # File to embed
host_file_path='123.png', # Host file
output_file_path='1488.png', # Path to save file with embedded data
password='COCKER', # Optional password
marker='ITSTEST' # Optional marker
xor_key='123' # Optional XOR-key for marker encryption
)
Extracting a File
Extract an embedded file from a host file:
from mymra import extract_file
output_path = extract_file(
host_file_path='1488.png', # File containing embedded data
password='COCKER', # Optional password
marker='ITSTEST' # Optional marker
xor_key='123' # Optional XOR-key for marker encryption
)
print(output_path)
Embedding a string
Embed a string into a host file:
from mymra import embed_string
embed_string(
input_string='secret', # String to embed
host_file_path='123.png', # Host file
output_file_path='output.png', # Path to save file with embedded string
password='COCKER', # Optional password
marker='ITSTEST' # Optional marker
xor_key='123' # Optional XOR-key for marker encryption
)
Extracting a string
Extract a string from file:
from mymra import extract_string
string = extract_string(
host_file_path='output.png', # File with embedded string
password='COCKER', # Optional password
marker='ITSTEST' # Optional marker
xor_key='123' # Optional XOR-key for marker encryption
)
print(string)
Deembedding
Remove embedded data from a file:
from mymra import deembed_file
deembed_file(
host_file_path='123.png', # File with embedded data
output_file_path='321.png', # Path to save cleaned file
marker='ITSTEST' # Optional marker
xor_key='123' # Optional XOR-key for marker encryption
)
Analyzing a File
Analyze a host file to determine the embedded content type, metadata, or content:
from mymra import analyze_file
# Analyze a file containing an embedded file
result = analyze_file(
host_file_path='1488.png', # File containing embedded data
password='COCKER', # Optional password
marker='ITSTEST' # Optional marker
xor_key='123' # Optional XOR-key for marker encryption
)
if result['type'] == 'file':
print("Embedded file details:")
print(f"Name: {result['file_name']}")
print(f"Extension: {result['file_extension']}")
print(f"Size: {result['file_size']} bytes")
elif result['type'] == 'string':
print("Embedded string content:")
print(result['value'])
Command-Line Interface
Embedding a File
Embed a file with optional arguments:
mymra embed 123.mp4 123.png 1488.png -p COCKER -m ITSTEST -xor 123
Extracting a File
Extract an embedded file using optional arguments:
mymra extract 1488.png -p COCKER -m ITSTEST -xor 123
Embedding a String
Embed a string into a host file:
mymra embed_string "Secret Data" 123.png string_embedded.png -p COCKER -m ITSTEST -xor 123
Extracting a String
Extract a string from a host file:
mymra extract_string string_embedded.png -p COCKER -m ITSTEST -xor 123
Removing Embedded Data
Remove embedded data from a file:
mymra deembed 1488.png cleaned_123.png -m ITSTEST
Analyzing a File
Analyze a host file to identify embedded content:
- Analyzing a file containing an embedded file:
mymra analyze 1488.png -p COCKER -m ITSTEST -xor 123
Expected output:
Embedded file details:
Name: example.mp4
Extension: mp4
Size: 1048576 bytes
- Analyzing a file containing an embedded string:
mymra analyze string_embedded.png -p COCKER -m ITSTEST -xor 123
Expected output:
Embedded string content:
This is a secret string
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mymra-1.5.0.2.tar.gz
.
File metadata
- Download URL: mymra-1.5.0.2.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f4da1490778a524a2903ab0c1070049bebdafdcf7bb62625bc33fb75930dcbf |
|
MD5 | d1f4ed5a4c64721628bca910e549892d |
|
BLAKE2b-256 | 8cc98387461bbc60d879a86c75a90b2823ebd1bf6a496ccfd99be48291467121 |
Provenance
The following attestation bundles were made for mymra-1.5.0.2.tar.gz
:
Publisher:
publish.yml
on moshiax/mymra
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
mymra-1.5.0.2.tar.gz
- Subject digest:
5f4da1490778a524a2903ab0c1070049bebdafdcf7bb62625bc33fb75930dcbf
- Sigstore transparency entry: 163347872
- Sigstore integration time:
- Permalink:
moshiax/mymra@cc84dd57d9a720fad6f91d0084061d1d34884117
- Branch / Tag:
refs/heads/main
- Owner: https://github.com/moshiax
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish.yml@cc84dd57d9a720fad6f91d0084061d1d34884117
- Trigger Event:
push
- Statement type:
File details
Details for the file mymra-1.5.0.2-py3-none-any.whl
.
File metadata
- Download URL: mymra-1.5.0.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72c144c69f2b01647b334d26dfe5689e69bf936d2ea3df54679e4d46e30824b6 |
|
MD5 | 7ac7eb9db14dc80c81fd9bc0ff872043 |
|
BLAKE2b-256 | bc81491427d075a4035da120811c759b4e2e7846491470230bbd8d2cbf54fbb5 |
Provenance
The following attestation bundles were made for mymra-1.5.0.2-py3-none-any.whl
:
Publisher:
publish.yml
on moshiax/mymra
-
Statement:
- Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
mymra-1.5.0.2-py3-none-any.whl
- Subject digest:
72c144c69f2b01647b334d26dfe5689e69bf936d2ea3df54679e4d46e30824b6
- Sigstore transparency entry: 163347875
- Sigstore integration time:
- Permalink:
moshiax/mymra@cc84dd57d9a720fad6f91d0084061d1d34884117
- Branch / Tag:
refs/heads/main
- Owner: https://github.com/moshiax
- Access:
public
- Token Issuer:
https://token.actions.githubusercontent.com
- Runner Environment:
github-hosted
- Publication workflow:
publish.yml@cc84dd57d9a720fad6f91d0084061d1d34884117
- Trigger Event:
push
- Statement type: