Browse Source

working on attacks01

cecylia 8 years ago
parent
commit
91465d400b
1 changed files with 13 additions and 14 deletions
  1. 13 14
      js/devicescripts.js

+ 13 - 14
js/devicescripts.js

@@ -141,7 +141,6 @@ var deviceScripts = {
                 if(packet.transport.proto == "encryption"){
                     if(packet.hasOwnProperty("application") && packet["application"].hasOwnProperty("type")){
                     var type = packet.application.type;
-
                     switch(type) {
                         case "keyrequest": 
                             var new_packet = {
@@ -181,19 +180,19 @@ var deviceScripts = {
                     }
                 }
             }
-        },                  
-        tappedRouter: {//Note: port 0 should be hooked up to tap device
-	    onPacketReceived: function(device, packet, portNum) {
-		for (var i = 0; i < device.rules.length; i++) {
-	    	    if (device.rules[i].dstip == packet.network.dstip) {
-                        if(portNum == 0){
-                            sendPacket(device.id, device.rules[i].portNum, packet);
-                        }
-		    }
-		}
-	    }
-	}
-    }                        
+        }
+    },
+    tappedRouter: {//Note: port 0 should be hooked up to tap device
+        onPacketReceived: function(device, packet, portNum) {
+            for (var i = 0; i < device.rules.length; i++) {
+                if (device.rules[i].dstip == packet.network.dstip) {
+                    if(portNum == 0){
+                        sendPacket(device.id, device.rules[i].portNum, packet);
+                    }
+                }
+            }
+        }
+    }
     
 }