Re: [OT] Perl Code Embedded in an Image
by diotalevi (Canon) on Mar 31, 2005 at 14:01 UTC
|
There's actually a related JavaScript security bug in Netscape 4.x about this. The text data is stored in a comment tag inside the image. When Netscape viewed the "About" page for the image, it also displayed the embedded comments. It didn't escape the input so any embedded JavaScript was then run in "local filesystem" context instead of "internet" context.
| [reply] |
Re: [OT] Perl Code Embedded in an Image
by NateTut (Deacon) on Mar 30, 2005 at 18:45 UTC
|
Way cool. Your post will now be destroyed in the interests of national security. | [reply] |
Re: [OT] Perl Code Embedded in an Image
by Tanktalus (Canon) on Mar 30, 2005 at 16:52 UTC
|
| [reply] [d/l] |
Re: [OT] Perl Code Embedded in an Image
by merlyn (Sage) on Mar 30, 2005 at 19:01 UTC
|
How did you get a node that is just an image? That's the most amazing part of this trick!
| [reply] |
|
| [reply] |
|
| [reply] |
|
|
| [reply] |
Re: [OT] Perl Code Embedded in an Image
by cristian (Hermit) on Mar 30, 2005 at 20:59 UTC
|
The code perl Embedded can be runing into execute , jpg , png , pdf anything with perl -x , great and more more and more | [reply] |
Re: [OT] Perl Code Embedded in an Image
by ambrus (Abbot) on Oct 06, 2005 at 21:31 UTC
|
Without having known about your post, I wondered on the same thing a few months later.
I wanted an image that runs as a perl script without the -x switch or any other switches.
First, I've decided that this was impossible to do with a PNG image, because perl chokes right away on its header.
Then, I was looking at GIF, but I've found the specs too complicated, so I took it away.
I've however produced a BMP (windows bitmap) that doubles as a JAPH. BMP is now displayed in most browsers, however it's not allowed to upload one as a monk image (maybe because when this was decided, Netscape 4 which doesn't have BMP support, was still common back then).
Thus, I can only show this image off-site: japh.bmp.
To try the perl part, download it and run with perl japh.bmp.
(The japh this one has is a trivial one, but I can change it to any perl code of course.)
| [reply] [d/l] |
|
I want to upload a copy of that file here in case you can't reach the external server. However, I don't want to just include it in code tags because that could break it (by eg. mangling newline characters).
Thus, here's a perl script that you should run to reproduce the script: redirect its output to a file, say japh.bmp, then run the resulting file with perl like perl japh.bmp and/or view it with some image viewer program.
| [reply] [d/l] [select] |
Re: [OT] Perl Code Embedded in an Image
by cristian (Hermit) on Mar 30, 2005 at 20:13 UTC
|
Great uuuuuffffff warning security trick .
The investigation in your brain , yes is hacking. | [reply] |
Re: [OT] Perl Code Embedded in an Image
by Ultra (Hermit) on Apr 04, 2005 at 18:20 UTC
|
| [reply] |