It's really worth looking at the titles of the challenges, without that "Listen" in the name it would have been quite hard to guess that there must be some kind of audio format hidden in the image. Did it with python:
indeed, that "listen" helped a lot, wasn't hard anyways
for the "converter": there's not much space for differences in implementations
here my PHP one
...somehow get a 503 when pasting my code, have it base64ed
Ah, very nice. I tried that too but I didn't know the file extension has to be ".rgb" for converting to raw files - my approach was ".raw" which didn't lead to success (it was a PNG file again).
I had to google a lot, but then simply opened the image in photoshop and saved it as .raw
then renamed it to .mp3 (maybe not necessary) and listened to the quite beautiful voice.
you won't believe it, but if you simply rename the PNG into SND, open with Audacity, and slow it down the speed twice without changing the pitch, you hear morse saying something like EAT TOMATO. This threw us off, until Virus installed the Irfan view plugins, and of course we removed the PNG header. Then the Irfan Multimedia Player could finally play it
import java.io.*;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
public class GetPixelColor
{
public static void main(String args[]) throws IOException {
File file_in = new File("listen.png");
BufferedImage image = ImageIO.read(file_in);
BufferedWriter out = new BufferedWriter(new FileWriter("RGB_output.raw"));
// Image size is 43x100 pixels
for(int y=0; y<100; y++) {
for(int x=0; x<43; x++) {
int clr = image.getRGB(x,y);
int red = (clr & 0x00ff0000) >> 16;
int green = (clr & 0x0000ff00) >> 8;
int blue = clr & 0x000000ff;
out.write(red); // endianness? red or blue here?
out.write(green);
out.write(blue); // endianness? blue or red here?
}
}
out.close();
}
}
This approach did not work though. Using the program "StegSolve" that dangermouse hinted me to, I got a file that I could listen to.
Strange is that the file size between the Java and the StegSolve output is the same, and the first bytes are identical. No idea why they would differ at some point afterwards, but they do. Oh well.
I just used IrfanView. For some reason I couldn't save it to RAW format, but then all I had to do was save to PPM binary format and remove manually the ASCII header...
Hello, for "decoding" I used IrfanView and saving as raw file.
I have a question:
How you createt this picture? I tried to do it with IrfanView (vice versa than decrypting), but I wasn't successful (probably I messed it up).
What software or script did you used? I would like to do something similar in visual basic, but I need some hind
#!/usr/bin/python
from PIL import Image
filename_out = "listen.mp3"
im = Image.open ( "listen.png" )
#print im.format, im.size, im.mode
im = im.convert('RGB')
b = im.tobytes ( )
f_out = file ( filename_out, 'wb' )
f_out.write ( b )
f_out.close ( )
A little spin that took me half an hour was, that the Pillow lib recognizes an alpha channel in the image and will save this channel to the output file, too - corrupting the output.
The line
Wow, finally I have decided to try it again. (with all hints from both challenges threads in mind) I have originally tried to convert the file to wav.
Looking to mpeg header format ... it become favourite ... my first try was just RGB info extraction what resulted in mp3 what could be listen, but I had problems to understand. Than I have added alpha chanel and result was not valid mp3 (even when I have tried alpha first/last). So I have returned back to just rgb.
And as I had feeling I hear 1234, I tried it ... I was really surprised it went through.
(Especially as it sounds way different what I have learned from SayIt).
OK when listened more slower, 2,3 is heard clearly 4 misses end and 1 is natural start of the sequence.