Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ Mitaka is a browser extension that makes your OSINT (Open Source Intelligence) s
| Checkphish | https://checkphish.ai | IP, domain |
| Coalition | https://ess.coalitioninc.com | CVE |
| crt.sh | https://crt.sh | Domain |
| DNSlytics | https://dnslytics.com | IP, domain |
| CVE | https://cve.org | CVE |
| DNS Coffee | https://dns.coffee | Domain |
| DNSlytics | https://dnslytics.com | IP, domain |
| DomainTools | https://www.domaintools.com | IP, domain |
| EmailRep | https://emailrep.io | Email |
| FileScan.IO | https://filescan.io | Hash |
Expand Down
22 changes: 22 additions & 0 deletions src/searcher/cve.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ok } from "neverthrow";

import type { SearchableType } from "~/schemas";
import { buildURL } from "~/utils";

import { Base } from "./base";

export class CVE extends Base {
public baseURL: string;
public name: string;
public supportedTypes: SearchableType[] = ["cve"];

public constructor() {
super();
this.baseURL = "https://cve.org";
this.name = "CVE";
}

public searchByCVE(query: string) {
return ok(buildURL(this.baseURL, `/CVERecord?id=${query}`));
}
}
3 changes: 3 additions & 0 deletions src/searcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
JoeSandbox,
Maltiverse,
MalwareBazaar,
MITRE,
NVD,
OCCRP,
ONYPHE,
Expand Down Expand Up @@ -71,6 +72,7 @@ export { Censys } from "./censys";
export { CheckPhish } from "./checkphish";
export { Coalition } from "./coalition";
export { Crtsh } from "./crtsh";
export { CVE as MITRE } from "./cve";
export { DNSCoffee } from "./dnsCoffee";
export { DNSlytics } from "./dnslytics";
export { DomainBigData } from "./domainbigdata";
Expand Down Expand Up @@ -156,6 +158,7 @@ export const Searchers: Searcher[] = [
new JoeSandbox(),
new Maltiverse(),
new MalwareBazaar(),
new MITRE(),
new NVD(),
new OCCRP(),
new ONYPHE(),
Expand Down
18 changes: 18 additions & 0 deletions tests/searcher/cve.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { MITRE } from "~/searcher";

describe("MITRE", function () {
const subject = new MITRE();

it("should support cve", function () {
expect(subject.supportedTypes).toEqual(["cve"]);
});

describe("#searchByCVE", function () {
const cve = "CVE-2018-8013";
it("should return a URL", function () {
expect(subject.searchByCVE(cve)._unsafeUnwrap()).toBe(
`https://cve.org/CVERecord?id=${cve}`,
);
});
});
});