From 6b40111a3be273d51446995bcaed72a53d61dd11 Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Sun, 21 Mar 2021 12:28:02 -0400 Subject: [PATCH] Update Notifications, Fix DB Cleanup, Error Handling, Move ScanResult to Component --- .gitignore | 1 + src/overseer/api/v1/routes.py | 7 +- src/overseer/database.py | 2 +- src/overseer/scanner.py | 2 +- src/overseer/static/css/app.a50f799c.css | 1 - src/overseer/static/css/app.adf7b5c2.css | 1 + src/overseer/static/js/app.a3974328.js | 2 + src/overseer/static/js/app.a3974328.js.map | 1 + src/overseer/static/js/app.e5dd211e.js | 2 - src/overseer/static/js/app.e5dd211e.js.map | 1 - ....cf069257.js => chunk-vendors.4fdbc4a4.js} | 12 +- .../static/js/chunk-vendors.4fdbc4a4.js.map | 1 + .../static/js/chunk-vendors.cf069257.js.map | 1 - src/overseer/templates/index.html | 2 +- src/overseer_client/package.json | 2 +- .../src/components/OverseerHeader.vue | 7 +- .../src/components/OverseerNotifications.vue | 44 ++++-- .../src/components/ScanProgress.vue | 62 ++++++++ .../src/components/ScanResult.vue | 78 ++++++++++ src/overseer_client/src/router/index.js | 6 + src/overseer_client/src/store/index.js | 74 ++++++---- src/overseer_client/src/views/Home.vue | 65 ++++++-- src/overseer_client/src/views/Scan.vue | 139 ++++++------------ src/overseer_client/src/views/Search.vue | 6 + 24 files changed, 347 insertions(+), 172 deletions(-) delete mode 100644 src/overseer/static/css/app.a50f799c.css create mode 100644 src/overseer/static/css/app.adf7b5c2.css create mode 100644 src/overseer/static/js/app.a3974328.js create mode 100644 src/overseer/static/js/app.a3974328.js.map delete mode 100644 src/overseer/static/js/app.e5dd211e.js delete mode 100644 src/overseer/static/js/app.e5dd211e.js.map rename src/overseer/static/js/{chunk-vendors.cf069257.js => chunk-vendors.4fdbc4a4.js} (93%) create mode 100644 src/overseer/static/js/chunk-vendors.4fdbc4a4.js.map delete mode 100644 src/overseer/static/js/chunk-vendors.cf069257.js.map create mode 100644 src/overseer_client/src/components/ScanProgress.vue create mode 100644 src/overseer_client/src/components/ScanResult.vue create mode 100644 src/overseer_client/src/views/Search.vue diff --git a/.gitignore b/.gitignore index 53181bb..bec3862 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ **/__pycache__/ **/.coverage +**/overseer.sqlite src/overseer.egg-info/ build/ dist/ diff --git a/src/overseer/api/v1/routes.py b/src/overseer/api/v1/routes.py index d18b889..3a08eb8 100644 --- a/src/overseer/api/v1/routes.py +++ b/src/overseer/api/v1/routes.py @@ -23,11 +23,14 @@ def post_scans(): """ data = request.get_json() if data is None or "target" not in data: - return {"error": "Missing 'target'"}, 422 + return {"error": "Missing target"}, 422 + + if data["target"].strip() == "": + return {"error": "Invalid target"}, 422 scan_history = overseer.scan_manager.perform_scan(data["target"]) if scan_history is None: - return {"error": "Unable to resolve hostname."}, 422 + return {"error": "Unable to resolve hostname"}, 422 return __normalize_scan_results([scan_history], data["target"])[0] diff --git a/src/overseer/database.py b/src/overseer/database.py index 1aeef9f..09d7b0e 100644 --- a/src/overseer/database.py +++ b/src/overseer/database.py @@ -59,7 +59,7 @@ class DatabaseConnector: for stale in all_stale: stale.status = "FAILED" - stale.message = "Stale history" + stale.error = "Stale history" session.commit() session.close() diff --git a/src/overseer/scanner.py b/src/overseer/scanner.py index 4ab0e29..2ea409a 100644 --- a/src/overseer/scanner.py +++ b/src/overseer/scanner.py @@ -124,7 +124,7 @@ class ScanManager: Either a hostname or IP address of the endpoint to scan """ try: - target = socket.gethostbyname(target) + socket.gethostbyname(target) except socket.error: return None diff --git a/src/overseer/static/css/app.a50f799c.css b/src/overseer/static/css/app.a50f799c.css deleted file mode 100644 index eabba44..0000000 --- a/src/overseer/static/css/app.a50f799c.css +++ /dev/null @@ -1 +0,0 @@ -#overseer-websocket[data-v-7a0962f4]{height:18px;width:18px;border-radius:8px;position:absolute;left:25px;top:20px;z-index:-1}#overseer-header[data-v-7a0962f4]{background-color:#c9582c;width:100%;height:60px;position:fixed;top:0}#overseer-header a[data-v-7a0962f4]{color:inherit}#overseer-notifications[data-v-3073f05e]{height:calc(100% - 60px);width:320px;position:fixed;transition:.5s;right:0;top:0;overflow:scroll;margin-top:60px;z-index:1}.overseer-notification[data-v-3073f05e]{height:65px;transition:.5s;background-color:#e0e3de;border-radius:2px;text-align:start;padding:10px;margin:10px;cursor:pointer}#overseer-app{height:100%;width:100%;font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#3a4040}#overseer-body{height:calc(100% - 60px);width:100%;margin-top:60px;overflow:scroll;position:absolute;color:#eaece9}#overseer-body-center{min-height:100%;width:1000px;margin:0 auto;background-color:#343a46;box-shadow:inset 0 0 3px 3px #2b303a}body,html{height:100%;width:100%;margin:0;padding:0;background-color:#2b303a}#overseer-search[data-v-b2a880be]::-moz-placeholder{text-align:center}#overseer-search[data-v-b2a880be]:-ms-input-placeholder{text-align:center}#overseer-search[data-v-b2a880be]::placeholder{text-align:center}#overseer-search[data-v-b2a880be]{width:400px;height:40px;border-radius:5px;text-align:center;margin-top:400px;font-size:1rem;padding:.3rem .8rem;text-indent:0;outline:none;border:0 solid}.lds-roller[data-v-d7e11832]{display:inline-block;position:relative;width:80px;height:80px}.lds-roller div[data-v-d7e11832]{-webkit-animation:lds-roller-data-v-d7e11832 1.2s cubic-bezier(.5,0,.5,1) infinite;animation:lds-roller-data-v-d7e11832 1.2s cubic-bezier(.5,0,.5,1) infinite;transform-origin:40px 40px}.lds-roller div[data-v-d7e11832]:after{content:" ";display:block;position:absolute;width:7px;height:7px;border-radius:50%;background:#fff;margin:-4px 0 0 -4px}.lds-roller div[data-v-d7e11832]:first-child{-webkit-animation-delay:-36ms;animation-delay:-36ms}.lds-roller div[data-v-d7e11832]:first-child:after{top:63px;left:63px}.lds-roller div[data-v-d7e11832]:nth-child(2){-webkit-animation-delay:-72ms;animation-delay:-72ms}.lds-roller div[data-v-d7e11832]:nth-child(2):after{top:68px;left:56px}.lds-roller div[data-v-d7e11832]:nth-child(3){-webkit-animation-delay:-.108s;animation-delay:-.108s}.lds-roller div[data-v-d7e11832]:nth-child(3):after{top:71px;left:48px}.lds-roller div[data-v-d7e11832]:nth-child(4){-webkit-animation-delay:-.144s;animation-delay:-.144s}.lds-roller div[data-v-d7e11832]:nth-child(4):after{top:72px;left:40px}.lds-roller div[data-v-d7e11832]:nth-child(5){-webkit-animation-delay:-.18s;animation-delay:-.18s}.lds-roller div[data-v-d7e11832]:nth-child(5):after{top:71px;left:32px}.lds-roller div[data-v-d7e11832]:nth-child(6){-webkit-animation-delay:-.216s;animation-delay:-.216s}.lds-roller div[data-v-d7e11832]:nth-child(6):after{top:68px;left:24px}.lds-roller div[data-v-d7e11832]:nth-child(7){-webkit-animation-delay:-.252s;animation-delay:-.252s}.lds-roller div[data-v-d7e11832]:nth-child(7):after{top:63px;left:17px}.lds-roller div[data-v-d7e11832]:nth-child(8){-webkit-animation-delay:-.288s;animation-delay:-.288s}.lds-roller div[data-v-d7e11832]:nth-child(8):after{top:56px;left:12px}@-webkit-keyframes lds-roller-data-v-d7e11832{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes lds-roller-data-v-d7e11832{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}#overseer-scan[data-v-09bc5538]{text-align:left}#results[data-v-09bc5538]{width:500px;margin:150px auto 0 auto}.proto[data-v-09bc5538]{border-radius:4px;padding:0 2px;color:#0a282f;margin-left:5px}.scan-progress[data-v-09bc5538]{border:1px solid #000;border-radius:6px;overflow:hidden;position:relative;text-align:center;margin-bottom:5px}.scan-progress span[data-v-09bc5538]{position:absolute;font-size:.75em;right:48%;font-weight:900;top:-2px;color:#000}.scan-progress div[data-v-09bc5538]{height:12px;background-color:green;text-align:center;font-size:.6em;width:0}li[data-v-09bc5538]{display:flex;margin:10px 43px;width:80px}li span[data-v-09bc5538]{font-weight:700}ul[data-v-09bc5538]{display:flex;-moz-column-count:3;column-count:3;flex-wrap:wrap;flex-direction:row;list-style-type:none;padding:0} \ No newline at end of file diff --git a/src/overseer/static/css/app.adf7b5c2.css b/src/overseer/static/css/app.adf7b5c2.css new file mode 100644 index 0000000..6136e91 --- /dev/null +++ b/src/overseer/static/css/app.adf7b5c2.css @@ -0,0 +1 @@ +#overseer-websocket[data-v-1f35cde8]{height:18px;width:18px;border-radius:8px;position:absolute;left:25px;top:20px;z-index:-1}#overseer-header[data-v-1f35cde8]{background-color:#c9582c;width:100%;height:60px;position:fixed;top:0}#overseer-header a[data-v-1f35cde8]{color:inherit}.scan-progress[data-v-2b9f4f85]{border:1px solid #000;border-radius:6px;overflow:hidden;position:relative;text-align:center;margin-bottom:5px}.scan-progress span[data-v-2b9f4f85]{position:absolute;font-size:.75em;right:48%;font-weight:900;top:-2px;color:#000}.scan-progress div[data-v-2b9f4f85]{height:12px;transition:1s;background-color:green;text-align:center;font-size:.6em;width:0}#overseer-notifications[data-v-7218f0ce]{height:calc(100% - 60px);width:320px;position:fixed;transition:.5s;right:0;top:0;overflow:scroll;margin-top:60px;z-index:1}.overseer-notification[data-v-7218f0ce]{transition:.5s;background-color:#e0e3de;border-radius:2px;text-align:start;padding:10px;margin:10px;cursor:pointer}#overseer-app{height:100%;width:100%;font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#3a4040}#overseer-body{height:calc(100% - 60px);width:100%;margin-top:60px;overflow:scroll;position:absolute;color:#eaece9}#overseer-body-center{min-height:100%;width:1000px;margin:0 auto;background-color:#343a46;box-shadow:inset 0 0 3px 3px #2b303a}body,html{height:100%;width:100%;margin:0;padding:0;background-color:#2b303a}.lds-roller[data-v-d7e11832]{display:inline-block;position:relative;width:80px;height:80px}.lds-roller div[data-v-d7e11832]{-webkit-animation:lds-roller-data-v-d7e11832 1.2s cubic-bezier(.5,0,.5,1) infinite;animation:lds-roller-data-v-d7e11832 1.2s cubic-bezier(.5,0,.5,1) infinite;transform-origin:40px 40px}.lds-roller div[data-v-d7e11832]:after{content:" ";display:block;position:absolute;width:7px;height:7px;border-radius:50%;background:#fff;margin:-4px 0 0 -4px}.lds-roller div[data-v-d7e11832]:first-child{-webkit-animation-delay:-36ms;animation-delay:-36ms}.lds-roller div[data-v-d7e11832]:first-child:after{top:63px;left:63px}.lds-roller div[data-v-d7e11832]:nth-child(2){-webkit-animation-delay:-72ms;animation-delay:-72ms}.lds-roller div[data-v-d7e11832]:nth-child(2):after{top:68px;left:56px}.lds-roller div[data-v-d7e11832]:nth-child(3){-webkit-animation-delay:-.108s;animation-delay:-.108s}.lds-roller div[data-v-d7e11832]:nth-child(3):after{top:71px;left:48px}.lds-roller div[data-v-d7e11832]:nth-child(4){-webkit-animation-delay:-.144s;animation-delay:-.144s}.lds-roller div[data-v-d7e11832]:nth-child(4):after{top:72px;left:40px}.lds-roller div[data-v-d7e11832]:nth-child(5){-webkit-animation-delay:-.18s;animation-delay:-.18s}.lds-roller div[data-v-d7e11832]:nth-child(5):after{top:71px;left:32px}.lds-roller div[data-v-d7e11832]:nth-child(6){-webkit-animation-delay:-.216s;animation-delay:-.216s}.lds-roller div[data-v-d7e11832]:nth-child(6):after{top:68px;left:24px}.lds-roller div[data-v-d7e11832]:nth-child(7){-webkit-animation-delay:-.252s;animation-delay:-.252s}.lds-roller div[data-v-d7e11832]:nth-child(7):after{top:63px;left:17px}.lds-roller div[data-v-d7e11832]:nth-child(8){-webkit-animation-delay:-.288s;animation-delay:-.288s}.lds-roller div[data-v-d7e11832]:nth-child(8):after{top:56px;left:12px}@-webkit-keyframes lds-roller-data-v-d7e11832{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes lds-roller-data-v-d7e11832{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}#overseer-search[data-v-7ef10590]::-moz-placeholder{text-align:center}#overseer-search[data-v-7ef10590]:-ms-input-placeholder{text-align:center}#overseer-search[data-v-7ef10590]::placeholder{text-align:center}#overseer-search[data-v-7ef10590]{width:400px;height:40px;border-radius:5px;text-align:center;font-size:1rem;padding:.3rem .8rem;text-indent:0;outline:none;border:0 solid}#overseer-websocket[data-v-7ef10590]{height:40px;width:40px;border-radius:20px;position:absolute;left:19px;bottom:66px}.error[data-v-7ef10590]{margin-top:5px;color:#b30000}#scan-status[data-v-7c05d396]{color:#eaece9;text-align:center}#sub-status[data-v-7c05d396]{text-align:center;width:100%;margin:-20px 0 10px 0;border-bottom:1px solid}.proto[data-v-7c05d396]{border-radius:4px;padding:0 2px;color:#0a282f;margin-left:5px}#overseer-scan[data-v-3b3475aa]{text-align:left}#results[data-v-3b3475aa]{width:500px;margin:150px auto 0 auto}li[data-v-3b3475aa]{display:flex;margin:10px 43px;width:80px}li span[data-v-3b3475aa]{font-weight:700}ul[data-v-3b3475aa]{display:flex;-moz-column-count:3;column-count:3;flex-wrap:wrap;flex-direction:row;list-style-type:none;padding:0}#scan-button[data-v-3b3475aa]{font-size:1em;background-color:#0e6a0e;padding:8px;border-radius:10px;float:right;font-weight:700;cursor:pointer;margin:8px} \ No newline at end of file diff --git a/src/overseer/static/js/app.a3974328.js b/src/overseer/static/js/app.a3974328.js new file mode 100644 index 0000000..6f93b37 --- /dev/null +++ b/src/overseer/static/js/app.a3974328.js @@ -0,0 +1,2 @@ +(function(t){function e(e){for(var r,s,i=e[0],c=e[1],u=e[2],f=0,d=[];f\n
\n \n
\n
\n
Overseer
\n
\n
\n

