|
@@ -185,10 +185,10 @@ public class HoneyHandler implements Runnable {
|
|
|
record.setTimestamp(System.currentTimeMillis());
|
|
|
record.setExternalIP(externalIP);
|
|
|
record.setLocalIP(client.getLocalAddress().getHostAddress());
|
|
|
- record.setLocalHost(client.getLocalAddress().getHostName());
|
|
|
+ record.setLocalHost(client.getLocalAddress().getHostAddress());
|
|
|
record.setLocalPort(protocol.getPort());
|
|
|
record.setRemoteIP(client.getInetAddress().getHostAddress());
|
|
|
- record.setRemoteHost(client.getInetAddress().getHostName());
|
|
|
+ record.setRemoteHost(client.getInetAddress().getHostAddress());
|
|
|
record.setRemotePort(client.getPort());
|
|
|
record.setBssid(BSSID);
|
|
|
record.setSsid(SSID);
|
|
@@ -230,21 +230,21 @@ public class HoneyHandler implements Runnable {
|
|
|
if (protocol.whoTalksFirst() == TALK_FIRST.SERVER) {
|
|
|
outputLine = protocol.processMessage(null);
|
|
|
writer.write(outputLine);
|
|
|
-// for (Packet o : outputLine) {
|
|
|
-// Logger.log(HoneyService.getContext(),
|
|
|
-// createRecord(TYPE.SEND, o.toString()));
|
|
|
-// }
|
|
|
+ for (Packet o : outputLine) {
|
|
|
+ Logger.log(HoneyService.getContext(),
|
|
|
+ createRecord(TYPE.SEND, o.toString()));
|
|
|
+ }
|
|
|
}
|
|
|
while (!thread.isInterrupted() && (inputLine = reader.read()) != null) {
|
|
|
outputLine = protocol.processMessage(inputLine);
|
|
|
-// Logger.log(HoneyService.getContext(),
|
|
|
-// createRecord(TYPE.RECEIVE, inputLine.toString()));
|
|
|
+ Logger.log(HoneyService.getContext(),
|
|
|
+ createRecord(TYPE.RECEIVE, inputLine.toString()));
|
|
|
if (outputLine != null) {
|
|
|
writer.write(outputLine);
|
|
|
-// for (Packet o : outputLine) {
|
|
|
-// Logger.log(HoneyService.getContext(),
|
|
|
-// createRecord(TYPE.SEND, o.toString()));
|
|
|
-// }
|
|
|
+ for (Packet o : outputLine) {
|
|
|
+ Logger.log(HoneyService.getContext(),
|
|
|
+ createRecord(TYPE.SEND, o.toString()));
|
|
|
+ }
|
|
|
}
|
|
|
if (protocol.isClosed()) {
|
|
|
break;
|