diff --git a/luke_03/bilde.png b/luke_03/bilde.png new file mode 100644 index 0000000..002db5f Binary files /dev/null and b/luke_03/bilde.png differ diff --git a/luke_03/steganography.py b/luke_03/steganography.py new file mode 100755 index 0000000..f087cb9 --- /dev/null +++ b/luke_03/steganography.py @@ -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() \ No newline at end of file diff --git a/tests/test_luke03.py b/tests/test_luke03.py index 4d059ef..97ae004 100644 --- a/tests/test_luke03.py +++ b/tests/test_luke03.py @@ -1,2 +1,11 @@ +from luke_03.steganography import main + 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