Browse Source

Changed JSON format to contain attack type
Changed Src and Dst in JSON format

qam 10 years ago
parent
commit
f73b062c52
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/de/tudarmstadt/informatik/hostage/logging/Record.java

+ 1 - 1
src/de/tudarmstadt/informatik/hostage/logging/Record.java

@@ -237,7 +237,7 @@ public class Record implements Serializable {
 		switch (format){
 			// TraCINg Upload format, replaces internal ip's with external ip of network
 			case 1: 
-				return String.format("{ \"sensor\":{\"type\": \"Honeypot\", \"name\": \"HOsTaGe\"}, \"type\": 0, \"src\":{\"ip\": \"%s\", \"port\": %d}, \"dst\":{\"ip\": \"%s\", \"port\": %d} }", externalIP, localPort, externalIP, remotePort);
+				return String.format("{ \"sensor\":{\"type\": \"Honeypot\", \"name\": \"HOsTaGe\"}, \"type\": \"%s\", \"src\":{\"ip\": \"%s\", \"port\": %d}, \"dst\":{\"ip\": \"%s\", \"port\": %d} }", protocol + " server access", externalIP, remotePort, externalIP, localPort);
 			// ViewLogTable format: contains all important information about an attack.
 			case 2: 
 				return String.format("%d: %s\nIn %s\n(%s)\nFrom [%s:%d]\nTo [%s:%d]\nMessage: %s\n", attack_id, protocol, SSID, BSSID, remoteIP.getHostAddress(), remotePort, localIP.getHostAddress(), localPort, packet);