mirror of
https://github.com/KevinMidboe/knowit_julekalender-2017.git
synced 2025-10-29 09:40:18 +00:00
Using a gem package called zsteg to solve door 3.
This commit is contained in:
BIN
luke_03/bilde.png
Normal file
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
12
luke_03/steganography.py
Executable 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()
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user