示例#1
0
 def backdoor(self, command):
     if len(command) == 3:
         try:
             ip = command[2].split(':')[0]
             port = command[2].split(':')[1]
         except:
             backdoor.list()
             ip = None
         if ip:
             #if command[1] == "bash" or command[1] == "sh":
             #    backdoor.bash(ip, port)
             #elif command[1] == "java":
             #    backdoor.java(ip, port)
             if command[1] in ("metasploit", "msf"):
                 backdoor.msf(ip, port)
             #elif command[1] == "metasploit-php" or command[1] == "msf-php":
             #    backdoor.msf_php(ip, port)
             elif command[1] in ("netcat", "nc"):
                 backdoor.netcat(ip, port)
             elif command[1] in ("bash", "sh"):
                 backdoor.bash(ip, port)
             elif command[1] in ("perl", "pl"):
                 backdoor.perl(ip, port)
             #elif command[1] == "php":
             #    backdoor.php(ip, port)
             elif command[1] == "php-cli":
                 backdoor.php_cli(ip, port)
             elif command[1] in ("python", "py"):
                 backdoor.python(ip, port)
             elif command[1] in ("ruby", "rb"):
                 backdoor.ruby(ip, port)
             elif command[1] == "xterm":
                 backdoor.xterm(ip, port)
             else:
                 backdoor.list()
         else:
             print 'Invalid IP address or port'
     elif len(command) == 2:
         if command[1] in ("spread", "self"):
             backdoor.spread()
         elif command[1] == "php":
             backdoor.php(info.host_ip.split(',')[0], info.local_ip)
         else:
             backdoor.list()
     else:
         backdoor.list()
示例#2
0
 def backdoor(self, command):
     if len(command) == 3:
         try:
             ip = command[2].split(':')[0]
             port = command[2].split(':')[1]
         except:
             backdoor.list()
             ip = None
         if ip:
             #if command[1] == "bash" or command[1] == "sh":
             #    backdoor.bash(ip, port)
             #elif command[1] == "java":
             #    backdoor.java(ip, port)
             if command[1] in ("metasploit", "msf"):
                 backdoor.msf(ip, port)
             #elif command[1] == "metasploit-php" or command[1] == "msf-php":
             #    backdoor.msf_php(ip, port)
             elif command[1] in ("netcat", "nc"):
                 backdoor.netcat(ip, port)
             elif command[1] in ("bash", "sh"):
                 backdoor.bash(ip, port)
             elif command[1] in ("perl", "pl"):
                 backdoor.perl(ip, port)
             #elif command[1] == "php":
             #    backdoor.php(ip, port)
             elif command[1] == "php-cli":
                 backdoor.php_cli(ip, port)
             elif command[1] in ("python", "py"):
                 backdoor.python(ip, port)
             elif command[1] in ("ruby", "rb"):
                 backdoor.ruby(ip, port)
             elif command[1] == "xterm":
                 backdoor.xterm(ip, port)
             else:
                 backdoor.list()
         else:
             print 'Invalid IP address or port'
     elif len(command) == 2:
         if command[1] in ("spread", "self"):
             backdoor.spread()
         elif command[1] == "php":
             backdoor.php(info.host_ip.split(',')[0], info.local_ip)
         else:
             backdoor.list()
     else:
         backdoor.list()