Browse Source

updating dos level 3

cecylia 8 years ago
parent
commit
190573ea45
2 changed files with 11 additions and 5 deletions
  1. 1 1
      js/devicescripts.js
  2. 10 4
      levels/03 DoS/dos03.json

+ 1 - 1
js/devicescripts.js

@@ -125,7 +125,7 @@ var deviceScripts = {
             } else {
                 if(packet.network.dstip == "Broadcast"){
                     for(var i=0; i<device.ports.length; i++){
-                        if(i != portNum){
+                        if((i != portNum) && (getPortRecipient(device.id, i) != "Google"){
                             sendPacket(device.id, i, packet);
                         }
                     }

+ 10 - 4
levels/03 DoS/dos03.json

@@ -2,28 +2,34 @@
 	devices:[
 		{
 			id:"Alice",
+                        image: "macbook",
 			ports:1,
 			x:0.25,
-			y:0.3,
+			y:0.2,
 			player:true
 		},
 		{
 			id:"Barbara",
+                        image: "iphone-1",
 			ports:1,
 			x:0.25,
-			y:0.4
+			y:0.4,
+                        script: deviceScripts.ping
 		},
 		{
 			id:"Carol",
+                        image: "server",
 			ports:1,
 			x:0.25,
-			y:0.5
+			y:0.6,
+                        script: deviceScripts.ping
 		},
 		{
 			id:"Darcy",
 			ports:1,
 			x:0.25,
-			y:0.6
+			y:0.8,
+                        script: deviceScripts.ping
 		},
 		{
 			id:"Google",