mihari 5.7.0 → 5.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/lib/mihari/actor.rb +10 -4
  4. data/lib/mihari/commands/alert.rb +6 -4
  5. data/lib/mihari/commands/search.rb +10 -29
  6. data/lib/mihari/enrichers/ipinfo.rb +1 -1
  7. data/lib/mihari/entities/tag.rb +1 -0
  8. data/lib/mihari/rule.rb +14 -0
  9. data/lib/mihari/service.rb +12 -2
  10. data/lib/mihari/services/alert_builder.rb +81 -8
  11. data/lib/mihari/services/alert_runner.rb +3 -10
  12. data/lib/mihari/services/rule_builder.rb +8 -10
  13. data/lib/mihari/services/rule_runner.rb +2 -25
  14. data/lib/mihari/structs/binaryedge.rb +9 -0
  15. data/lib/mihari/structs/censys.rb +0 -14
  16. data/lib/mihari/structs/fofa.rb +3 -0
  17. data/lib/mihari/structs/google_public_dns.rb +0 -4
  18. data/lib/mihari/structs/greynoise.rb +0 -6
  19. data/lib/mihari/structs/hunterhow.rb +0 -6
  20. data/lib/mihari/structs/ipinfo.rb +0 -2
  21. data/lib/mihari/structs/onyphe.rb +0 -4
  22. data/lib/mihari/structs/shodan.rb +0 -2
  23. data/lib/mihari/structs/urlscan.rb +0 -6
  24. data/lib/mihari/structs/virustotal_intelligence.rb +0 -8
  25. data/lib/mihari/version.rb +1 -1
  26. data/lib/mihari/web/app.rb +20 -17
  27. data/lib/mihari/web/endpoints/alerts.rb +75 -38
  28. data/lib/mihari/web/endpoints/artifacts.rb +60 -53
  29. data/lib/mihari/web/endpoints/ip_addresses.rb +19 -4
  30. data/lib/mihari/web/endpoints/rules.rb +132 -88
  31. data/lib/mihari/web/endpoints/tags.rb +15 -13
  32. data/lib/mihari/web/public/assets/{index-821134e2.js → index-07fafab5.js} +4 -3
  33. data/lib/mihari/web/public/index.html +1 -1
  34. data/lib/mihari.rb +0 -1
  35. data/mihari.gemspec +1 -1
  36. data/mkdocs.yml +1 -0
  37. metadata +3 -130
  38. data/docs/alternatives.md +0 -5
  39. data/docs/analyzers/binaryedge.md +0 -26
  40. data/docs/analyzers/censys.md +0 -31
  41. data/docs/analyzers/circl.md +0 -37
  42. data/docs/analyzers/crtsh.md +0 -26
  43. data/docs/analyzers/dnstwister.md +0 -25
  44. data/docs/analyzers/feed.md +0 -73
  45. data/docs/analyzers/fofa.md +0 -31
  46. data/docs/analyzers/greynoise.md +0 -26
  47. data/docs/analyzers/hunterhow.md +0 -33
  48. data/docs/analyzers/index.md +0 -104
  49. data/docs/analyzers/onyphe.md +0 -26
  50. data/docs/analyzers/otx.md +0 -28
  51. data/docs/analyzers/passivetotal.md +0 -52
  52. data/docs/analyzers/pulsedive.md +0 -28
  53. data/docs/analyzers/securitytrails.md +0 -41
  54. data/docs/analyzers/shodan.md +0 -26
  55. data/docs/analyzers/urlscan.md +0 -28
  56. data/docs/analyzers/virustotal.md +0 -43
  57. data/docs/analyzers/virustotal_intelligence.md +0 -33
  58. data/docs/analyzers/zoomeye.md +0 -38
  59. data/docs/configuration.md +0 -35
  60. data/docs/emitters/database.md +0 -22
  61. data/docs/emitters/hive.md +0 -26
  62. data/docs/emitters/index.md +0 -36
  63. data/docs/emitters/misp.md +0 -21
  64. data/docs/emitters/slack.md +0 -21
  65. data/docs/emitters/webhook.md +0 -63
  66. data/docs/enrichers/google_public_dns.md +0 -19
  67. data/docs/enrichers/index.md +0 -35
  68. data/docs/enrichers/ipinfo.md +0 -26
  69. data/docs/enrichers/shodan.md +0 -22
  70. data/docs/enrichers/whois.md +0 -17
  71. data/docs/github_actions.md +0 -43
  72. data/docs/index.md +0 -11
  73. data/docs/installation.md +0 -31
  74. data/docs/requirements.md +0 -13
  75. data/docs/rule.md +0 -168
  76. data/docs/tags.md +0 -3
  77. data/docs/usage.md +0 -103
  78. data/frontend/.eslintrc.cjs +0 -22
  79. data/frontend/.gitignore +0 -31
  80. data/frontend/.prettierrc.json +0 -8
  81. data/frontend/README.md +0 -3
  82. data/frontend/env.d.ts +0 -5
  83. data/frontend/index.html +0 -21
  84. data/frontend/package-lock.json +0 -7219
  85. data/frontend/package.json +0 -67
  86. data/frontend/public/favicon.ico +0 -0
  87. data/frontend/scripts/swagger_doc_to_yaml.rb +0 -23
  88. data/frontend/src/App.vue +0 -27
  89. data/frontend/src/ace-config.ts +0 -6
  90. data/frontend/src/api-helper.ts +0 -111
  91. data/frontend/src/api.ts +0 -105
  92. data/frontend/src/components/ErrorMessage.vue +0 -31
  93. data/frontend/src/components/Loading.vue +0 -15
  94. data/frontend/src/components/Navbar.vue +0 -42
  95. data/frontend/src/components/Pagination.vue +0 -119
  96. data/frontend/src/components/alert/Alert.vue +0 -87
  97. data/frontend/src/components/alert/Alerts.vue +0 -63
  98. data/frontend/src/components/alert/AlertsWithPagination.vue +0 -90
  99. data/frontend/src/components/alert/AlertsWrapper.vue +0 -128
  100. data/frontend/src/components/alert/Form.vue +0 -169
  101. data/frontend/src/components/artifact/AS.vue +0 -23
  102. data/frontend/src/components/artifact/Artifact.vue +0 -287
  103. data/frontend/src/components/artifact/ArtifactTag.vue +0 -64
  104. data/frontend/src/components/artifact/ArtifactTags.vue +0 -29
  105. data/frontend/src/components/artifact/ArtifactWrapper.vue +0 -57
  106. data/frontend/src/components/artifact/CPEs.vue +0 -23
  107. data/frontend/src/components/artifact/DnsRecords.vue +0 -32
  108. data/frontend/src/components/artifact/Ports.vue +0 -23
  109. data/frontend/src/components/artifact/ReverseDnsNames.vue +0 -23
  110. data/frontend/src/components/artifact/Tags.vue +0 -29
  111. data/frontend/src/components/artifact/WhoisRecord.vue +0 -44
  112. data/frontend/src/components/config/Configs.vue +0 -65
  113. data/frontend/src/components/config/ConfigsWrapper.vue +0 -32
  114. data/frontend/src/components/link/Link.vue +0 -32
  115. data/frontend/src/components/link/Links.vue +0 -42
  116. data/frontend/src/components/rule/EditRule.vue +0 -72
  117. data/frontend/src/components/rule/EditRuleWrapper.vue +0 -48
  118. data/frontend/src/components/rule/Form.vue +0 -158
  119. data/frontend/src/components/rule/InputForm.vue +0 -45
  120. data/frontend/src/components/rule/NewRule.vue +0 -57
  121. data/frontend/src/components/rule/Rule.vue +0 -100
  122. data/frontend/src/components/rule/RuleWrapper.vue +0 -53
  123. data/frontend/src/components/rule/Rules.vue +0 -84
  124. data/frontend/src/components/rule/RulesWrapper.vue +0 -121
  125. data/frontend/src/components/rule/YAML.vue +0 -37
  126. data/frontend/src/components/tag/Tag.vue +0 -65
  127. data/frontend/src/components/tag/Tags.vue +0 -37
  128. data/frontend/src/countries.ts +0 -350
  129. data/frontend/src/index.ts +0 -20
  130. data/frontend/src/links/anyrun.ts +0 -19
  131. data/frontend/src/links/base.ts +0 -14
  132. data/frontend/src/links/censys.ts +0 -20
  133. data/frontend/src/links/crtsh.ts +0 -20
  134. data/frontend/src/links/dnslytics.ts +0 -38
  135. data/frontend/src/links/greynoise.ts +0 -20
  136. data/frontend/src/links/index.ts +0 -40
  137. data/frontend/src/links/intezer.ts +0 -20
  138. data/frontend/src/links/otx.ts +0 -33
  139. data/frontend/src/links/securitytrails.ts +0 -38
  140. data/frontend/src/links/shodan.ts +0 -20
  141. data/frontend/src/links/urlscan.ts +0 -50
  142. data/frontend/src/links/virustotal.ts +0 -72
  143. data/frontend/src/main.ts +0 -41
  144. data/frontend/src/router/index.ts +0 -57
  145. data/frontend/src/rule.ts +0 -14
  146. data/frontend/src/shims-vue.d.ts +0 -6
  147. data/frontend/src/swagger.yaml +0 -771
  148. data/frontend/src/types.ts +0 -188
  149. data/frontend/src/utils.ts +0 -54
  150. data/frontend/src/views/Alerts.vue +0 -20
  151. data/frontend/src/views/Artifact.vue +0 -39
  152. data/frontend/src/views/Configs.vue +0 -20
  153. data/frontend/src/views/EditRule.vue +0 -39
  154. data/frontend/src/views/NewRule.vue +0 -26
  155. data/frontend/src/views/Rule.vue +0 -39
  156. data/frontend/src/views/Rules.vue +0 -20
  157. data/frontend/tests/utils.spec.ts +0 -9
  158. data/frontend/tsconfig.app.json +0 -21
  159. data/frontend/tsconfig.json +0 -14
  160. data/frontend/tsconfig.node.json +0 -13
  161. data/frontend/tsconfig.vitest.json +0 -12
  162. data/frontend/vite.config.ts +0 -24
  163. data/frontend/vitest.config.ts +0 -21
  164. data/lib/mihari/services/alert_proxy.rb +0 -97
