Skip to content

Commit

Permalink
Merge pull request #801 from abdullahdevrel/master
Browse files Browse the repository at this point in the history
Added Host.io for domain lookup
  • Loading branch information
ninoseki authored Mar 29, 2024
2 parents c827bc6 + db6fc08 commit f3c251d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Mitaka is a browser extension that makes your OSINT (Open Source Intelligence) s
| FortiGuard | https://fortiguard.com | IP, URL, CVE |
| Google Safe Browsing | https://transparencyreport.google.com | Domain, URL |
| GreyNoise | https://viz.greynoise.io | IP, domain, ASN, CVE |
| Host.io | https://host.io | Domain |
| Hurricane Electric | https://bgp.he.net/ | IP, domain, ASN |
| HybridAnalysis | https://www.hybrid-analysis.com | IP, domain, hash |
| Intezer | https://analyze.intezer.com | Hash |
Expand Down
18 changes: 18 additions & 0 deletions src/searcher/hostio.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { SearchableType } from "~/schemas";
import type { Searcher } from "~/types";
import { buildURL } from "~/utils";

export class Hostio implements Searcher {
public baseURL: string;
public name: string;
public supportedTypes: SearchableType[] = ["domain"];

public constructor() {
this.baseURL = "https://host.io";
this.name = "Host.io";
}

public searchByDomain(query: string): string {
return buildURL(this.baseURL, `/${query}`);
}
}
3 changes: 3 additions & 0 deletions src/searcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
FortiGuard,
GoogleSafeBrowsing,
GreyNoise,
Hostio,
HurricaneElectric,
HybridAnalysis,
InQuest,
Expand Down Expand Up @@ -93,6 +94,7 @@ export { FOFA } from "./fofa";
export { FortiGuard } from "./fortiguard";
export { GoogleSafeBrowsing } from "./googlesafebrowsing";
export { GreyNoise } from "./greynoise";
export { Hostio } from "./hostio";
export { HurricaneElectric } from "./hurricaneelectric";
export { HybridAnalysis } from "./hybridanalysis";
export { InQuest } from "./inquest";
Expand Down Expand Up @@ -163,6 +165,7 @@ export const Searchers: Searcher[] = [
new FortiGuard(),
new GoogleSafeBrowsing(),
new GreyNoise(),
new Hostio(),
new HurricaneElectric(),
new HybridAnalysis(),
new InQuest(),
Expand Down
18 changes: 18 additions & 0 deletions tests/searcher/hostio.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Hostio } from "~/searcher";

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

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

describe("#searchByDomain", function () {
const domain = "github.com";
it("should return a URL", function () {
expect(subject.searchByDomain(domain)).toBe(
`https://host.io/${domain}`,
);
});
});
});

0 comments on commit f3c251d

Please sign in to comment.