Skip to content

Instantly share code, notes, and snippets.

@dap
dap / gist:151109
Created July 21, 2009 04:26
Detect PHP in non-php files
#!/usr/bin/perl
# php_watch.pl - Monitor directory for PHP code in non-.php files
# Darian Anthony Patrick <[email protected]>
#
# Uses inotify to monitor a directory for the
# existence of files containing PHP code which
# are not named with a .php file extension
use perl5i;
@dap
dap / gist:149704
Created July 18, 2009 22:07
Store PHP code in a GIF
#!/usr/bin/perl
# write_gif.pl - Store PHP code inside of a GIF
# Darian Anthony Patrick <[email protected]>
#
# Demonstration of masquerading PHP code inside
# of a file identifiable as GIF format
use perl5i;
use IO::All;
@dap
dap / gist:149564
Created July 18, 2009 13:37
Store PHP code in a JPEG
#!/usr/bin/perl
# write_jpg.pl - Store PHP code inside of a JPEG
# Darian Anthony Patrick <[email protected]>
#
# Demonstration of masquerading PHP code inside
# of a file identifiable as JPEG format
use perl5i;
use IO::All;