How would someone go about quickly testing each and every image to see if it had a rar or any other file hidden inside of it? What language would be best for doing this, if a tool isn't already available?
So, cat each image file and search for "Rar!" " (something like e that)
It looks that that's the header for each rar file. I'm thinking of searching each image file to find the telltale .Rar header, but .rar files aren't the only thing that someone could put in a file.
Writing a script to look for all possible files that could be put in is quite unnecessary and tedious. The optimal way to do this would be if I knew what part of my images were necessary/not junk, and then I could just extract the remaining part, regardless of what file format it was. Too bad I have no idea how to do that as of yet.
This is gonna take so long...
Name:
Anonymous2007-12-16 13:02
strings file | grep 'Rar!'
is quick enough, no need to over-engineer things.
Name:
Anonymous2007-12-16 13:06
thanks i actually came back to post that i found that out
grep 'Rar!' *.jpg tells me exactly what i want. bash is so fucking useful. :)
strings doesn't work though. I'm using cygwin on windows, maybe thats why.
Name:
Anonymous2007-12-16 13:24
>>6
That's not bash, that's grep along with standard globbing.
No bash-specific features.
strings is for strings in binaries, it's not supposed to be used for this.
Name:
Anonymous2007-12-16 13:28
>>7
rar archives are binary files too, although not executable.
Name:
Anonymous2007-12-16 13:38
>>8
ASCII text files are binary too, so what? I am talking about ``binaries,'' the term used exclusively for executable files (I should have mentioned libraries as well, and perhaps object files).
See http://www.jpeg.org/public/jfif.pdf - use it to write a program that determines what the size of the file should be. If the file is larger than that, then there is the hidden data.
>>18 here, I would enjoy Haskell if my brain was advanced enough to understand it. Alas, this is not the case, so all I can do is attack it with silly arguments and pretend C is the best language ever, in order to hide my stupidity.
>>19
no, It's crap, impossible to do anything and monads a just a hack to get mutable state, obviously you should just use C for everything since thats a real language people get things DONE with.
Name:
Anonymous2007-12-17 22:18
I actually suspect >>18 and >>20 are actually two separate humans.
>>35
Nobody does that, because there would be no easy way to view the second JPEG.
Name:
Anonymous2007-12-20 16:22
>>36
of course there is, just rename it to .jpg and open it. dumbass.
Name:
Anonymous2008-01-03 13:01
so with cygwin after downloading it do I just type in grep 'Rar!' *.jpg and its suppose to pull it up ? because its not working for me it tells me grep: *.jpg: No such file or directory.
Name:
Anonymous2008-01-03 13:12
>>38
Make sure you're using the actual cygwin shell and just cmd.exe
Name:
Anonymous2008-01-03 13:21
when I open it, it bring up a cmd.exe
says something about mkpasswd
Ok so I found the directory and I got the command line grep 'Rar!' *.jpg to go in with an error what is suppose to happen I thought it would find all the pictures with hidden files all it did was go to a new command line
Name:
Anonymous2008-01-03 15:10
>>42
God damn it you fucking retard, just install ubuntu and be done with it for fucks sake. I'm pretty sure you fit its target audience.
also # php -r "foreach(scandir('.')as$l)if(!is_dir($l))if(strstr(file_get_conte
nts($l),'Rar!'))echo$l.\"\n\";"
in before perl -e "$_+@;@;$&*(@£W£-__£*6*(_;eval"
Name:
Anonymous2008-01-03 15:51
wow, chill out dude I was just asking a question sorry I'm not as leet as you but I'm learning I'm new to this just out if high school only have vb and Java AP under my belt and that in its self is so different from this I just got cygwin today so take it easy I didnt mean to get on your nerves.
Name:
Anonymous2008-01-03 15:58
>>44 wow, chill out dude
Wow, wow, dude, wow, dude, chill! No need to go young-and-cool on me, or anyone, in that matter. Man. sorry I'm not as leet as you Look at the sarcasm! Just look at Mr. Cool-And-Suave! I'm new to this just out if high school
Aw, fuck. only have vb and Java AP under my belt
Awwwww, fuuuuuuuck got cygwin today man I didnt mean to get on your nerves.
Well, you fail at that, son.
Name:
Anonymous2008-01-03 16:08
Emacs is clearly superior to vi(m), because it comes with a copy of Tetris.
Name:
Anonymous2008-01-03 16:23
>>46 /usr/share/vim/macros % cat README.txt
hanoi Macros that solve the tower of hanoi problem.
life Macros that run Conway's game of life.
maze Macros that solve a maze (amazing!).
urm Macros that simulate a simple computer: "Universal Register Machine"
>>49
They understand the importance of side effects, so they travel without end to escape them. They're still there, of course, but they can pretend they aren't.
Name:
Anonymous2008-01-03 18:07
i got as far as perl -e "foreach $l(<*>){print $l.\"\n\" if(!-d $l)}" and got bored.
Name:
Anonymous2008-01-03 18:23
>>51
Yeah, I couldn't get past find . -name '*.jpg' -execdir rm '{}' ';'