Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- # source : https://pastebin.com/zk8v8jp6
- use strict;
- use IO::Socket;
- sub Wait {
- wait; # wait needed to keep <defunct> pids from building up
- }
- $SIG{CHLD} = \&Wait;
- my $server = IO::Socket::INET->new(
- LocalPort => 1337, # set port
- Type => SOCK_STREAM,
- Reuse => 1,
- Listen => 10) or die "$@\n";
- my $client ;
- while($client = $server->accept()) {
- select $client;
- print $client "HTTP/1.0 200 OK\r\n";
- print $client "Content-type: text/html\r\n\r\n";
- print $client 'Hacked by ./tokeichun'; # set your html content
- }
- continue {
- close($client); #kills hangs
- kill CHLD => -$$;
- }
Add Comment
Please, Sign In to add comment