From 3ab23df8d71b048616d0dac62d77f85263bfbdc0 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Wed, 20 Jun 2018 18:34:39 -0400 Subject: [PATCH] terminal autocompletes darkweb better --- src/Terminal.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Terminal.js b/src/Terminal.js index 429a6e681..7c145c0fa 100644 --- a/src/Terminal.js +++ b/src/Terminal.js @@ -5,7 +5,8 @@ import {substituteAliases, printAliases, import {CONSTANTS} from "./Constants.js"; import {Programs} from "./CreateProgram.js"; import {executeDarkwebTerminalCommand, - checkIfConnectedToDarkweb} from "./DarkWeb.js"; + checkIfConnectedToDarkweb, + DarkWebItems} from "./DarkWeb.js"; import {Engine} from "./engine.js"; import {FconfSettings, parseFconfSettings, createFconf} from "./Fconf.js"; @@ -409,9 +410,12 @@ function determineAllPossibilitiesForTabCompletion(input, index=0) { } if (input.startsWith ("buy ")) { - return [Programs.BruteSSHProgram, Programs.FTPCrackProgram, Programs.RelaySMTPProgram, - Programs.HTTPWormProgram, Programs.SQLInjectProgram, Programs.DeepscanV1, - Programs.DeepscanV2].concat(Object.keys(GlobalAliases)); + let options = []; + for(const i in DarkWebItems) { + const item = DarkWebItems[i] + options.push(item.program); + } + return options.concat(Object.keys(GlobalAliases)); } if (input.startsWith("scp ") && index == 1) {