README Updates, better readability in image generation

pull/1/head
Paul Warren 4 years ago
parent ad38acaff3
commit 2da196d14c

@ -2,3 +2,11 @@
A silly web API to add entropy to images in an attempt to destroy any steganography
curl -H "Content-Type: application/png" --data-binary @GPSPeedo1.png http://localhost:5002/desteg -o GPSPeedo1_Destegged.png
## Please don't use this!
It won't actually work on anything but the most naive steganographic implementations. This silly project fails to remove steghide embedded data, for example. It did make the embedded message fail to be extracted from images processed through [steganography](https://github.com/teovoinea/steganography), which uses simple LSB modifications to the Alpha channel (as at August 2019).

@ -33,11 +33,20 @@ def post_desteg():
# Create an array the same size
# Stuff it full of entropy
if (input_image.mode == "RGBA"):
entropy_array = numpy.random.rand(input_image.size[1],input_image.size[0],4)*3
entropy_image = Image.fromarray(entropy_array.astype('uint8'), mode="RGBA")
entropy_array = numpy.random.rand(
input_image.size[1],
input_image.size[0],
4)*6
entropy_image = Image.fromarray(
entropy_array.astype('uint8'),
mode="RGBA")
elif (input_image.mode == "RGB"):
entropy_array = numpy.random.rand(input_image.size[1],input_image.size[0],3)*3
entropy_image = Image.fromarray(entropy_array.astype('uint8'), mode="RGB")
entropy_array = numpy.random.rand(
input_image.size[1],
input_image.size[0],
3)*6
entropy_image = Image.fromarray(
entropy_array.astype('uint8'), mode="RGB")
else:
# Insert relevant error return here
pass

Loading…
Cancel
Save