SpyGuard/app/backend/dist/js/chunk-2d0cc2b4.6cd43049.js.map
2022-11-06 15:51:33 +01:00

1 line
12 KiB
Plaintext

{"version":3,"sources":["webpack:///./src/views/iocs-search.vue","webpack:///src/views/iocs-search.vue","webpack:///./src/views/iocs-search.vue?4206","webpack:///./src/views/iocs-search.vue?47c0"],"names":["render","_vm","this","_c","_self","staticClass","attrs","_v","directives","name","rawName","value","iocs","expression","domProps","on","$event","target","composing","search_iocs","results","length","_m","_l","r","key","tlp","_s","tag","class","source","remove","first_search","loading","match","_e","staticRenderFns","data","jwt","props","methods","ioc","axios","timeout","headers","then","catch","load_config","created","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,kBAAkBC,MAAM,CAAC,GAAK,YAAY,CAACH,EAAG,MAAM,CAACE,YAAY,2BAA2B,CAACF,EAAG,KAAK,CAACE,YAAY,WAAW,CAACJ,EAAIM,GAAG,iBAAiBJ,EAAG,MAAM,CAACE,YAAY,cAAc,CAACF,EAAG,WAAW,CAACK,WAAW,CAAC,CAACC,KAAK,QAAQC,QAAQ,UAAUC,MAAOV,EAAIW,KAAMC,WAAW,SAASR,YAAY,aAAaC,MAAM,CAAC,GAAK,kBAAkB,YAAc,uBAAuB,KAAO,KAAKQ,SAAS,CAAC,MAASb,EAAIW,MAAOG,GAAG,CAAC,MAAQ,SAASC,GAAWA,EAAOC,OAAOC,YAAiBjB,EAAIW,KAAKI,EAAOC,OAAON,aAAYR,EAAG,MAAM,CAACE,YAAY,cAAc,CAACF,EAAG,SAAS,CAACE,YAAY,yBAAyBU,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOf,EAAIkB,iBAAiB,CAAClB,EAAIM,GAAG,cAAeN,EAAImB,QAAQC,OAAO,EAAIlB,EAAG,MAAM,CAACE,YAAY,cAAc,CAACF,EAAG,QAAQ,CAACE,YAAY,mCAAmC,CAACJ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AG,SAASJ,EAAG,KAAK,CAACF,EAAIM,GAAG,SAASJ,EAAG,KAAK,CAACF,EAAIM,GAAG,YAAYJ,EAAG,KAAK,CAACF,EAAIM,GAAG,iBACvN,WAAY,IAAIN,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,SAAS,CAACF,EAAG,IAAI,CAACE,YAAY,kBAAkB,CAACF,EAAG,OAAO,CAACE,YAAY,yBAAyBF,EAAG,IAAI,CAACE,YAAY,kBAAkB,CAACJ,EAAIM,GAAG,gC,qBCoDxM,GACfE,mBACA4B,OACA,OACAjB,WACAY,gBACAM,OACAL,aAGAM,SACAC,SACArB,uBAuBA,OAtBA,gBACA,qBACA,gBACA,yCACAsB,WACA,yBACAA,oBACAA,oBACAA,oBACAA,qBACAA,oBACAA,qBAEAC,8BAAAC,YAAAC,SAAA,sBACAC,SACA,0BACA,qDAEA,kBAEAC,4BAEA,GAEAf,mBACAW,iCAAAC,YAAAC,SAAA,sBACAC,SACA,gBACA,gEAGAC,0BAEAC,uBACAL,4BACAC,YACAC,SAAA,sBACA,SACA,SACA,sBAGAE,0BAEA,sBACA,0BAAAH,cACAE,SACA,eACA,yBAGAC,2BAGAE,mBACA,iBC3HqV,I,YCOjVC,EAAY,eACd,EACAjD,EACAoC,GACA,EACA,KACA,KACA,MAIa,aAAAa,E","file":"js/chunk-2d0cc2b4.6cd43049.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"backend-content\",attrs:{\"id\":\"content\"}},[_c('div',{staticClass:\"column col-12 col-xs-12\"},[_c('h3',{staticClass:\"s-title\"},[_vm._v(\"Search IOCs\")]),_c('div',{staticClass:\"form-group\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.iocs),expression:\"iocs\"}],staticClass:\"form-input\",attrs:{\"id\":\"input-example-3\",\"placeholder\":\"Paste your IOCs here\",\"rows\":\"3\"},domProps:{\"value\":(_vm.iocs)},on:{\"input\":function($event){if($event.target.composing)return;_vm.iocs=$event.target.value}}})]),_c('div',{staticClass:\"form-group\"},[_c('button',{staticClass:\"btn btn-primary col-12\",on:{\"click\":function($event){return _vm.search_iocs()}}},[_vm._v(\"Search\")])]),(_vm.results.length>0 )?_c('div',{staticClass:\"form-group\"},[_c('table',{staticClass:\"table table-striped table-hover\"},[_vm._m(0),_c('tbody',_vm._l((_vm.results),function(r){return _c('tr',{key:r.tlp},[_c('td',[_vm._v(_vm._s(r.value))]),_c('td',{staticClass:\"upper\"},[_vm._v(_vm._s(r.tag))]),_c('td',[_c('label',{class:['tlp-' + r.tlp]},[_vm._v(_vm._s(r.tlp))])]),_c('td',{staticClass:\"capi\"},[_vm._v(_vm._s(r.source))]),_c('td',[_c('button',{staticClass:\"btn btn-sm\",on:{\"click\":function($event){return _vm.remove(r)}}},[_vm._v(\"Delete\")])])])}),0)])]):(_vm.first_search==false)?_c('div',[(_vm.loading)?_c('div',[_vm._m(1)]):_c('div',[_c('div',{staticClass:\"empty\"},[_c('p',{staticClass:\"empty-title h5\"},[_vm._v(\"IOC\"),(this.iocs.match(/[^\\r\\n]+/g).length>1)?_c('span',[_vm._v(\"s\")]):_vm._e(),_vm._v(\" not found.\")]),_c('p',{staticClass:\"empty-subtitle\"},[_vm._v(\"Try wildcard search to expend your search.\")])])])]):_vm._e()])])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('thead',[_c('tr',[_c('th',[_vm._v(\"Indicator\")]),_c('th',[_vm._v(\"Tag\")]),_c('th',[_vm._v(\"TLP\")]),_c('th',[_vm._v(\"Source\")]),_c('th',[_vm._v(\"Action\")])])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"empty\"},[_c('p',{staticClass:\"empty-title h5\"},[_c('span',{staticClass:\"loading loading-lg\"})]),_c('p',{staticClass:\"empty-subtitle\"},[_vm._v(\"Finding your IOC(s)...\")])])\n}]\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"backend-content\" id=\"content\">\r\n <div class=\"column col-12 col-xs-12\">\r\n <h3 class=\"s-title\">Search IOCs</h3>\r\n <div class=\"form-group\">\r\n <textarea class=\"form-input\" id=\"input-example-3\" placeholder=\"Paste your IOCs here\" rows=\"3\" v-model=\"iocs\"></textarea>\r\n </div>\r\n <div class=\"form-group\">\r\n <button class=\"btn btn-primary col-12\" v-on:click=\"search_iocs()\">Search</button>\r\n </div>\r\n <div class=\"form-group\" v-if=\"results.length>0 \">\r\n <table class=\"table table-striped table-hover\">\r\n <thead>\r\n <tr>\r\n <th>Indicator</th>\r\n <th>Tag</th>\r\n <th>TLP</th>\r\n <th>Source</th>\r\n <th>Action</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr v-for=\"r in results\" :key=\"r.tlp\">\r\n <td>{{ r.value }}</td>\r\n <td class=\"upper\">{{ r.tag }}</td>\r\n <td><label :class=\"['tlp-' + r.tlp]\">{{ r.tlp }}</label></td>\r\n <td class=\"capi\">{{ r.source }}</td>\r\n <td><button class=\"btn btn-sm\" v-on:click=\"remove(r)\">Delete</button></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <div v-else-if=\"first_search==false\">\r\n <div v-if=\"loading\">\r\n <div class=\"empty\">\r\n <p class=\"empty-title h5\">\r\n <span class=\"loading loading-lg\"></span>\r\n </p>\r\n <p class=\"empty-subtitle\">Finding your IOC(s)...</p>\r\n </div>\r\n </div>\r\n <div v-else>\r\n <div class=\"empty\">\r\n <p class=\"empty-title h5\">IOC<span v-if=\"this.iocs.match(/[^\\r\\n]+/g).length>1\">s</span> not found.</p>\r\n <p class=\"empty-subtitle\">Try wildcard search to expend your search.</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport axios from 'axios'\r\n\r\nexport default {\r\n name: 'iocs-search', \r\n data() {\r\n return { \r\n results: [],\r\n first_search: true,\r\n jwt:\"\",\r\n loading:false\r\n }\r\n },\r\n props: { },\r\n methods: {\r\n search_iocs: function() {\r\n this.results = []\r\n this.first_search = false\r\n this.loading = true;\r\n this.iocs.match(/[^\\r\\n]+/g).forEach(ioc => {\r\n ioc = ioc.trim()\r\n if(\"alert \" != ioc.slice(0,6)) {\r\n ioc = ioc.replace(\" \", \"\")\r\n ioc = ioc.replace(\"[\", \"\")\r\n ioc = ioc.replace(\"]\", \"\")\r\n ioc = ioc.replace(\"\\\\\", \"\")\r\n ioc = ioc.replace(\"(\", \"\")\r\n ioc = ioc.replace(\")\", \"\")\r\n }\r\n axios.get(`/api/ioc/search/${ioc}`, { timeout: 10000, headers: {'X-Token': this.jwt} })\r\n .then(response => {\r\n if(response.data.results.length>0){\r\n this.results = [].concat(this.results, response.data.results);\r\n }\r\n this.loading = false;\r\n })\r\n .catch(err => (console.log(err)))\r\n });\r\n return true;\r\n },\r\n remove: function(elem){\r\n axios.get(`/api/ioc/delete/${elem.id}`, { timeout: 10000, headers: {'X-Token': this.jwt} })\r\n .then(response => {\r\n if(response.data.status){\r\n this.results = this.results.filter(function(el) { return el != elem; }); \r\n }\r\n })\r\n .catch(err => (console.log(err)))\r\n },\r\n load_config: function() {\r\n axios.get(`/api/config/list`, {\r\n timeout: 10000,\r\n headers: { 'X-Token': this.jwt }\r\n }).then(response => {\r\n if (response.data) {\r\n this.config = response.data\r\n }\r\n })\r\n .catch(err => (console.log(err)))\r\n },\r\n async get_jwt(){\r\n await axios.get(`/api/get-token`, { timeout: 10000 })\r\n .then(response => {\r\n if(response.data.token){\r\n this.jwt = response.data.token\r\n }\r\n })\r\n .catch(err => (console.log(err)))\r\n }\r\n },\r\n created: function() {\r\n this.get_jwt()\r\n }\r\n}\r\n</script>","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./iocs-search.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./iocs-search.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./iocs-search.vue?vue&type=template&id=c0ab8c66&\"\nimport script from \"./iocs-search.vue?vue&type=script&lang=js&\"\nexport * from \"./iocs-search.vue?vue&type=script&lang=js&\"\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"],"sourceRoot":""}