Using a gem package called zsteg to solve door 3.

This commit is contained in:
2017-12-17 01:04:54 +01:00
parent 151ee69e2f
commit 0f185f864a
3 changed files with 22 additions and 1 deletions

BIN
luke_03/bilde.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

12
luke_03/steganography.py Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env python3.6
import subprocess, os
def main():
path = os.path.dirname(os.path.realpath(__file__)) + '/bilde.png'
result = subprocess.run(['zsteg', path], stdout=subprocess.PIPE)
decode = result.stdout.decode('utf-8')
return decode
if __name__ == '__main__':
main()

View File

@@ -1,2 +1,11 @@
from luke_03.steganography import main
def test_answer(): def test_answer():
assert False answer = 'Steganography is awesome and you Knowit!'
output = main()
print(output)
print(answer in output)
if answer in output:
assert True
else:
assert False