Skip to content

Commit

Permalink
Merge pull request #387 from ninoseki/add-intezer
Browse files Browse the repository at this point in the history
feat: add Intezer lookup
  • Loading branch information
ninoseki authored Mar 2, 2020
2 parents 3c780d8 + 132d7c6 commit 3988758
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/searcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export { HurricaneElectric } from "./hurricaneelectric";
export { HybridAnalysis } from "./hybridanalysis";
export { InQuest } from "./inquest";
export { IntelligenceX } from "./intelligencex";
export { Intezer } from "./intezer";
export { IPinfo } from "./ipinfo";
export { IPIP } from "./ipip";
export { JoeSandbox } from "./joesandbox";
Expand Down
17 changes: 17 additions & 0 deletions src/lib/searcher/intezer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { buildURL } from "../url_builder";
import { Searcher, SearchableType } from "../types";

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

public constructor() {
this.baseURL = "https://analyze.intezer.com";
this.name = "Intezer";
}

public searchByHash(query: string): string {
return buildURL(this.baseURL, `/#/files/${query}`);
}
}
2 changes: 2 additions & 0 deletions src/lib/searcher/searchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
HybridAnalysis,
InQuest,
IntelligenceX,
Intezer,
IPinfo,
IPIP,
JoeSandbox,
Expand Down Expand Up @@ -99,6 +100,7 @@ export const Searchers: Searcher[] = [
new HybridAnalysis(),
new InQuest(),
new IntelligenceX(),
new Intezer(),
new IPinfo(),
new IPIP(),
new JoeSandbox(),
Expand Down
21 changes: 21 additions & 0 deletions test/searcher/intezer.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { expect } from "chai";
import "mocha";
import { Intezer } from "../../src/lib/searcher";

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

it("should support Hash type IOC", function() {
expect(subject.supportedTypes).to.deep.equal(["hash"]);
});

describe("#searchByHash", function() {
it("should return URL", function() {
const hash =
"794374d3e3bd6f2bb232f61d2922d9dae3f78f864a2941f3b76157f82a3e6017";
expect(subject.searchByHash(hash)).to.equal(
"https://analyze.intezer.com/#/files/794374d3e3bd6f2bb232f61d2922d9dae3f78f864a2941f3b76157f82a3e6017"
);
});
});
});

0 comments on commit 3988758

Please sign in to comment.