-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
40 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
from __future__ import print_function | ||
from maraithal.lsbstegano import LSBStegano | ||
import argparse | ||
from getpass import getpass | ||
try: | ||
raw_input | ||
except NameError: | ||
raw_input = input | ||
|
||
def main(): | ||
""" | ||
Main function for app | ||
""" | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('mode', help='enc or dec to encode or decode text respectively') | ||
parser.add_argument('image', help='Path to PNG image to be used') | ||
parser.add_argument('--message-file', help='File to read text from') | ||
parser.add_argument('--passphrase', help='Passphrase to use while encoding or decoding') | ||
args = parser.parse_args() | ||
|
||
if args.mode == 'enc': | ||
lsb = LSBStegano(args.image) | ||
key = args.passphrase if args.passphrase else getpass() | ||
print('Message:', end='') | ||
text = raw_input() | ||
lsb.text_encode(text, key) | ||
elif args.mode == 'dec': | ||
lsb = LSBStegano(args.image) | ||
key = args.passphrase if args.passphrase else getpass() | ||
print(lsb.text_decode(key)) | ||
|
||
if __name__ == '__main__': | ||
main() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,10 @@ | |
'url': 'https://github.com/rkrp/maraithal', | ||
'download_url': 'https://github.com/rkrp/maraithal', | ||
'author_email': '[email protected]', | ||
'version': '0.4', | ||
'version': '0.5', | ||
'install_requires': ['pillow'], | ||
'packages': ['maraithal'], | ||
'scripts': [], | ||
'scripts': ['bin/maraithal'], | ||
'name': 'maraithal', | ||
'license' : 'GPLv3', | ||
# 'classifiers' : { | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.