From 3f53bd3f23751c3782870e7bc2e4d17bfac514dd Mon Sep 17 00:00:00 2001 From: rtrimana Date: Fri, 6 Jul 2018 14:47:42 -0700 Subject: [PATCH] A few more changes for capturing pairs. --- .../dlink-june-26-2018.timestamps | 147 +++++++++++ .../devices/tplink_switch/datapoints.csv | 249 +++++++++++++++--- .../tplink-feb-13-2018.timestamps | 24 +- .../edu/uci/iotproject/FlowPatternFinder.java | 16 +- .../main/java/edu/uci/iotproject/Main.java | 6 +- 5 files changed, 388 insertions(+), 54 deletions(-) create mode 100644 Code/Projects/SmartPlugDetector/devices/dlink_switch/dlink-june-26-2018.timestamps diff --git a/Code/Projects/SmartPlugDetector/devices/dlink_switch/dlink-june-26-2018.timestamps b/Code/Projects/SmartPlugDetector/devices/dlink_switch/dlink-june-26-2018.timestamps new file mode 100644 index 0000000..5aba10d --- /dev/null +++ b/Code/Projects/SmartPlugDetector/devices/dlink_switch/dlink-june-26-2018.timestamps @@ -0,0 +1,147 @@ +10:12:06 AM +10:14:17 AM +10:16:29 AM +10:18:41 AM +10:20:53 AM +10:23:06 AM +10:25:12 AM +10:27:24 AM +10:29:36 AM +10:31:47 AM +10:33:59 AM +10:36:11 AM +10:38:23 AM +10:40:34 AM +10:42:46 AM +10:44:58 AM +10:47:10 AM +10:49:21 AM +10:51:33 AM +10:53:45 AM +10:55:56 AM +10:58:08 AM +11:00:20 AM +11:02:32 AM +11:04:44 AM +11:06:55 AM +11:09:07 AM +11:11:19 AM +11:13:31 AM +11:15:43 AM +11:17:54 AM +11:20:06 AM +11:22:18 AM +11:24:30 AM +11:26:42 AM +11:28:53 AM +11:31:05 AM +11:33:17 AM +11:35:29 AM +11:37:41 AM +11:39:53 AM +11:42:05 AM +11:44:16 AM +11:46:28 AM +11:48:40 AM +11:50:52 AM +11:53:04 AM +11:55:16 AM +11:57:27 AM +11:59:39 AM +12:01:51 PM +12:04:03 PM +12:06:15 PM +12:08:26 PM +12:10:38 PM +12:12:50 PM +12:15:02 PM +12:17:14 PM +12:19:25 PM +12:21:37 PM +12:23:49 PM +12:26:01 PM +12:28:13 PM +12:30:25 PM +12:32:36 PM +12:34:48 PM +12:37:00 PM +12:39:12 PM +12:41:24 PM +12:43:35 PM +12:45:47 PM +12:47:59 PM +12:50:11 PM +12:52:23 PM +12:54:34 PM +12:56:46 PM +12:58:58 PM +01:01:10 PM +01:03:22 PM +01:05:34 PM +01:07:45 PM +01:09:57 PM +01:12:09 PM +01:14:21 PM +01:16:33 PM +01:18:44 PM +01:20:56 PM +01:23:08 PM +01:25:20 PM +01:27:31 PM +01:29:43 PM +01:31:55 PM +01:34:07 PM +01:36:19 PM +01:38:30 PM +01:40:42 PM +01:42:54 PM +01:45:06 PM +01:47:18 PM +01:49:29 PM +01:51:41 PM +01:53:53 PM +01:56:05 PM +01:58:17 PM +02:00:29 PM +02:02:40 PM +02:04:52 PM +02:07:04 PM +02:09:16 PM +02:11:27 PM +02:13:39 PM +02:15:51 PM +02:18:03 PM +02:20:14 PM +02:22:26 PM +02:24:38 PM +02:26:50 PM +02:29:02 PM +02:31:13 PM +02:33:25 PM +02:35:37 PM +02:37:49 PM +02:40:01 PM +02:42:12 PM +02:44:24 PM +02:46:36 PM +02:48:48 PM +02:51:00 PM +02:53:12 PM +02:55:23 PM +02:57:35 PM +02:59:47 PM +03:01:59 PM +03:04:11 PM +03:06:22 PM +03:08:34 PM +03:10:46 PM +03:12:58 PM +03:15:10 PM +03:17:22 PM +03:19:33 PM +03:21:45 PM +03:23:57 PM +03:26:09 PM +03:28:21 PM +03:30:32 PM +03:32:44 PM diff --git a/Code/Projects/SmartPlugDetector/devices/tplink_switch/datapoints.csv b/Code/Projects/SmartPlugDetector/devices/tplink_switch/datapoints.csv index d3261f8..e20e14c 100644 --- a/Code/Projects/SmartPlugDetector/devices/tplink_switch/datapoints.csv +++ b/Code/Projects/SmartPlugDetector/devices/tplink_switch/datapoints.csv @@ -1,37 +1,212 @@ -2018-02-13T21:38:05.043416Z, 583, 1514 -2018-02-13T21:38:05.155228Z, 257, 117 -2018-02-13T21:38:05.163863Z, 556, 1093 -2018-02-13T21:38:05.308829Z, 97, 1514 -2018-02-13T21:39:04.000762Z, 257, 117 -2018-02-13T21:39:04.010561Z, 557, 1095 -2018-02-13T21:39:04.206016Z, 97, 1514 -2018-02-13T21:40:05.753243Z, 257, 117 -2018-02-13T21:40:05.762267Z, 556, 1093 -2018-02-13T21:40:05.931412Z, 97, 1514 -2018-02-13T21:41:08.353766Z, 257, 117 -2018-02-13T21:41:08.362631Z, 557, 1094 -2018-02-13T21:41:08.546560Z, 97, 1514 -2018-02-13T21:42:08.123413Z, 257, 117 -2018-02-13T21:42:08.131924Z, 556, 1093 -2018-02-13T21:42:08.494681Z, 97, 1514 -2018-02-13T21:43:09.826520Z, 257, 117 -2018-02-13T21:43:09.837181Z, 557, 1094 -2018-02-13T21:43:09.966621Z, 97, 1514 -2018-02-13T21:45:25.365342Z, 257, 117 -2018-02-13T21:45:25.603747Z, 556, 1093 -2018-02-13T21:45:25.845745Z, 97, 1514 -2018-02-13T21:46:27.695935Z, 257, 117 -2018-02-13T21:46:27.704376Z, 557, 1094 -2018-02-13T21:46:27.830049Z, 97, 1514 -2018-02-13T21:47:29.288401Z, 257, 117 -2018-02-13T21:47:29.296717Z, 556, 1093 -2018-02-13T21:47:29.429058Z, 97, 1514 -2018-02-13T21:48:29.928399Z, 257, 117 -2018-02-13T21:48:29.937240Z, 557, 1094 -2018-02-13T21:48:30.137628Z, 97, 1514 -2018-02-13T21:49:31.802264Z, 257, 117 -2018-02-13T21:49:31.811145Z, 556, 1093 -2018-02-13T21:49:31.945247Z, 97, 1514 -2018-02-13T21:50:31.153609Z, 257, 117 -2018-02-13T21:50:31.163110Z, 557, 1094 -2018-02-13T21:50:31.329159Z, 97, \ No newline at end of file +2018-06-14T21:26:52.605940Z, 583, 1514 +2018-06-14T21:26:52.735845Z, 257, 117 +2018-06-14T21:26:52.751637Z, 557, 1232 +2018-06-14T21:26:52.942376Z, 97, 1514 +2018-06-14T21:31:15.929711Z, 257, 117 +2018-06-14T21:31:15.955136Z, 557, 1232 +2018-06-14T21:31:16.053208Z, 97, 1514 +2018-06-14T21:33:27.814139Z, 257, 117 +2018-06-14T21:33:27.838872Z, 556, 1231 +2018-06-14T21:33:27.944639Z, 97, 1514 +2018-06-14T21:35:39.384597Z, 257, 117 +2018-06-14T21:35:39.399549Z, 557, 1232 +2018-06-14T21:35:39.493602Z, 97, 1514 +2018-06-14T21:37:51.337631Z, 257, 117 +2018-06-14T21:37:51.346803Z, 556, 1231 +2018-06-14T21:37:51.464128Z, 97, 1514 +2018-06-14T21:40:02.949700Z, 257, 117 +2018-06-14T21:40:02.958853Z, 557, 1232 +2018-06-14T21:40:03.060923Z, 97, 1514 +2018-06-14T21:42:14.773280Z, 257, 117 +2018-06-14T21:42:14.782190Z, 556, 1232 +2018-06-14T21:42:15.013423Z, 97, 1514 +2018-06-14T21:44:26.515492Z, 257, 117 +2018-06-14T21:44:26.531874Z, 557, 1233 +2018-06-14T21:44:26.724732Z, 97, 1514 +2018-06-14T21:46:38.112283Z, 257, 117 +2018-06-14T21:46:38.123799Z, 556, 1231 +2018-06-14T21:46:38.371410Z, 97, 1514 +2018-06-14T21:48:49.822864Z, 257, 117 +2018-06-14T21:48:49.831109Z, 557, 1232 +2018-06-14T21:48:49.920489Z, 97, 1514 +2018-06-14T21:51:01.570404Z, 257, 117 +2018-06-14T21:51:01.580522Z, 556, 1232 +2018-06-14T21:51:01.686542Z, 97, 1514 +2018-06-14T21:53:13.290982Z, 257, 117 +2018-06-14T21:53:13.300135Z, 557, 1232 +2018-06-14T21:53:13.388833Z, 97, 1514 +2018-06-14T21:55:25.010146Z, 257, 117 +2018-06-14T21:55:25.018841Z, 556, 1231 +2018-06-14T21:55:25.107384Z, 97, 1514 +2018-06-14T21:57:36.737105Z, 257, 117 +2018-06-14T21:57:36.747764Z, 557, 1232 +2018-06-14T21:57:36.848624Z, 97, 1514 +2018-06-14T21:59:48.451103Z, 257, 117 +2018-06-14T21:59:48.459599Z, 556, 1231 +2018-06-14T21:59:48.550304Z, 97, 1514 +2018-06-14T22:02:00.123236Z, 257, 117 +2018-06-14T22:02:00.174134Z, 557, 1233 +2018-06-14T22:02:00.274621Z, 97, 1514 +2018-06-14T22:04:11.987297Z, 257, 117 +2018-06-14T22:04:11.999329Z, 556, 1231 +2018-06-14T22:04:12.101197Z, 97, 1514 +2018-06-14T22:06:23.548097Z, 257, 117 +2018-06-14T22:06:23.557567Z, 557, 1232 +2018-06-14T22:06:23.655666Z, 97, 1514 +2018-06-14T22:08:35.266519Z, 257, 117 +2018-06-14T22:08:35.276110Z, 556, 1232 +2018-06-14T22:08:35.372971Z, 97, 1514 +2018-06-14T22:10:46.993448Z, 257, 117 +2018-06-14T22:10:47.004664Z, 557, 1232 +2018-06-14T22:10:47.094221Z, 97, 1514 +2018-06-14T22:12:58.719472Z, 257, 117 +2018-06-14T22:12:58.729955Z, 556, 1231 +2018-06-14T22:12:58.825877Z, 97, 1514 +2018-06-14T22:15:10.424740Z, 257, 117 +2018-06-14T22:15:10.439685Z, 557, 1232 +2018-06-14T22:15:10.529340Z, 97, 1514 +2018-06-14T22:17:22.490347Z, 257, 117 +2018-06-14T22:17:22.499099Z, 556, 1231 +2018-06-14T22:17:22.602375Z, 97, 1514 +2018-06-14T22:19:33.901877Z, 257, 117 +2018-06-14T22:19:34.027607Z, 557, 1232 +2018-06-14T22:19:34.267480Z, 97, 1514 +2018-06-14T22:21:45.607148Z, 257, 117 +2018-06-14T22:21:45.615804Z, 556, 1231 +2018-06-14T22:21:45.705662Z, 97, 1514 +2018-06-14T22:23:57.442622Z, 257, 117 +2018-06-14T22:23:57.683565Z, 557, 1232 +2018-06-14T22:23:57.798191Z, 97, 1514 +2018-06-14T22:26:09.017436Z, 257, 117 +2018-06-14T22:26:09.027137Z, 556, 1231 +2018-06-14T22:26:09.122329Z, 97, 1514 +2018-06-14T22:28:20.722388Z, 257, 117 +2018-06-14T22:28:20.733875Z, 557, 1233 +2018-06-14T22:28:20.824306Z, 97, 1514 +2018-06-14T22:30:32.443171Z, 257, 117 +2018-06-14T22:30:32.451523Z, 556, 1231 +2018-06-14T22:30:32.568985Z, 97, 1514 +2018-06-14T22:32:44.142809Z, 257, 117 +2018-06-14T22:32:44.153146Z, 557, 1232 +2018-06-14T22:32:44.240783Z, 97, 1514 +2018-06-14T22:34:55.819124Z, 257, 117 +2018-06-14T22:34:55.828083Z, 556, 1231 +2018-06-14T22:34:55.921204Z, 97, 1514 +2018-06-14T22:37:07.879332Z, 257, 117 +2018-06-14T22:37:07.888554Z, 557, 1233 +2018-06-14T22:37:07.988689Z, 97, 1514 +2018-06-14T22:39:19.274678Z, 257, 117 +2018-06-14T22:39:19.288124Z, 556, 1231 +2018-06-14T22:39:19.656442Z, 97, 1514 +2018-06-14T22:41:30.964690Z, 257, 117 +2018-06-14T22:41:30.973618Z, 557, 1233 +2018-06-14T22:41:31.067046Z, 97, 1514 +2018-06-14T22:43:43.077721Z, 257, 117 +2018-06-14T22:43:43.086330Z, 556, 1231 +2018-06-14T22:43:43.181685Z, 97, 1514 +2018-06-14T22:45:54.827796Z, 257, 117 +2018-06-14T22:45:55.069246Z, 557, 1232 +2018-06-14T22:45:55.160465Z, 97, 1514 +2018-06-14T22:48:06.406787Z, 257, 117 +2018-06-14T22:48:06.417554Z, 556, 1231 +2018-06-14T22:48:06.508248Z, 97, 1514 +2018-06-14T22:50:18.410511Z, 257, 117 +2018-06-14T22:50:18.428958Z, 557, 1233 +2018-06-14T22:50:18.517176Z, 97, 1514 +2018-06-14T22:52:30.194505Z, 257, 117 +2018-06-14T22:52:30.435770Z, 556, 1231 +2018-06-14T22:52:30.538992Z, 97, 1514 +2018-06-14T22:54:41.863578Z, 257, 117 +2018-06-14T22:54:41.880756Z, 557, 1232 +2018-06-14T22:54:42.084464Z, 97, 1514 +2018-06-14T22:56:53.560739Z, 257, 117 +2018-06-14T22:56:53.569597Z, 556, 1232 +2018-06-14T22:56:53.673619Z, 97, 1514 +2018-06-14T22:59:05.382524Z, 257, 117 +2018-06-14T22:59:05.518950Z, 557, 1233 +2018-06-14T22:59:05.759331Z, 97, 1514 +2018-06-14T23:01:17.010034Z, 257, 117 +2018-06-14T23:01:17.020314Z, 556, 1231 +2018-06-14T23:01:17.111675Z, 97, 1514 +2018-06-14T23:03:28.880684Z, 257, 117 +2018-06-14T23:03:29.072908Z, 557, 1233 +2018-06-14T23:03:29.162062Z, 97, 1233 +2018-06-14T23:03:29.372873Z, 97, 1233 +2018-06-14T23:03:29.796823Z, 97, 1233 +2018-06-14T23:03:30.644846Z, 97, 1233 +2018-06-14T23:05:40.295435Z, 583, 1514 +2018-06-14T23:05:40.406380Z, 257, 117 +2018-06-14T23:05:40.414912Z, 556, 1231 +2018-06-14T23:05:40.510786Z, 97, 1514 +2018-06-14T23:07:52.137010Z, 257, 117 +2018-06-14T23:07:52.145417Z, 557, 1232 +2018-06-14T23:07:52.238296Z, 97, 1514 +2018-06-14T23:10:03.836854Z, 257, 117 +2018-06-14T23:10:03.845785Z, 556, 1231 +2018-06-14T23:10:03.954532Z, 97, 1514 +2018-06-14T23:12:15.863692Z, 257, 117 +2018-06-14T23:12:15.872553Z, 557, 1232 +2018-06-14T23:12:15.960238Z, 97, 1514 +2018-06-14T23:14:27.433510Z, 257, 117 +2018-06-14T23:14:27.444485Z, 556, 1232 +2018-06-14T23:14:27.581636Z, 97, 1514 +2018-06-14T23:16:39.095173Z, 257, 117 +2018-06-14T23:16:39.106066Z, 557, 1232 +2018-06-14T23:16:39.333696Z, 97, 1514 +2018-06-14T23:18:50.777902Z, 257, 117 +2018-06-14T23:18:50.793779Z, 556, 1231 +2018-06-14T23:18:51.008180Z, 97, 1514 +2018-06-14T23:21:02.468604Z, 257, 117 +2018-06-14T23:21:02.476717Z, 557, 1232 +2018-06-14T23:21:02.568758Z, 97, 1514 +2018-06-14T23:23:14.178586Z, 257, 117 +2018-06-14T23:23:14.187241Z, 556, 1231 +2018-06-14T23:23:14.275795Z, 97, 1514 +2018-06-14T23:25:25.823314Z, 257, 117 +2018-06-14T23:25:25.832887Z, 557, 1232 +2018-06-14T23:25:25.922327Z, 97, 1514 +2018-06-14T23:27:37.579030Z, 257, 117 +2018-06-14T23:27:37.591104Z, 556, 1231 +2018-06-14T23:27:38.078402Z, 97, 1514 +2018-06-14T23:29:49.339321Z, 257, 117 +2018-06-14T23:29:49.348203Z, 557, 1232 +2018-06-14T23:29:49.461787Z, 97, 1514 +2018-06-14T23:32:01.186019Z, 257, 117 +2018-06-14T23:32:01.428258Z, 556, 1231 +2018-06-14T23:32:01.533656Z, 97, 1514 +2018-06-14T23:34:12.834815Z, 257, 117 +2018-06-14T23:34:12.843481Z, 557, 1232 +2018-06-14T23:34:12.928779Z, 97, 1514 +2018-06-14T23:36:24.544064Z, 257, 117 +2018-06-14T23:36:24.557290Z, 556, 1232 +2018-06-14T23:36:24.650229Z, 97, 1514 +2018-06-14T23:38:36.223538Z, 257, 117 +2018-06-14T23:38:36.233426Z, 557, 1233 +2018-06-14T23:38:36.327259Z, 97, 1514 +2018-06-14T23:40:49.179957Z, 257, 117 +2018-06-14T23:40:49.188599Z, 556, 1231 +2018-06-14T23:40:49.298503Z, 97, 1514 +2018-06-14T23:42:59.647277Z, 257, 117 +2018-06-14T23:42:59.656010Z, 557, 1233 +2018-06-14T23:42:59.757990Z, 97, 1514 +2018-06-14T23:45:11.460191Z, 257, 117 +2018-06-14T23:45:11.468421Z, 556, 1232 +2018-06-14T23:45:11.562054Z, 97, 1514 +2018-06-14T23:47:23.154254Z, 257, 117 +2018-06-14T23:47:23.169868Z, 557, 1232 +2018-06-14T23:47:23.332188Z, 97, 1514 +2018-06-14T23:49:34.819052Z, 257, 117 +2018-06-14T23:49:34.833029Z, 556, 1232 +2018-06-14T23:49:34.951756Z, 97, 1514 +2018-06-14T23:51:46.542034Z, 257, 117 +2018-06-14T23:51:46.554905Z, 557, 1232 +2018-06-14T23:51:46.647936Z, 97, 1514 +2018-06-14T23:53:58.191828Z, 257, 117 +2018-06-14T23:53:58.200872Z, 556, 1232 +2018-06-14T23:53:58.304961Z, 97, 1514 +2018-06-14T23:56:09.961905Z, 257, 117 +2018-06-14T23:56:09.971113Z, 557, 1232 +2018-06-14T23:56:10.063261Z, 97, 1514 +2018-06-14T23:58:21.713165Z, 257, 117 +2018-06-14T23:58:21.722455Z, 556, 1231 +2018-06-14T23:58:21.808565Z, 97, \ No newline at end of file diff --git a/Code/Projects/SmartPlugDetector/devices/tplink_switch/tplink-feb-13-2018.timestamps b/Code/Projects/SmartPlugDetector/devices/tplink_switch/tplink-feb-13-2018.timestamps index a4d55b0..ca011b8 100644 --- a/Code/Projects/SmartPlugDetector/devices/tplink_switch/tplink-feb-13-2018.timestamps +++ b/Code/Projects/SmartPlugDetector/devices/tplink_switch/tplink-feb-13-2018.timestamps @@ -1,12 +1,12 @@ -9:38:04 PM -9:39:03 PM -9:40:05 PM -9:41:08 PM -9:42:07 PM -9:43:09 PM -9:45:25 PM -9:46:27 PM -9:47:28 PM -9:48:29 PM -9:49:31 PM -9:50:30 PM +2:38:04 PM +2:39:03 PM +2:40:05 PM +2:41:08 PM +2:42:07 PM +2:43:09 PM +2:45:25 PM +2:46:27 PM +2:47:28 PM +2:48:29 PM +2:49:31 PM +2:50:30 PM diff --git a/Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/FlowPatternFinder.java b/Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/FlowPatternFinder.java index f592212..1d0a9ba 100644 --- a/Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/FlowPatternFinder.java +++ b/Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/FlowPatternFinder.java @@ -70,8 +70,12 @@ public class FlowPatternFinder { private final FlowPattern mPattern; private final ConversationPair mConvPair; private final String FILE = "./devices/tplink_switch/datapoints.csv"; - //private final String REF_FILE = "./devices/tplink_switch/tplink-june-14-2018.timestamps"; - private final String REF_FILE = "./devices/tplink_switch/tplink-feb-13-2018.timestamps"; + //private final String REF_FILE = "./devices/dlink_switch/dlink-june-26-2018.timestamps"; + private final String REF_FILE = "./devices/tplink_switch/tplink-june-14-2018.timestamps"; + //private final String REF_FILE = "./devices/tplink_switch/tplink-feb-13-2018.timestamps"; + // Router time is in CET and we use PST for the trigger times + // Difference is 7 hours x 3600 x 1000ms = 25,200,000ms + private final long TIME_OFFSET = 25200000; private final List> mPendingComparisons = new ArrayList<>(); /* End instance properties */ @@ -261,6 +265,7 @@ public class FlowPatternFinder { String dstAddress = ipPacket.getHeader().getDstAddr().getHostAddress(); int srcPort = tcpPacket.getHeader().getSrcPort().valueAsInt(); int dstPort = tcpPacket.getHeader().getDstPort().valueAsInt(); + //System.out.println("Timestamp packet: " + packet.getTimestamp()); // Is this packet related to the pattern; i.e. is it going to (or coming from) the cloud server? boolean fromServer = mDnsMap.isRelatedToCloudServer(srcAddress, mPattern.getHostname()); boolean fromClient = mDnsMap.isRelatedToCloudServer(dstAddress, mPattern.getHostname()); @@ -270,6 +275,7 @@ public class FlowPatternFinder { } // Record the conversation pairs if (tcpPacket.getPayload() != null && checkTimeStamp(packet)) { + //if (tcpPacket.getPayload() != null) { mConvPair.writeConversationPair(packet, fromClient, fromServer); } } @@ -292,7 +298,11 @@ public class FlowPatternFinder { // Extract time from the packet's timestamp String timeStamp = packet.getTimestamp().toString(); String timeString = timeStamp.substring(timeStamp.indexOf("T") + 1, timeStamp.indexOf(".")); - long time = timeToMillis(timeString, true); + // Timestamps are in CET (ahead of PST) so it should be deducted by TIME_OFFSET + long time = timeToMillis(timeString, true) - TIME_OFFSET; + //long time = timeToMillis(timeString, true); + + //System.out.println("Gets here: " + time + " trigger time: " + mTriggerTimes.get(triggerListCounter)); // We accept packets that are at most 3 seconds away from the trigger time if ((mTriggerTimes.get(triggerListCounter) <= time) && diff --git a/Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/Main.java b/Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/Main.java index 225f08a..f3b8a00 100644 --- a/Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/Main.java +++ b/Code/Projects/SmartPlugDetector/src/main/java/edu/uci/iotproject/Main.java @@ -38,8 +38,9 @@ public class Main { // finder.findFlowPattern(); // ------------------------------------------------------------------------------------------------------------- - final String fileName = args.length > 0 ? args[0] : "/home/rtrimana/pcap_processing/smart_home_traffic/Code/Projects/SmartPlugDetector/pcap/wlan1.local.dns.pcap"; - //final String fileName = args.length > 0 ? args[0] : "/scratch/June-2018/TPLink/wlan1/tplink.wlan1.local.pcap"; + //final String fileName = args.length > 0 ? args[0] : "/home/rtrimana/pcap_processing/smart_home_traffic/Code/Projects/SmartPlugDetector/pcap/wlan1.local.dns.pcap"; + final String fileName = args.length > 0 ? args[0] : "/scratch/June-2018/TPLink/wlan1/tplink.wlan1.local.pcap"; + //final String fileName = args.length > 0 ? args[0] : "/scratch/June-2018/DLink/wlan1/dlink.wlan1.local.pcap"; final String trainingFileName = "./pcap/TP_LINK_LOCAL_ON_SUBSET.pcap"; // final String trainingFileName = "./pcap/TP_LINK_LOCAL_ON.pcap"; // @@ -64,6 +65,7 @@ public class Main { // //FlowPattern fp3 = new FlowPattern("TP_LINK_REMOTE_ON", list2, trainingPcap); // FlowPattern fp = new FlowPattern("TP_LINK_LOCAL_ON", "events.tplinkra.com", trainingPcap); + //FlowPattern fp = new FlowPattern("DLINK_LOCAL_ON", "rfe-us-west-1.dch.dlink.com", trainingPcap); FlowPatternFinder fpf = new FlowPatternFinder(handle, fp); fpf.start(); // -- 2.34.1