Skip to content

Commit

Permalink
Issue #92 - Fixing error caused by versioning, mismatched output, and…
Browse files Browse the repository at this point in the history
… using wrong element from tuple. Renaming pylintrc to add good names Issue #87
  • Loading branch information
Daniel Mota committed Jan 4, 2018
1 parent d4c5425 commit 3cba629
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
File renamed without changes.
3 changes: 1 addition & 2 deletions steganographer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ def main():
parser.add_argument("-f", "--file", help="file to be hidden in the input file")
parser.add_argument("-r", "--reveal", action='store_true', help="a file will be revealed")
parser.add_argument("-v", "--version", action='version',
version="steganographer {}".format(pkg_resources.get_distribution('steganographer').version),
version="steganographer {}".format(pkg_resources.get_distribution('pip').version),
help="show version and exit")
args = parser.parse_args()

stegs = Steganographer()

# There is a message to hide.
if args.message:
print("output provided")
hidden_fname = stegs.steganographer_hide(args.input, args.message, args.output)
print("The message has been hidden in " + hidden_fname)
# There is a file to hide.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_steganographer.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def test_steganographer_inverse(hidden_message):

stegs = Steganographer()
revealed_message = stegs.steganographer_reveal(stegs.steganographer_hide(
clean_image, hidden_message, dirty_image))[1].decode('utf-8')
clean_image, hidden_message, dirty_image))[0].decode('utf-8')
assert revealed_message == hidden_message

os.remove(dirty_image)
Expand All @@ -656,7 +656,7 @@ def test_unicode_inverse():

stegs = Steganographer()
assert message == stegs.steganographer_reveal(stegs.steganographer_hide(CLEAN_PNG_LOCATION, message,
"tests/dirtyImage.png"))[1].decode('utf-8')
"tests/dirtyImage.png"))[0].decode('utf-8')


def test_main_hide_msg_with_output(capfd):
Expand Down

0 comments on commit 3cba629

Please sign in to comment.