public void PromptParameters() { PrompIndex: string r = UI.Prompt("What you want to print? \n \t \t Enter [bflg] to BruteForce List OR [csa] to Assemble multiple pipes into a Complex String Assembler ").Trim().ToLower(); switch (r) { case "csa": case "c": CSA c = UI.Lab?.Request <CSA>(); if (c == null) { c = new(UI); c.PromptParameters(); } Pipe = c; break; case "bflg": case "b": BFLG b = UI.Lab?.Request <BFLG>(); if (b == null) { b = new(UI); b.PromptParameters(); } Pipe = b; break; default: goto PrompIndex; } }
private void RunBFLG() { BFLG bfgl = new BFLG(UI) { UseFile = UI.Prompt("Write results to [C]onsole window or to a [f]ile").ToUpper() == "F" }; bfgl.PromptParameters(); bfgl.BuildFromParameters(); if (bfgl.UseFile) { bfgl.GenerateToFile(); } else { foreach (string key in bfgl.GenerateEnumerable()) { UI.Log(key); } } }
public void PromptParameters() { UI.Log(""); UI.Log(" . . . . . . . . . . . . . . . . . "); UI.Log(" Methane "); UI.Log(" Complex String Assembler "); UI.Log(" . . . . . . . . . . . . . . . . . "); UI.Log(""); UI.Log("There are 3 pipeline types to use as substitutions Brute-Force, Dictionary file, Incremental Integers. You can add multiple pipelines from any type"); mask = UI.Prompt("Just press [Enter] to use these pipelines OR Enter the plain text to use"); UsePipes = string.IsNullOrEmpty(mask); if (UsePipes) { bflgs = null; if (UI.Prompt("Add Brute-Force pipelines? [y|N]").ToUpper() == "Y") { bflgs = new List <BFLG>(); SetupBFLG: try { UI.Log($"Creating BFLG *b{bflgs.Count}*"); BFLG bflg = UI.Lab?.Request <BFLG>(); if (bflg == null) { bflg = new(UI); bflg.PromptParameters(); } bflg.BuildFromParameters(); bflgs.Add(bflg); if (UI.Prompt("Add another BFLG? [y]|[N]").ToUpper() == "Y") { goto SetupBFLG; } } catch (Exception ex) { UI.LogError(ex); if (UI.Prompt("Try again? [y]|[N] ").ToUpper() == "Y") { goto SetupBFLG; } } UI.Log($"{bflgs.Count} Password pipelines standby"); } DicFiles = null; if (UI.Prompt("Add Dictionary pipelines? [y|N]").ToUpper() == "Y") { DicFiles = new List <FileLineReader>(); PromptFileName: UI.Log($"File feed *f{DicFiles.Count}*"); FileLineReader FLR = new FileLineReader(UI); FLR.PromptParameters(); DicFiles.Add(FLR); if (UI.Prompt("Add another Dictionary pipeline? [y]|[N]").ToUpper() == "Y") { goto PromptFileName; } UI.Log($"{DicFiles.Count} Files ready"); } IncrementalInts = null; if (UI.Prompt("Add Incremental 64bit Integer pipelines? [y|N]").ToUpper() == "Y") { IncrementalInts = new List <IncrementalIntGen>(); PromptStart: UI.Log($"Creating Incremental Int pipeline *i{IncrementalInts.Count}*"); IncrementalIntGen IIG = new IncrementalIntGen(UI); IIG.PromptParameters(); IncrementalInts.Add(IIG); if (UI.Prompt("Add another Incremental Int pipeline? [y]|[N]").ToUpper() == "Y") { goto PromptStart; } } mask = UI.Prompt("Enter Mask string. (Substitutions : *b0* for BFLG0, *f0* for File0 ...) (Ex: 'user=*f0*&pass=ABC*b0*XYZ*f1*' )"); } }