@@ -1,287 +0,0 @@
1
- <template>
2
- <div class="column">
3
- <div v-if="enrichArtifactTask.isRunning">
4
- <Loading></Loading>
5
- <hr />
6
- </div>
7
- <h2 class="is-size-2 mb-4">Artifact</h2>
8
- <div class="columns">
9
- <div
10
- class="column is-half"
11
- v-if="googleMapSrc !== undefined || urlscanLiveshotSrc !== undefined"
12
- >
13
- <div v-if="googleMapSrc">
14
- <h4 class="is-size-4 mb-2">
15
- Geolocation
16
- <span class="has-text-grey">{{
17
- countryCode || artifact.geolocation?.countryCode
18
- }}</span>
19
- </h4>
20
- <iframe class="mb-4" :src="googleMapSrc" width="100%" height="240px"></iframe>
21
- </div>
22
- <div v-if="urlscanLiveshotSrc">
23
- <h4 class="is-size-4 mb-2">
24
- Live screenshot
25
- <span class="has-text-grey">Hover to expand</span>
26
- </h4>
27
- <img :src="urlscanLiveshotSrc" class="liveshot" alt="liveshot" />
28
- </div>
29
- </div>
30
- <div class="column">
31
- <div class="block">
32
- <h4 class="is-size-4 mb-2">Information</h4>
33
- <table class="table is-fullwidth is-completely-borderless">
34
- <tr>
35
- <th>ID</th>
36
- <td>
37
- {{ artifact.id }}
38
- <span class="buttons is-pulled-right">
39
- <button class="button is-primary is-light is-small" @click="enrichArtifact">
40
- <span>Enrich</span>
41
- <span class="icon is-small">
42
- <font-awesome-icon icon="lightbulb"></font-awesome-icon>
43
- </span>
44
- </button>
45
- <button
46
- class="button is-info is-light is-small"
47
- @click="flipShowMetadata"
48
- v-if="artifact.metadata"
49
- >
50
- <span>Metadata</span>
51
- <span class="icon is-small">
52
- <font-awesome-icon icon="info-circle"></font-awesome-icon>
53
- </span>
54
- </button>
55
- <button class="button is-light is-small" @click="deleteArtifact">
56
- <span>Delete</span>
57
- <span class="icon is-small">
58
- <font-awesome-icon icon="times"></font-awesome-icon>
59
- </span>
60
- </button>
61
- </span>
62
- </td>
63
- </tr>
64
- <tr>
65
- <th>Data type</th>
66
- <td>{{ artifact.dataType }}</td>
67
- </tr>
68
- <tr>
69
- <th>Data</th>
70
- <td>{{ artifact.data }}</td>
71
- </tr>
72
- <tr>
73
- <th>Source</th>
74
- <td>{{ artifact.source }}</td>
75
- </tr>
76
- <tr v-if="artifact.tags.length > 0">
77
- <th>Tags</th>
78
- <td><Tags :tags="artifact.tags"></Tags></td>
79
- </tr>
80
- </table>
81
- </div>
82
- <div v-if="artifact.metadata && showMetadata">
83
- <div class="modal is-active">
84
- <div class="modal-background" @click="flipShowMetadata"></div>
85
- <div class="modal-card">
86
- <header class="modal-card-head">
87
- <p class="modal-card-title">Metadata</p>
88
- <button class="delete" aria-label="close" @click="flipShowMetadata"></button>
89
- </header>
90
- <section class="modal-card-body">
91
- <VueJsonPretty :data="artifact.metadata as any"></VueJsonPretty>
92
- </section>
93
- </div>
94
- </div>
95
- </div>
96
- </div>
97
- </div>
98
- <div class="block" v-if="artifact.autonomousSystem">
99
- <h4 class="is-size-4 mb-2">AS</h4>
100
- <AS :autonomousSystem="artifact.autonomousSystem"></AS>
101
- </div>
102
- <div class="block" v-if="artifact.reverseDnsNames">
103
- <h4 class="is-size-4 mb-2">Reverse DNS</h4>
104
- <ReverseDnsNames :reverseDnsNames="artifact.reverseDnsNames"></ReverseDnsNames>
105
- </div>
106
- <div class="block" v-if="artifact.dnsRecords">
107
- <h4 class="is-size-4 mb-2">DNS records</h4>
108
- <DnsRecords :dnsRecords="artifact.dnsRecords"></DnsRecords>
109
- </div>
110
- <div class="block" v-if="artifact.cpes">
111
- <h4 class="is-size-4 mb-2">CPEs</h4>
112
- <CPEs :cpes="artifact.cpes"></CPEs>
113
- </div>
114
- <div class="block" v-if="artifact.ports">
115
- <h4 class="is-size-4 mb-2">Ports</h4>
116
- <Ports :ports="artifact.ports"></Ports>
117
- </div>
118
- <div class="block" v-if="artifact.whoisRecord">
119
- <h4 class="is-size-4 mb-2">Whois record</h4>
120
- <WhoisRecord :whoisRecord="artifact.whoisRecord"></WhoisRecord>
121
- </div>
122
- <div class="block">
123
- <h4 class="is-size-4 mb-2">Links</h4>
124
- <Links :data="artifact.data" :type="artifact.dataType"></Links>
125
- </div>
126
- </div>
127
- <hr />
128
- <div class="column">
129
- <h2 class="is-size-2 mb-4">Related alerts</h2>
130
- <Alerts :artifact="artifact.data"></Alerts>
131
- </div>
132
- </template>
133
-
134
- <script lang="ts">
135
- import "vue-json-pretty/lib/styles.css"
136
-
137
- import { computed, defineComponent, onMounted, type PropType, ref } from "vue"
138
- import VueJsonPretty from "vue-json-pretty"
139
- import { useRouter } from "vue-router"
140
-
141
- import {
142
- generateDeleteArtifactTask,
143
- generateEnrichArtifactTask,
144
- generateGetAlertsTask,
145
- generateGetIPTask
146
- } from "@/api-helper"
147
- import Alerts from "@/components/alert/AlertsWithPagination.vue"
148
- import AS from "@/components/artifact/AS.vue"
149
- import CPEs from "@/components/artifact/CPEs.vue"
150
- import DnsRecords from "@/components/artifact/DnsRecords.vue"
151
- import Ports from "@/components/artifact/Ports.vue"
152
- import ReverseDnsNames from "@/components/artifact/ReverseDnsNames.vue"
153
- import Tags from "@/components/artifact/Tags.vue"
154
- import WhoisRecord from "@/components/artifact/WhoisRecord.vue"
155
- import Links from "@/components/link/Links.vue"
156
- import Loading from "@/components/Loading.vue"
157
- import type { ArtifactWithTags, GCS } from "@/types"
158
- import { getGCSByCountryCode, getGCSByIPInfo } from "@/utils"
159
-
160
- export default defineComponent({
161
- name: "ArtifactItem",
162
- props: {
163
- artifact: {
164
- type: Object as PropType<ArtifactWithTags>,
165
- required: true
166
- }
167
- },
168
- components: {
169
- Alerts,
170
- AS,
171
- DnsRecords,
172
- Links,
173
- Loading,
174
- ReverseDnsNames,
175
- Tags,
176
- VueJsonPretty,
177
- WhoisRecord,
178
- CPEs,
179
- Ports
180
- },
181
- emits: ["refresh"],
182
- setup(props, context) {
183
- const googleMapSrc = ref<string | undefined>(undefined)
184
- const countryCode = ref<string | undefined>(undefined)
185
- const showMetadata = ref(false)
186
-
187
- const router = useRouter()
188
-
189
- const urlscanLiveshotSrc = computed<string | undefined>(() => {
190
- if (props.artifact.dataType === "domain") {
191
- const url = `http://${props.artifact.data}`
192
- return `https://urlscan.io/liveshot/?url=${url}`
193
- }
194
-
195
- if (props.artifact.dataType === "url") {
196
- return `https://urlscan.io/liveshot/?url=${props.artifact.data}`
197
- }
198
-
199
- return undefined
200
- })
201
-
202
- const getGoogleMapSrc = (gcs: GCS | undefined): string | undefined => {
203
- if (gcs !== undefined) {
204
- return `https://maps.google.co.jp/maps?output=embed&q=${gcs.lat},${gcs.long}&z=3`
205
- }
206
-
207
- return undefined
208
- }
209
-
210
- const getIPInfoTask = generateGetIPTask()
211
- const getAlertsTask = generateGetAlertsTask()
212
- const deleteArtifactTask = generateDeleteArtifactTask()
213
- const enrichArtifactTask = generateEnrichArtifactTask()
214
-
215
- const deleteArtifact = async () => {
216
- const result = window.confirm(`Are you sure you want to delete ${props.artifact.data}?`)
217
-
218
- if (result) {
219
- await deleteArtifactTask.perform(props.artifact.id)
220
- router.push("/")
221
- }
222
- }
223
-
224
- const enrichArtifact = async () => {
225
- await enrichArtifactTask.perform(props.artifact.id)
226
- context.emit("refresh")
227
- }
228
-
229
- onMounted(async () => {
230
- if (props.artifact.dataType === "ip") {
231
- let gcs: GCS | undefined = undefined
232
-
233
- if (props.artifact.geolocation === null) {
234
- // Use IPInfo if an artifact does not have geolocation
235
- const ipinfo = await getIPInfoTask.perform(props.artifact.data)
236
- gcs = getGCSByIPInfo(ipinfo)
237
- countryCode.value = ipinfo.countryCode
238
- } else {
239
- gcs = getGCSByCountryCode(props.artifact.geolocation.countryCode)
240
- }
241
-
242
- googleMapSrc.value = getGoogleMapSrc(gcs)
243
- }
244
- })
245
-
246
- const flipShowMetadata = () => {
247
- showMetadata.value = !showMetadata.value
248
- }
249
-
250
- return {
251
- countryCode,
252
- enrichArtifactTask,
253
- getAlertsTask,
254
- googleMapSrc,
255
- showMetadata,
256
- urlscanLiveshotSrc,
257
- deleteArtifact,
258
- enrichArtifact,
259
- flipShowMetadata
260
- }
261
- }
262
- })
263
- </script>
264
-
265
- <style scoped>
266
- img.liveshot {
267
- border: 1px solid #aaa;
268
- border-radius: 5px;
269
- width: 100%;
270
- max-height: 250px;
271
- object-fit: cover;
272
- object-position: top;
273
- display: block;
274
- overflow: hidden;
275
- transition:
276
- max-height 1s,
277
- height 1s;
278
- }
279
-
280
- img.liveshot:hover {
281
- max-height: none;
282
- }
283
-
284
- .modal-card {
285
- width: 960px;
286
- }
287
- </style>
@@ -1,64 +0,0 @@
1
- <template>
2
- <div class="control" v-if="!isDeleted">
3
- <div
4
- class="tags has-addons are-medium"
5
- v-on:mouseover="showDeleteButton"
6
- v-on:mouseleave="hideDeleteButton"
7
- >
8
- <router-link
9
- class="tag is-link is-light"
10
- :to="{ name: 'Artifact', params: { id: artifact.id } }"
11
- >{{ artifact.data }}</router-link
12
- >
13
- <span class="tag is-delete" v-if="isDeleteButtonEnabled" @click="deleteArtifact"></span>
14
- </div>
15
- </div>
16
- </template>
17
-
18
- <script lang="ts">
19
- import { defineComponent, type PropType, ref } from "vue"
20
-
21
- import { generateDeleteArtifactTask } from "@/api-helper"
22
- import type { Artifact } from "@/types"
23
-
24
- export default defineComponent({
25
- name: "ArtifactTag",
26
- props: {
27
- artifact: {
28
- type: Object as PropType<Artifact>,
29
- required: true
30
- }
31
- },
32
- setup(props) {
33
- const isDeleted = ref(false)
34
- const isDeleteButtonEnabled = ref(false)
35
-
36
- const deleteArtifactTask = generateDeleteArtifactTask()
37
-
38
- const deleteArtifact = async () => {
39
- const result = window.confirm(`Are you sure you want to delete ${props.artifact.data}?`)
40
-
41
- if (result) {
42
- await deleteArtifactTask.perform(props.artifact.id)
43
- isDeleted.value = true
44
- }
45
- }
46
-
47
- const showDeleteButton = () => {
48
- isDeleteButtonEnabled.value = true
49
- }
50
-
51
- const hideDeleteButton = () => {
52
- isDeleteButtonEnabled.value = false
53
- }
54
-
55
- return {
56
- isDeleted,
57
- deleteArtifact,
58
- showDeleteButton,
59
- hideDeleteButton,
60
- isDeleteButtonEnabled
61
- }
62
- }
63
- })
64
- </script>
@@ -1,29 +0,0 @@
1
- <template>
2
- <div class="field is-grouped is-grouped-multiline">
3
- <ArtifactComponent
4
- v-for="artifact in artifacts"
5
- :key="artifact.id"
6
- :artifact="artifact"
7
- ></ArtifactComponent>
8
- </div>
9
- </template>
10
-
11
- <script lang="ts">
12
- import { defineComponent, type PropType } from "vue"
13
-
14
- import ArtifactComponent from "@/components/artifact/ArtifactTag.vue"
15
- import type { Artifact } from "@/types"
16
-
17
- export default defineComponent({
18
- name: "ArtifactTags",
19
- components: {
20
- ArtifactComponent
21
- },
22
- props: {
23
- artifacts: {
24
- type: Array as PropType<Artifact[]>,
25
- required: true
26
- }
27
- }
28
- })
29
- </script>
@@ -1,57 +0,0 @@
1
- <template>
2
- <Loading v-if="getArtifactTask.isRunning"></Loading>
3
- <ErrorMessage v-if="getArtifactTask.isError" :error="getArtifactTask.last?.error"></ErrorMessage>
4
- <ArtifactComponent
5
- :artifact="getArtifactTask.last.value"
6
- @refresh="refresh"
7
- v-if="getArtifactTask.last?.value"
8
- ></ArtifactComponent>
9
- </template>
10
-
11
- <script lang="ts">
12
- import { defineComponent, onMounted, watch } from "vue"
13
-
14
- import { generateGetArtifactTask } from "@/api-helper"
15
- import ArtifactComponent from "@/components/artifact/Artifact.vue"
16
- import ErrorMessage from "@/components/ErrorMessage.vue"
17
- import Loading from "@/components/Loading.vue"
18
-
19
- export default defineComponent({
20
- name: "ArtifactWrapper",
21
- components: {
22
- ArtifactComponent,
23
- Loading,
24
- ErrorMessage
25
- },
26
- props: {
27
- id: {
28
- type: String,
29
- required: true
30
- }
31
- },
32
- setup(props) {
33
- const getArtifactTask = generateGetArtifactTask()
34
-
35
- const getArtifact = async () => {
36
- await getArtifactTask.perform(props.id)
37
- }
38
-
39
- const refresh = async () => {
40
- await getArtifact()
41
- }
42
-
43
- onMounted(async () => {
44
- await getArtifact()
45
- })
46
-
47
- watch(props, async () => {
48
- await getArtifact()
49
- })
50
-
51
- return {
52
- getArtifactTask,
53
- refresh
54
- }
55
- }
56
- })
57
- </script>
@@ -1,23 +0,0 @@
1
- <template>
2
- <div class="tags are-medium">
3
- <span class="tag" v-for="cpe in cpes" :key="cpe.cpe">
4
- {{ cpe.cpe }}
5
- </span>
6
- </div>
7
- </template>
8
-
9
- <script lang="ts">
10
- import { defineComponent, type PropType } from "vue"
11
-
12
- import type { CPE } from "@/types"
13
-
14
- export default defineComponent({
15
- name: "CPEsItem",
16
- props: {
17
- cpes: {
18
- type: Array as PropType<CPE[]>,
19
- required: true
20
- }
21
- }
22
- })
23
- </script>
@@ -1,32 +0,0 @@
1
- <template>
2
- <div class="field is-grouped is-grouped-multiline">
3
- <div class="control" v-for="(dnsRecord, index) in dnsRecords" :key="index">
4
- <div class="tags has-addons are-medium">
5
- <span class="tag is-dark"> {{ dnsRecord.resource }}</span>
6
- <span class="tag">
7
- {{ truncate(dnsRecord.value, 50) }}
8
- </span>
9
- </div>
10
- </div>
11
- </div>
12
- </template>
13
-
14
- <script lang="ts">
15
- import truncate from "truncate"
16
- import { defineComponent, type PropType } from "vue"
17
-
18
- import type { DnsRecord } from "@/types"
19
-
20
- export default defineComponent({
21
- name: "DnsRecords",
22
- props: {
23
- dnsRecords: {
24
- type: Array as PropType<DnsRecord[]>,
25
- required: true
26
- }
27
- },
28
- setup() {
29
- return { truncate }
30
- }
31
- })
32
- </script>
@@ -1,23 +0,0 @@
1
- <template>
2
- <div class="tags are-medium">
3
- <span class="tag" v-for="port in ports" :key="port.port">
4
- {{ port.port }}
5
- </span>
6
- </div>
7
- </template>
8
-
9
- <script lang="ts">
10
- import { defineComponent, type PropType } from "vue"
11
-
12
- import type { Port } from "@/types"
13
-
14
- export default defineComponent({
15
- name: "PortsItem",
16
- props: {
17
- ports: {
18
- type: Array as PropType<Port[]>,
19
- required: true
20
- }
21
- }
22
- })
23
- </script>
@@ -1,23 +0,0 @@
1
- <template>
2
- <div class="tags are-medium">
3
- <span class="tag" v-for="reverseDnsName in reverseDnsNames" :key="reverseDnsName.name">
4
- {{ reverseDnsName.name }}
5
- </span>
6
- </div>
7
- </template>
8
-
9
- <script lang="ts">
10
- import { defineComponent, type PropType } from "vue"
11
-
12
- import type { ReverseDnsName } from "@/types"
13
-
14
- export default defineComponent({
15
- name: "ReverseDnsNames",
16
- props: {
17
- reverseDnsNames: {
18
- type: Array as PropType<ReverseDnsName[]>,
19
- required: true
20
- }
21
- }
22
- })
23
- </script>
@@ -1,29 +0,0 @@
1
- <template>
2
- <div class="tags are-medium">
3
- <router-link
4
- class="tag is-info is-light"
5
- v-for="tag in tags"
6
- :key="tag"
7
- :to="{
8
- name: 'Alerts',
9
- query: { tag: tag }
10
- }"
11
- >
12
- {{ tag }}
13
- </router-link>
14
- </div>
15
- </template>
16
-
17
- <script lang="ts">
18
- import { defineComponent, type PropType } from "vue"
19
-
20
- export default defineComponent({
21
- name: "TagsItem",
22
- props: {
23
- tags: {
24
- type: Array as PropType<string[]>,
25
- required: true
26
- }
27
- }
28
- })
29
- </script>
@@ -1,44 +0,0 @@
1
- <template>
2
- <div class="field is-grouped is-grouped-multiline">
3
- <div class="control">
4
- <div class="tags has-addons are-medium">
5
- <span class="tag is-dark">Registrar</span>
6
- <span class="tag is-light">{{ whoisRecord.registrar?.name || "N/A" }}</span>
7
- </div>
8
- </div>
9
- <div class="control">
10
- <div class="tags has-addons are-medium">
11
- <span class="tag is-dark">Created on</span>
12
- <span class="tag is-light">{{ whoisRecord.createdOn || "N/A" }}</span>
13
- </div>
14
- </div>
15
- <div class="control">
16
- <div class="tags has-addons are-medium">
17
- <span class="tag is-dark">Updated on</span>
18
- <span class="tag is-light">{{ whoisRecord.updatedOn || "N/A" }}</span>
19
- </div>
20
- </div>
21
- <div class="control">
22
- <div class="tags has-addons are-medium">
23
- <span class="tag is-dark">Expires on</span>
24
- <span class="tag is-light">{{ whoisRecord.expiresOn || "N/A" }}</span>
25
- </div>
26
- </div>
27
- </div>
28
- </template>
29
-
30
- <script lang="ts">
31
- import { defineComponent, type PropType } from "vue"
32
-
33
- import type { WhoisRecord } from "@/types"
34
-
35
- export default defineComponent({
36
- name: "WhoisRecord",
37
- props: {
38
- whoisRecord: {
39
- type: Object as PropType<WhoisRecord>,
40
- required: true
41
- }
42
- }
43
- })
44
- </script>
@@ -1,65 +0,0 @@
1
- <template>
2
- <div class="box">
3
- <div class="table-container">
4
- <table class="table is-fullwidth">
5
- <thead>
6
- <tr>
7
- <th>Name</th>
8
- <th>Type</th>
9
- <th>Configured</th>
10
- <th>Key-value(s)</th>
11
- </tr>
12
- </thead>
13
- <tbody>
14
- <tr v-for="config in configs" :key="config.name">
15
- <td>
16
- {{ config.name }}
17
- </td>
18
- <td>
19
- {{ config.type }}
20
- </td>
21
- <td>
22
- <button class="button is-success is-small ml-1" v-if="config.isConfigured">
23
- <span class="icon is-small">
24
- <font-awesome-icon icon="check"></font-awesome-icon>
25
- </span>
26
- <span>Yes</span>
27
- </button>
28
- <button class="button is-warning is-small ml-1" v-else>
29
- <span class="icon is-small">
30
- <font-awesome-icon icon="exclamation"></font-awesome-icon>
31
- </span>
32
- <span>No</span>
33
- </button>
34
- </td>
35
- <td>
36
- <ul>
37
- <li v-for="(kv, index) in config.values" :key="index">
38
- <strong> {{ kv.key }} </strong>:
39
- <code v-if="kv.value">{{ kv.value }}</code>
40
- <span v-else>N/A</span>
41
- </li>
42
- </ul>
43
- </td>
44
- </tr>
45
- </tbody>
46
- </table>
47
- </div>
48
- </div>
49
- </template>
50
-
51
- <script lang="ts">
52
- import { defineComponent, type PropType } from "vue"
53
-
54
- import type { Config } from "@/types"
55
-
56
- export default defineComponent({
57
- name: "ConfigsItem",
58
- props: {
59
- configs: {
60
- type: Array as PropType<Config[]>,
61
- required: true
62
- }
63
- }
64
- })
65
- </script>