\n {{ notificationCount }}\n

\n \n \n \n
\n
\n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OverseerHeader.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OverseerHeader.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./OverseerHeader.vue?vue&type=template&id=1f35cde8&scoped=true&\"\nimport script from \"./OverseerHeader.vue?vue&type=script&lang=js&\"\nexport * from \"./OverseerHeader.vue?vue&type=script&lang=js&\"\nimport style0 from \"./OverseerHeader.vue?vue&type=style&index=0&id=1f35cde8&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1f35cde8\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{style:(_vm.deriveNotificationCSS(_vm.showNotifications)),attrs:{\"id\":\"overseer-notifications\"}},_vm._l((_vm.activeScans),function(scan){return _c('div',{key:scan.id,staticClass:\"overseer-notification\",on:{\"click\":function($event){return _vm.navigateToScan(scan)}}},[_c('div',{staticStyle:{\"float\":\"left\",\"width\":\"100%\",\"margin\":\"5px 0px\"}},[_c('b',{staticStyle:{\"float\":\"left\"}},[_vm._v(_vm._s(scan.target))]),_c('b',{staticStyle:{\"float\":\"right\"}},[_vm._v(_vm._s(scan.status))])]),_c('ScanProgress',{staticStyle:{\"margin-top\":\"5px\"},attrs:{\"percentage\":scan.status =='COMPLETE' ? 100 : scan.total_progress}})],1)}),0)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"scan-progress\"},[_c('span',{staticStyle:{\"right\":\"46.5%\"}},[_vm._v(_vm._s(_vm.title))]),_c('div',{style:(_vm.scanProgress(_vm.percentage))})])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ScanProgress.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ScanProgress.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ScanProgress.vue?vue&type=template&id=2b9f4f85&scoped=true&\"\nimport script from \"./ScanProgress.vue?vue&type=script&lang=js&\"\nexport * from \"./ScanProgress.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ScanProgress.vue?vue&type=style&index=0&id=2b9f4f85&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"2b9f4f85\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OverseerNotifications.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OverseerNotifications.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./OverseerNotifications.vue?vue&type=template&id=7218f0ce&scoped=true&\"\nimport script from \"./OverseerNotifications.vue?vue&type=script&lang=js&\"\nexport * from \"./OverseerNotifications.vue?vue&type=script&lang=js&\"\nimport style0 from \"./OverseerNotifications.vue?vue&type=style&index=0&id=7218f0ce&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7218f0ce\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=a26f032c&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport Vuex from 'vuex'\n\nVue.use(Vuex)\n\nexport default new Vuex.Store({\n state: {\n ws_connected: false,\n notifications: [],\n scan_cache: {}\n },\n getters: {\n getScansByTarget(state, target){\n return state.scan_cache[target]\n }\n },\n actions: {\n getScansByTarget({ commit }, target){\n return fetch('/api/v1/scans/' + target)\n .then(resp => resp.json())\n .then(json => {\n commit(\"SET_TARGET_SCANS\", { target, data: json.data });\n });\n },\n performScan({ commit }, target) {\n return fetch('/api/v1/scans', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ \"target\": target })\n }).then(async resp => {\n let scan = await resp.json()\n commit(\"UPDATE_SCAN\", { scan });\n return scan;\n });\n }\n },\n mutations: {\n \"SET_TARGET_SCANS\"(state, { target, data }) {\n Vue.set(state.scan_cache, target, data)\n },\n \"UPDATE_SCAN\"(state, { scan }) {\n let target = scan.target;\n if (!state.scan_cache[target]) {\n Vue.set(state.scan_cache, target, [scan])\n } else {\n let matchedItem = state.scan_cache[target]\n .find(item => item.id == scan.id);\n\n if (matchedItem)\n Object.keys(scan).forEach(key => {\n Vue.set(matchedItem, key, scan[key])\n });\n else\n state.scan_cache[target].unshift(scan);\n }\n },\n \"SOCKET_message\"(state, scan) {\n // Update progress queue\n let matchedItem = state.notifications.find(item => item.id == scan.id);\n if (matchedItem)\n Object.keys(scan).forEach(key => {\n Vue.set(matchedItem, key, scan[key])\n });\n else\n state.notifications.push(scan);\n\n // Update scan cache\n this.commit(\"UPDATE_SCAN\", { scan });\n },\n \"SOCKET_connect\"(state) {\n state.ws_connected = true\n },\n \"SOCKET_disconnect\"(state) {\n state.ws_connected = false\n },\n },\n})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticStyle:{\"padding\":\"250px 0px 40px\",\"position\":\"relative\",\"width\":\"300px\",\"margin\":\"0px auto\"}},[(this.$store.state.ws_connected)?_c('div',{staticStyle:{\"background-color\":\"#0E6A0E\"},attrs:{\"id\":\"overseer-websocket\"}}):_vm._e(),(!this.$store.state.ws_connected)?_c('div',{staticStyle:{\"background-color\":\"#B30000\"},attrs:{\"id\":\"overseer-websocket\"}}):_vm._e(),_c('div',{staticStyle:{\"font-weight\":\"700\",\"font-size\":\"4em\",\"position\":\"relative\"}},[_vm._v(\"Overseer\")])]),_c('input',{attrs:{\"id\":\"overseer-search\",\"placeholder\":\"IP Address / Hostname\",\"type\":\"text\"},on:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.onSubmit($event)}}}),_c('br'),(_vm.error != null)?_c('h5',{staticClass:\"error\"},[_vm._v(_vm._s(_vm.error))]):_vm._e(),(_vm.loading)?_c('Loading',{staticStyle:{\"margin-top\":\"50px\"}}):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"lds-roller\"},[_c('div'),_c('div'),_c('div'),_c('div'),_c('div'),_c('div'),_c('div'),_c('div')])}]\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./Loading.vue?vue&type=template&id=d7e11832&scoped=true&\"\nvar script = {}\nimport style0 from \"./Loading.vue?vue&type=style&index=0&id=d7e11832&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d7e11832\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Home.vue?vue&type=template&id=7ef10590&scoped=true&\"\nimport script from \"./Home.vue?vue&type=script&lang=js&\"\nexport * from \"./Home.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Home.vue?vue&type=style&index=0&id=7ef10590&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7ef10590\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{\"padding\":\"50px\"},attrs:{\"id\":\"overseer-scan\"}},[_c('h1',{staticStyle:{\"font-size\":\"2.5em\",\"margin\":\"0px\",\"float\":\"left\"}},[_vm._v(_vm._s(_vm.$route.params.target))]),(_vm.getRequestedScan.status == 'COMPLETE')?_c('span',{attrs:{\"id\":\"scan-button\"},on:{\"click\":function($event){return _vm.performScan()}}},[_vm._v(\"Scan Again\")]):_vm._e(),_c('div',{attrs:{\"id\":\"results\"}},[_c('ScanResult',{attrs:{\"scan\":_vm.getRequestedScan,\"error\":_vm.error,\"loading\":_vm.loading}})],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.scan.status == 'FAILED' || _vm.error)?_c('div',[_c('h2',{attrs:{\"id\":\"scan-status\"}},[_vm._v(\"Error\")]),_c('h5',{staticStyle:{\"color\":\"#B30000\",\"border-bottom\":\"unset\"},attrs:{\"id\":\"sub-status\"}},[_vm._v(_vm._s(_vm.error || _vm.scan.error))])]):(_vm.scan.status == 'LOADING' || _vm.loading)?_c('div',[_c('Loading',{staticStyle:{\"margin\":\"0px auto\",\"display\":\"block\"}}),_c('h2',{attrs:{\"id\":\"scan-status\"}},[_vm._v(\"Loading...\")])],1):(_vm.scan.status == 'NO_RESULTS')?_c('div',[_c('h2',{attrs:{\"id\":\"scan-status\"}},[_vm._v(\"No Scans Found\")])]):_c('div',[(_vm.scan.status == 'IN_PROGRESS')?_c('h2',{attrs:{\"id\":\"scan-status\"}},[_vm._v(\"Scanning in Progress\")]):_c('h2',{attrs:{\"id\":\"scan-status\"}},[_vm._v(\"Scan Results\")]),_c('h5',{attrs:{\"id\":\"sub-status\"}},[_vm._v(_vm._s(_vm.normalizeDate(_vm.scan.created_at)))]),(_vm.scan.status == 'IN_PROGRESS')?_c('div',[_c('ScanProgress',{attrs:{\"title\":\"TCP\",\"percentage\":_vm.scan.tcp_progress}}),_c('ScanProgress',{attrs:{\"title\":\"UDP\",\"percentage\":_vm.scan.udp_progress}}),_c('ScanProgress',{attrs:{\"title\":\"Total\",\"percentage\":_vm.scan.total_progress}})],1):_vm._e(),_c('ul',_vm._l((_vm.scan.results),function(port){return _c('li',{key:port},[_c('span',[_vm._v(_vm._s(port.split(\" \")[0]))]),_c('span',{staticClass:\"proto\",style:(_vm.dynamicProtocolStyle(port.split(' ')[1]))},[_vm._v(_vm._s(port.split(\" \")[1]))])])}),0)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ScanResult.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ScanResult.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ScanResult.vue?vue&type=template&id=7c05d396&scoped=true&\"\nimport script from \"./ScanResult.vue?vue&type=script&lang=js&\"\nexport * from \"./ScanResult.vue?vue&type=script&lang=js&\"\nimport style0 from \"./ScanResult.vue?vue&type=style&index=0&id=7c05d396&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7c05d396\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Scan.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Scan.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Scan.vue?vue&type=template&id=3b3475aa&scoped=true&\"\nimport script from \"./Scan.vue?vue&type=script&lang=js&\"\nexport * from \"./Scan.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Scan.vue?vue&type=style&index=0&id=3b3475aa&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3b3475aa\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{\"padding-top\":\"300px\"}},[_c('h1',[_vm._v(\"Error\")]),_c('h4',[_vm._v(\"404 Page Not Found\")])])}]\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./Search.vue?vue&type=template&id=4f6eef93&\"\nvar script = {}\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{\"padding-top\":\"300px\"}},[_c('h1',[_vm._v(\"Error\")]),_c('h4',[_vm._v(\"404 Page Not Found\")])])}]\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./NotFound.vue?vue&type=template&id=eb482a4c&\"\nvar script = {}\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport VueRouter from 'vue-router'\nimport Home from '../views/Home.vue'\nimport Scan from '../views/Scan.vue'\nimport Search from '../views/Search.vue'\nimport NotFound from '../views/NotFound.vue'\n\nVue.use(VueRouter)\n\nconst routes = [\n {\n path: '/',\n name: 'Home',\n component: Home\n },\n {\n path: '/scan/:target/:scan_id',\n name: 'Scan',\n component: Scan\n },\n {\n path: '/scan/:target',\n name: 'Scan',\n component: Scan\n },\n {\n path: '/search/:target',\n name: 'Search',\n component: Search\n },\n {\n path: '*',\n name: 'NotFound',\n component: NotFound\n }\n]\n\nconst router = new VueRouter({\n mode: 'history',\n base: '/',\n routes\n})\n\nexport default router\n","import Vue from 'vue';\nimport App from './App.vue';\nimport store from './store';\nimport router from './router';\nimport VueSocketIO from 'vue-socket.io';\nimport socketio from 'socket.io-client';\n\nVue.use(new VueSocketIO({\n debug: true,\n connection: socketio({ path: \"/api/v1/socket.io\" }),\n vuex: {\n store,\n actionPrefix: 'SOCKET_',\n mutationPrefix: 'SOCKET_'\n },\n}))\n\nVue.config.productionTip = false\n\nnew Vue({\n render: h => h(App),\n router,\n store\n}).$mount('#app')\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=style&index=0&id=7ef10590&scoped=true&lang=css&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Scan.vue?vue&type=style&index=0&id=3b3475aa&scoped=true&lang=css&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OverseerHeader.vue?vue&type=style&index=0&id=1f35cde8&scoped=true&lang=css&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ScanResult.vue?vue&type=style&index=0&id=7c05d396&scoped=true&lang=css&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loading.vue?vue&type=style&index=0&id=d7e11832&scoped=true&lang=css&\""],"sourceRoot":""} \ No newline at end of file diff --git a/src/overseer/static/js/app.e5dd211e.js b/src/overseer/static/js/app.e5dd211e.js deleted file mode 100644 index 4b7aa0c..0000000 --- a/src/overseer/static/js/app.e5dd211e.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(t){function e(e){for(var r,o,i=e[0],c=e[1],u=e[2],d=0,f=[];d\n
\n \n
\n
\n
Overseer
\n
\n
\n

\n {{ notificationCount }}\n

\n \n \n \n
\n
\n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OverseerHeader.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OverseerHeader.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./OverseerHeader.vue?vue&type=template&id=7a0962f4&scoped=true&\"\nimport script from \"./OverseerHeader.vue?vue&type=script&lang=js&\"\nexport * from \"./OverseerHeader.vue?vue&type=script&lang=js&\"\nimport style0 from \"./OverseerHeader.vue?vue&type=style&index=0&id=7a0962f4&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7a0962f4\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"overseer-notifications\"}},_vm._l((_vm.items),function(item){return _c('div',{key:item.id,staticClass:\"overseer-notification\",on:{\"click\":function($event){return _vm.navigateToScan(item)}}},[_c('b',[_vm._v(\"Target: \")]),_vm._v(\" \"+_vm._s(item.target)+\" \"),_c('br'),_c('b',[_vm._v(\"Status: \")]),_vm._v(_vm._s(item.status)+\" \"),_c('br'),('total_progress' in item)?_c('span',[_c('b',[_vm._v(\"Progress: \")]),_vm._v(_vm._s(item.total_progress)+\" \"),_c('br')]):_vm._e()])}),0)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OverseerNotifications.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OverseerNotifications.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./OverseerNotifications.vue?vue&type=template&id=3073f05e&scoped=true&\"\nimport script from \"./OverseerNotifications.vue?vue&type=script&lang=js&\"\nexport * from \"./OverseerNotifications.vue?vue&type=script&lang=js&\"\nimport style0 from \"./OverseerNotifications.vue?vue&type=style&index=0&id=3073f05e&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3073f05e\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=a26f032c&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport Vuex from 'vuex'\n\nVue.use(Vuex)\n\nexport default new Vuex.Store({\n state: {\n ws_connected: false,\n notifications: [],\n scan_cache: {}\n },\n getters: {\n getScansByTarget(state, target){\n return state.scan_cache[target]\n }\n },\n actions: {\n getScansByTarget({ commit }, target){\n fetch('/api/v1/scans/' + target)\n .then(resp => resp.json())\n .then(json => {\n commit(\"SET_SCANS\", { target, data: json.data });\n });\n },\n },\n mutations: {\n \"SET_SCANS\"(state, { target, data }) {\n console.log(\"SET_SCANS: \", target, data)\n Vue.set(state.scan_cache, target, data)\n },\n \"SOCKET_connect\"(state) {\n state.ws_connected = true\n },\n \"SOCKET_disconnect\"(state) {\n state.ws_connected = false\n },\n \"SOCKET_message\"(state, message) {\n // Update progress queue\n let matchedItem = state.notifications.find(item => item.id == message.id);\n if (matchedItem)\n Object.keys(message).forEach(key => {\n Vue.set(matchedItem, key, message[key])\n });\n else\n state.notifications.push(message);\n\n // Update scan cache\n if (!state.scan_cache[message.target]) {\n Vue.set(state.scan_cache, message.target, [message])\n } else {\n let matchedItem = state.scan_cache[message.target]\n .find(item => item.id == message.id);\n\n if (matchedItem)\n Object.keys(message).forEach(key => {\n Vue.set(matchedItem, key, message[key])\n });\n else\n state.scan_cache[message.target].unshift(message);\n }\n }\n },\n})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('input',{attrs:{\"id\":\"overseer-search\",\"placeholder\":\"IP Address / Hostname\",\"type\":\"text\"},on:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.onSubmit($event)}}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Home.vue?vue&type=template&id=b2a880be&scoped=true&\"\nimport script from \"./Home.vue?vue&type=script&lang=js&\"\nexport * from \"./Home.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Home.vue?vue&type=style&index=0&id=b2a880be&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"b2a880be\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{\"padding\":\"50px\"},attrs:{\"id\":\"overseer-scan\"}},[_c('h1',{staticStyle:{\"font-size\":\"2.5em\",\"margin\":\"0px\"}},[_vm._v(_vm._s(_vm.$route.params.target))]),_c('div',{attrs:{\"id\":\"results\"}},[(_vm.getRequestedScan == 'LOADING')?_c('div',[_c('Loading'),_c('h2',{staticStyle:{\"color\":\"#EAECE9\",\"text-align\":\"center\"}},[_vm._v(\"Loading...\")])],1):(_vm.getRequestedScan == 'NO_RESULTS')?_c('div',[_c('h2',{staticStyle:{\"color\":\"#EAECE9\",\"text-align\":\"center\"}},[_vm._v(\"No Scans Found\")])]):_c('div',[(_vm.getRequestedScan.status == 'IN_PROGRESS')?_c('h2',{staticStyle:{\"color\":\"#EAECE9\",\"text-align\":\"center\"}},[_vm._v(\"Scanning in Progress\")]):_c('h2',{staticStyle:{\"color\":\"#EAECE9\",\"text-align\":\"center\"}},[_vm._v(\"Scan Results\")]),_c('h5',{staticStyle:{\"text-align\":\"center\",\"width\":\"100%\",\"margin\":\"-20px 0px 10px 0px\",\"border-bottom\":\"1px solid\"}},[_vm._v(_vm._s(_vm.normalizeDate(_vm.getRequestedScan.created_at)))]),(_vm.getRequestedScan.status == 'IN_PROGRESS')?_c('div',{staticClass:\"scan-progress\"},[_c('span',[_vm._v(\"TCP\")]),_c('div',{style:(_vm.scanProgress(_vm.getRequestedScan.tcp_progress))})]):_vm._e(),(_vm.getRequestedScan.status == 'IN_PROGRESS')?_c('div',{staticClass:\"scan-progress\"},[_c('span',[_vm._v(\"UDP\")]),_c('div',{style:(_vm.scanProgress(_vm.getRequestedScan.udp_progress))})]):_vm._e(),(_vm.getRequestedScan.status == 'IN_PROGRESS')?_c('div',{staticClass:\"scan-progress\"},[_c('span',{staticStyle:{\"right\":\"46.5%\"}},[_vm._v(\"TOTAL\")]),_c('div',{style:(_vm.scanProgress(_vm.getRequestedScan.total_progress))})]):_vm._e(),_c('ul',_vm._l((_vm.getRequestedScan.results),function(port){return _c('li',{key:port},[_c('span',[_vm._v(_vm._s(port.split(\" \")[0]))]),_c('span',{staticClass:\"proto\",style:(_vm.dynamicProtocolStyle(port.split(' ')[1]))},[_vm._v(_vm._s(port.split(\" \")[1]))])])}),0)])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"lds-roller\"},[_c('div'),_c('div'),_c('div'),_c('div'),_c('div'),_c('div'),_c('div'),_c('div')])}]\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./Loading.vue?vue&type=template&id=d7e11832&scoped=true&\"\nvar script = {}\nimport style0 from \"./Loading.vue?vue&type=style&index=0&id=d7e11832&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d7e11832\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Scan.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Scan.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Scan.vue?vue&type=template&id=09bc5538&scoped=true&\"\nimport script from \"./Scan.vue?vue&type=script&lang=js&\"\nexport * from \"./Scan.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Scan.vue?vue&type=style&index=0&id=09bc5538&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"09bc5538\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{\"padding-top\":\"300px\"}},[_c('h1',[_vm._v(\"Error\")]),_c('h4',[_vm._v(\"404 Page Not Found\")])])}]\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./NotFound.vue?vue&type=template&id=eb482a4c&\"\nvar script = {}\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport VueRouter from 'vue-router'\nimport Home from '../views/Home.vue'\nimport Scan from '../views/Scan.vue'\nimport NotFound from '../views/NotFound.vue'\n\nVue.use(VueRouter)\n\nconst routes = [\n {\n path: '/',\n name: 'Home',\n component: Home\n },\n {\n path: '/scan/:target/:scan_id',\n name: 'Scan',\n component: Scan\n },\n {\n path: '/scan/:target',\n name: 'Scan',\n component: Scan\n },\n {\n path: '*',\n name: 'NotFound',\n component: NotFound\n }\n]\n\nconst router = new VueRouter({\n mode: 'history',\n base: '/',\n routes\n})\n\nexport default router\n","import Vue from 'vue';\nimport App from './App.vue';\nimport store from './store';\nimport router from './router';\nimport VueSocketIO from 'vue-socket.io';\nimport socketio from 'socket.io-client';\n\nVue.use(new VueSocketIO({\n debug: true,\n connection: socketio({ path: \"/api/v1/socket.io\" }),\n vuex: {\n store,\n actionPrefix: 'SOCKET_',\n mutationPrefix: 'SOCKET_'\n },\n}))\n\nVue.config.productionTip = false\n\nnew Vue({\n render: h => h(App),\n router,\n store\n}).$mount('#app')\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=style&index=0&id=b2a880be&scoped=true&lang=css&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OverseerHeader.vue?vue&type=style&index=0&id=7a0962f4&scoped=true&lang=css&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loading.vue?vue&type=style&index=0&id=d7e11832&scoped=true&lang=css&\""],"sourceRoot":""} \ No newline at end of file diff --git a/src/overseer/static/js/chunk-vendors.cf069257.js b/src/overseer/static/js/chunk-vendors.4fdbc4a4.js similarity index 93% rename from src/overseer/static/js/chunk-vendors.cf069257.js rename to src/overseer/static/js/chunk-vendors.4fdbc4a4.js index 683d8e6..9f6cf0c 100644 --- a/src/overseer/static/js/chunk-vendors.cf069257.js +++ b/src/overseer/static/js/chunk-vendors.4fdbc4a4.js @@ -1,10 +1,10 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"00ee":function(t,e,n){var r=n("b622"),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},"01d3":function(t,e,n){const r=n("c9eb"),o=n("d941");t.exports=function(t){const e=t.xdomain,n=t.xscheme,i=t.enablesXDR;try{if("undefined"!==typeof XMLHttpRequest&&(!e||r))return new XMLHttpRequest}catch(s){}try{if("undefined"!==typeof XDomainRequest&&!n&&i)return new XDomainRequest}catch(s){}if(!e)try{return new(o[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(s){}}},"0299":function(t,e,n){"use strict";var r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i=64,s={},a=0,c=0;function u(t){var e="";do{e=o[t%i]+e,t=Math.floor(t/i)}while(t>0);return e}function f(t){var e=0;for(c=0;c{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=this.onClose.bind(this),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){const n=this;this.writable=!1;let r=t.length,i=0;const s=r;for(;i{this.doWrite(t,()=>{this.writable=!0,this.emit("drain")})})}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=s()),this.supportsBinary||t.sid||(t.b64=1),t=o.encode(t),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),t.length&&(t="?"+t);const r=-1!==this.opts.hostname.indexOf(":");return e+"://"+(r?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+t}}t.exports=c},"0a5e":function(t,e,n){const r=n("0949"),o=n("d941"),i=/\n/g,s=/\\n/g;let a;class c extends r{constructor(t){super(t),this.query=this.query||{},a||(a=o.___eio=o.___eio||[]),this.index=a.length;const e=this;a.push((function(t){e.onData(t)})),this.query.j=this.index}get supportsBinary(){return!1}doClose(){this.script&&(this.script.onerror=()=>{},this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),super.doClose()}doPoll(){const t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};const n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e;const r="undefined"!==typeof navigator&&/gecko/i.test(navigator.userAgent);r&&setTimeout((function(){const t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)}),100)}doWrite(t,e){const n=this;let r;if(!this.form){const t=document.createElement("form"),e=document.createElement("textarea"),n=this.iframeId="eio_iframe_"+this.index;t.className="socketio",t.style.position="absolute",t.style.top="-1000px",t.style.left="-1000px",t.target=n,t.method="POST",t.setAttribute("accept-charset","utf-8"),e.name="d",t.appendChild(e),document.body.appendChild(t),this.form=t,this.area=e}function o(){a(),e()}function a(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(t){n.onError("jsonp polling iframe removal error",t)}try{const t='