diff --git a/src/DarkWeb/DarkWebItems.ts b/src/DarkWeb/DarkWebItems.ts index c6515d032..191540fbf 100644 --- a/src/DarkWeb/DarkWebItems.ts +++ b/src/DarkWeb/DarkWebItems.ts @@ -1,9 +1,10 @@ import { DarkWebItem } from "./DarkWebItem"; import { IMap } from "../types"; -import { Programs } from "../Programs/Programs"; +import { Programs, initPrograms } from "../Programs/Programs"; export const DarkWebItems: IMap = {}; export function initDarkWebItems() { + initPrograms(); Object.assign(DarkWebItems, { BruteSSHProgram: new DarkWebItem(Programs.BruteSSHProgram.name, 500e3, "Opens up SSH Ports."), FTPCrackProgram: new DarkWebItem(Programs.FTPCrackProgram.name, 1500e3, "Opens up FTP Ports."), diff --git a/src/Programs/Programs.ts b/src/Programs/Programs.ts index e17c5c7e0..c6885dbaa 100644 --- a/src/Programs/Programs.ts +++ b/src/Programs/Programs.ts @@ -3,7 +3,8 @@ import { programsMetadata } from "./data/ProgramsMetadata"; import { IMap } from "../types"; export const Programs: IMap = {}; - -for (const params of programsMetadata) { - Programs[params.key] = new Program(params.name, params.create, params.run); +export function initPrograms() { + for (const params of programsMetadata) { + Programs[params.key] = new Program(params.name, params.create, params.run); + } }