Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ninoseki/shimon
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki committed Nov 1, 2023
2 parents 86fe601 + 6bffa83 commit 67d6248
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 5 deletions.
17 changes: 17 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"axios": "1.6.0",
"bulma": "0.9.4",
"email-regex": "5.0.0",
"js-base64": "^3.7.5",
"qs": "6.11.2",
"vue": "3.3.7",
"vue-concurrency": "4.0.1",
Expand All @@ -25,6 +26,7 @@
"devDependencies": {
"@rushstack/eslint-patch": "^1.5.1",
"@tsconfig/node20": "^20.1.2",
"@types/js-base64": "^3.3.1",
"@types/jsdom": "^21.1.4",
"@types/node": "^20.8.9",
"@types/qs": "^6.9.9",
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/components/Calculator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@
<hr />
<BinaryEdge :fingerprint="calculateTask.last.value"></BinaryEdge>
<Censys :fingerprint="calculateTask.last.value"></Censys>
<Fofa :fingerprint="calculateTask.last.value"></Fofa>
<Onyphe :fingerprint="calculateTask.last.value"></Onyphe>
<SecurityTrails :fingerprint="calculateTask.last.value"></SecurityTrails>
<Shodan :fingerprint="calculateTask.last.value"></Shodan>
<SpyOnWeb :fingerprint="calculateTask.last.value"></SpyOnWeb>
<Urlscan :fingerprint="calculateTask.last.value"></Urlscan>
<VirusTotal :fingerprint="calculateTask.last.value"></VirusTotal>
<SecurityTrails :fingerprint="calculateTask.last.value"></SecurityTrails>
<SpyOnWeb :fingerprint="calculateTask.last.value"></SpyOnWeb>
<ZoomEye :fingerprint="calculateTask.last.value"></ZoomEye>
</div>
</div>
Expand All @@ -51,6 +52,7 @@ import FingerprintComponent from "@/components/Fingerprint.vue"
import Loading from "@/components/Loading.vue"
import BinaryEdge from "@/components/services/BinaryEdge.vue"
import Censys from "@/components/services/Censys.vue"
import Fofa from "@/components/services/Fofa.vue"
import Onyphe from "@/components/services/Onyphe.vue"
import SecurityTrails from "@/components/services/SecurityTrails.vue"
import Shodan from "@/components/services/Shodan.vue"
Expand All @@ -67,13 +69,14 @@ export default defineComponent({
Censys,
ErrorMessage,
FingerprintComponent,
Fofa,
Loading,
Onyphe,
SecurityTrails,
Shodan,
SpyOnWeb,
Urlscan,
VirusTotal,
SecurityTrails,
SpyOnWeb,
ZoomEye
},
setup() {
Expand Down
75 changes: 75 additions & 0 deletions frontend/src/components/services/Fofa.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<template>
<div class="box content is-normal">
<h4 class="is-size-4">
<span class="icon">
<img src="https://www.google.com/s2/favicons?domain=fofa.info" alt="fofa" />
</span>
Fofa
</h4>
<QueryTags :queries="queries"></QueryTags>
</div>
</template>

<script lang="ts">
import { Base64 } from "js-base64"
import * as qs from "qs"
import { computed, defineComponent, type PropType } from "vue"
import QueryTags from "@/components/services/QueryTags.vue"
import type { Fingerprint, Query } from "@/types"
export default defineComponent({
name: "FofaComponent",
props: {
fingerprint: {
type: Object as PropType<Fingerprint>,
required: true
}
},
components: { QueryTags },
setup(props) {
const base64fy = (s: string) => {
return Base64.encode(s).trim()
}
const createLink = (q: string): string => {
const baseUrl = "https://en.fofa.info/result?"
const qbase64 = base64fy(q)
const params = { qbase64 }
return baseUrl + qs.stringify(params)
}
const queries = computed<Query[]>(() => {
const q: Query[] = [
{
key: "Title",
query: `title="${props.fingerprint.html.title}"`,
link: createLink(`title="${props.fingerprint.html.title}"`)
}
]
if (props.fingerprint.favicon) {
const query = `icon_hash="${props.fingerprint.favicon?.mmh3}"`
q.push({
key: "Favicon",
query: query,
link: createLink(query)
})
}
if (props.fingerprint.tls) {
const query = `jarm="${props.fingerprint.tls.jarm}"`
q.push({
key: "JARM",
query: query,
link: createLink(query)
})
}
return q
})
return { queries }
}
})
</script>
17 changes: 16 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ mmh3 = "^4.0"
pyhumps = "^3.8.0"
pyOpenSSL = "^23.3"
returns = "^0.22"
scapy = "^2.5.0"
tldextract = "^5.0"
uvicorn = { extras = ["standard"], version = "^0.23" }

Expand Down

0 comments on commit 67d6248

Please sign in to comment.