//public static string ascx_ScriptControl { get; set; } //[STAThread] private static void Main() { if (O2Messages.openAscxGui()) { KO2MessageQueue.getO2KernelQueue().onMessages += ascx_Scripts_onMessages; // O2 Debugger O2AscxGUI.openAscx(typeof(ascx_O2MdbgShell), O2DockState.DockBottom, ascx_O2MdbgShellName); //this needs to be opened before the ascx_Breakpoints // scripts controls //O2AscxGUI.openAscx(typeof(ascx_Scripts), O2DockState.Document, ascx_ScriptsName); // this needs to loaded before ascx_ScriptsFolder var scriptsFolder = (ascx_ScriptsFolder)O2AscxGUI.openAscx(typeof(ascx_ScriptsFolder), O2DockState.DockLeft, ascx_ScriptsFolderName); scriptsFolder.loadSampleScripts(); O2AscxGUI.openAscx(typeof(ascx_AssemblyInvoke), O2DockState.DockRight, ascx_AssemblyInvokeName); /*O2AscxGUI.openAscx(typeof(ascx_Breakpoints), O2DockState.DockRightAutoHide, ascx_BreakpointsName); * O2AscxGUI.openAscx(typeof(ascx_BreakpointCreator), O2DockState.DockRightAutoHide, ascx_BreakpointCreatorName); * O2AscxGUI.openAscx(typeof(ascx_Variables), O2DockState.DockRightAutoHide, ascx_CurrentFrameDetailsName); * O2AscxGUI.openAscx(typeof(ascx_FindingsCreator), O2DockState.DockRight, ascx_FindingsCreatorName);*/ O2AscxGUI.addControlToMenu(typeof(ascx_Breakpoints), O2DockState.DockRightAutoHide, ascx_BreakpointsName); O2AscxGUI.addControlToMenu(typeof(ascx_BreakpointCreator), O2DockState.DockRightAutoHide, ascx_BreakpointCreatorName); O2AscxGUI.addControlToMenu(typeof(ascx_Variables), O2DockState.DockRightAutoHide, ascx_CurrentFrameDetailsName); O2AscxGUI.addControlToMenu(typeof(ascx_FindingsCreator), O2DockState.DockRight, ascx_FindingsCreatorName); } }
public void buildGui() { // this will make files to be opened on the main Document window HandleO2MessageOnSD.setO2MessageFileEventListener(); if (O2AscxGUI.launch("O2 Tool - Search Engine")) // O2Messages.openGUI(); { var fileMappings = (FileMappings)O2AscxGUI.openAscx(typeof(FileMappings), O2DockState.DockLeft, "File Mappings"); //fileMappings.loadFilesFromFolder(DI.config.CurrentExecutableDirectory); // O2Messages.openControlInGUI(typeof (ascx_TextSearch), O2DockState.Document, "Text Search"); O2AscxGUI.openAscx(typeof(ascx_SearchTargets), O2DockState.DockRight, "Search Targets"); O2AscxGUI.openAscx(typeof(ascx_SearchResults), O2DockState.DockTop, "Search Results"); O2AscxGUI.addControlToMenu(typeof(ascx_FunctionsViewer), O2DockState.Document, "Signatures Viewer"); OunceAvailableEngines.addAvailableEnginesToControl(typeof(ascx_FindingsViewer)); //ascx_FindingsViewer.o2AssessmentLoadEngines.Add(new O2AssessmentLoad_OunceV6()); O2AscxGUI.addControlToMenu(typeof(ascx_FindingsViewer), O2DockState.Document, "Findings Viewer"); O2AscxGUI.addControlToMenu(typeof(SourceCodeEditor), O2DockState.Document, "Source Code Editor"); /* O2AscxGUI.addControlToMenu(typeof (ascx_TilesDefinition_xml)); * O2AscxGUI.addControlToMenu(typeof(ascx_J2EE_web_xml)); * O2AscxGUI.addControlToMenu(typeof (ascx_Validation_xml)); * O2AscxGUI.addControlToMenu(typeof (ascx_Struts_config_xml)); * O2AscxGUI.addControlToMenu(typeof (ascx_StrutsMappings_ManualMapping)); * O2AscxGUI.addControlToMenu(typeof (ascx_DotNet_Dependencies)); * * * O2AscxGUI.addControlToMenu(typeof(ascx_O2Rules_Struts),O2DockState.Document, "O2 Rules Struts"); */ } }
static void Main() { // XRules_Config.PathTo_XRulesDatabase_fromLocalDisk = DI.PathToLocalUnitTestsFiles; // O2AscxGUI.openAscxAsForm(typeof(ascx_PatchAndMonitor)); // return; if (O2AscxGUI.launch("O2 Scanner - DotNet (Dynamic tracing and patching)")) { O2AscxGUI.addControlToMenu(typeof(ascx_DotNetGac)); O2AscxGUI.addControlToMenu(typeof(ascx_XRules_Editor), O2DockState.Document, "XRules Editor"); O2AscxGUI.addControlToMenu(typeof(ascx_XRules_Execution), O2DockState.Document, "XRules Execution"); //var unitTestExecution = "UnitTestExecution"; //var patchandmonitor = "PatchAndMonitor"; var xRulesEditor = "XRules Editor"; //O2AscxGUI.openAscx(typeof(ascx_XRules_UnitTestExecution_BigGUI), O2DockState.DockRight, unitTestExecution); //O2AscxGUI.openAscx(typeof(ascx_PatchAndMonitor), O2DockState.Document, patchandmonitor); O2AscxGUI.openAscx(typeof(ascx_XRules_Editor), O2DockState.Document, xRulesEditor); O2AscxGUI.openAscx(typeof(ascx_XRules_UnitTests), O2DockState.DockRight, "XRules_UnitTests"); O2AscxGUI.openAscx(typeof(ascx_AssemblyInvoke), O2DockState.DockRight, "Invoke Assesmblies"); //O2DockUtils.setDocState(unitTestExecution,patchandmonitor, DockStyle.Left); //O2DockUtils.setDocState(unitTestExecution, xRulesEditor, DockStyle.Left); } }
static void Main(string[] args) { OunceAvailableEngines.addAvailableEnginesToControl(typeof(ascx_FindingsViewer)); if (O2AscxGUI.launch("O2 Scripts")) { var scriptsFolder = (ascx_ScriptsFolder)O2AscxGUI.openAscx(typeof(ascx_ScriptsFolder), O2DockState.DockLeft, "Sample Scripts"); scriptsFolder.loadSampleScripts(new ScriptSamples(), true); var sourceCodeEditor = (ascx_SourceCodeEditor)O2AscxGUI.openAscx(typeof(ascx_SourceCodeEditor), O2DockState.Document, "Script Editor"); sourceCodeEditor.loadSampleScripts(); /* O2AscxGUI.addControlToMenu("O2 Object Model", () => * { * var cirDataViewer = (ascx_CirDataViewer)O2AscxGUI.openAscx(typeof(ascx_CirDataViewer), O2DockState.DockRight, "O2 Object Model"); * cirDataViewer.loadO2ObjectModel(); * //DI.log.info("code executed") * }); */ // O2AscxGUI.addControlToMenu(typeof(ascx_FunctionsViewer), O2DockState.Document, "Functions Viewer"); // preloaded menu items O2AscxGUI.addControlToMenu(typeof(ascx_FileMappings), O2DockState.Document, "File Mappings"); O2AscxGUI.addControlToMenu(typeof(ascx_FindingsViewer), O2DockState.Document, "Findings Viewer"); HandleO2MessageOnSD.setO2MessageFileEventListener(); // set this up so that we can open files from the Findings Viewer } }
static void Main() { const string staticViewerControlName = "Findings Viewer"; // this will make files to be opened on the main Document window HandleO2MessageOnSD.setO2MessageFileEventListener(staticViewerControlName); // add load and save engines for Ounce Ozasmt file formats OunceAvailableEngines.addAvailableEnginesToControl(typeof(ascx_FindingsViewer)); if (O2AscxGUI.launch("Rules Manager", 1000, 800)) { O2AscxGUI.openAscx(typeof(ascx_Scan), O2DockState.DockLeft, "Scan"); O2AscxGUI.openAscx(typeof(ascx_FindingsViewer), O2DockState.DockLeft, staticViewerControlName); O2DockUtils.setDocState("Scan", staticViewerControlName, DockStyle.Bottom); O2AscxGUI.openAscx(typeof(ascx_CirDataViewer), O2DockState.DockRight, "Cir Data Viewer"); O2AscxGUI.openAscx(typeof(ascx_RulePackViewer), O2DockState.DockTop, "Rule Pack Viewer"); O2DockUtils.setPaneHeight("Rule Pack Viewer", 500); O2AscxGUI.addControlToMenu(typeof(ascx_FindingsFilterDevGui), O2DockState.Document, "Fidings Filter"); O2AscxGUI.addControlToMenu(typeof(ascx_SourceCodeEditor), O2DockState.Document, "Source Code Editor"); O2AscxGUI.addControlToMenu(typeof(ascx_FunctionsViewer), O2DockState.Document, "Functions Signatures"); O2AscxGUI.addControlToMenu(typeof(ascx_ApplyRulesToFindings), O2DockState.Document, "O2 'Call-Flow Scanner' (Apply Rules To Findings)"); O2AscxGUI.openAscx(typeof(ascx_XRules_Editor), O2DockState.Document, "O2 XRules Editor"); } }
static void Main(string[] args) { // load python execution engines IKVMEngine.addCurrentIKVMEnginesTo_ascx_SourceCodeEditor(); ExternalEngines.addCurrentPythonEnginesTo_ascx_SourceCodeEditor(); if (O2AscxGUI.launch("O2 Tool - Python")) { O2AscxGUI.openAscx(typeof(ascx_PythonCmdShell), O2DockState.Document, "Python Shell"); //DI.reflection.loadAssembly(); O2AscxGUI.addControlToMenu(typeof(ascx_Scripts), O2DockState.Document, "O2 Scripts"); O2AscxGUI.addControlToMenu(typeof(ascx_SourceCodeEditor), O2DockState.Document, "Source Code Editor");; //O2AscxGUI.openAscx(DI.reflection.getType("O2_External_SharpDevelop.dll", "ascx_Scripts")); } }
private static void Main() { //HandleO2MessageOnSD.setO2MessageFileEventListener(); ascx_FindingsViewer.o2AssessmentLoadEngines.Add(new O2AssessmentLoad_OunceV6()); ascx_FindingsViewer.o2AssessmentSave = new O2AssessmentSave_OunceV6(); if (O2AscxGUI.launch("O2 Scanner - MsCatNet")) { O2AscxGUI.addDefaultControlsToMenu(); O2AscxGUI.openAscx(typeof(ascx_MsCatNet), O2DockState.Document, "O2 Scanner - MsCatNet"); //O2AscxGUI.openAscx(typeof(ascx_XRules_Editor), O2DockState.Document, "XRules - Editor"); O2AscxGUI.addControlToMenu(typeof(ascx_FindingsViewer), O2DockState.DockBottomAutoHide, "O2 Findings Viewer"); //O2AscxGUI.openAscx(typeof(ascx_XRules_UnitTests), O2DockState.DockRight, "XRules - Unit Tests"); } }
static void Main() { if (false) // to force linking to the O2_Cmd_XRules module { XRulesWrapper.help(); } OunceAvailableEngines.addAvailableEnginesToControl(typeof(ascx_FindingsViewer)); XRules_Config.xRulesDatabase = new KXRulesDatabase(); if (O2AscxGUI.launch("O2 XRules", 1000, 800)) { HandleO2MessageOnMdbg.setO2MessageMdbgListener(); // be able to handle Debugger events HandleO2MessageOnSD.setO2MessageFileEventListener(); // be able to handle open file events //O2AscxGUI.addControlToMenu("Simple Script Editor", () => open.script()); O2AscxGUI.addControlToMenu(typeof(ascx_TilesDefinition_xml)); O2AscxGUI.addControlToMenu(typeof(ascx_J2EE_web_xml)); O2AscxGUI.addControlToMenu(typeof(ascx_Validation_xml)); O2AscxGUI.addControlToMenu(typeof(ascx_Struts_config_xml)); O2AscxGUI.addControlToMenu(typeof(ascx_StrutsMappings_ManualMapping)); O2AscxGUI.addControlToMenu(typeof(ascx_FindingsViewer)); O2AscxGUI.addControlToMenu(typeof(ascx_CirDataViewer)); //O2AscxGUI.addControlToMenu(typeof(ascx_DotNet_Dependencies)); //O2AscxGUI.openAscx(typeof(ascx_XRules_Editor)); //O2AscxGUI.openAscx(typeof(ascx_XRules_Execution)); //O2AscxGUI.addControlToMenu(typeof(ascx_SvnBrowser), O2DockState.Float, "SVN Browser - O2 Source Code"); O2AscxGUI.addControlToMenu(typeof(ascx_O2Rules_Struts), O2DockState.Document, "O2 Rules Struts"); O2AscxGUI.addControlToMenu(typeof(ascx_XRules_Execution), O2DockState.Document, "XRules Execution"); O2AscxGUI.openAscx(typeof(ascx_XRules_Editor), O2DockState.Document, "XRules Editor"); O2AscxGUI.addControlToMenu(typeof(ascx_XRules_UnitTests), O2DockState.DockRight, "XRules & UnitTests"); O2AscxGUI.addControlToMenu(typeof(ascx_AssemblyInvoke), O2DockState.DockRight, "Invoke Assemblies"); O2AscxGUI.addControlToMenu(typeof(ascx_O2MdbgShell), O2DockState.DockBottom, "O2 Debugger"); O2AscxGUI.addControlToMenu(typeof(ascx_Variables), O2DockState.DockBottom, "O2 Mdbg - Variables"); O2AscxGUI.addControlToMenu(typeof(ascx_FindingsCreator), O2DockState.DockBottom, "O2 Mdbg - FindingsCreator"); O2AscxGUI.addControlToMenu(typeof(ascx_Breakpoints), O2DockState.DockBottom, "O2 Mdbg - Breakpoints"); O2AscxGUI.addControlToMenu(typeof(ascx_StackTraceAndThreads), O2DockState.DockBottom, "O2 Mdbg - StackTrace and Threads.."); } }
private static void Main() { ascx_FindingsViewer.o2AssessmentLoadEngines.Add(new O2AssessmentLoad_OunceV6()); ascx_FindingsViewer.o2AssessmentLoadEngines.Add(new O2AssessmentLoad_OunceV6_1()); ascx_FindingsViewer.o2AssessmentSave = new O2AssessmentSave_OunceV6(); if (O2AscxGUI.launch("O2 Tool - Join Traces")) { /*O2AscxGUI.openAscx(typeof(ascx_JoinSinksToSources), O2DockState.Document, "Join Sinks to sources (simple mode)"); * O2AscxGUI.openAscx(typeof(ascx_JoinTraces), O2DockState.Document, "Original Join Traces"); * O2AscxGUI.openAscx(typeof(ascx_JoinDotNetWebServices), O2DockState.Document, "Join Traces (with .Net WebServices support)"); * */ O2AscxGUI.addControlToMenu(typeof(ascx_JoinSinksToSources), O2DockState.Document, "Join Sinks to sources (simple mode)"); O2AscxGUI.addControlToMenu(typeof(ascx_JoinTraces), O2DockState.Document, "Original Join Traces"); O2AscxGUI.addControlToMenu(typeof(ascx_JoinDotNetWebServices), O2DockState.Document, "Join Traces (with .Net WebServices support)"); O2AscxGUI.openAscx(typeof(ascx_JoinTracesOnInterfaces), O2DockState.Document, "Join Traces On Interfaces"); } }
/* public static void openScriptEditor() * { * * * }*/ public static void gui() { O2Cmd.log.write("Opening up GUI"); O2Thread.mtaThread( () => { OunceAvailableEngines.addAvailableEnginesToControl(typeof(ascx_FindingsViewer)); if (O2AscxGUI.launch("O2 Spring MVC")) { HandleO2MessageOnSD.setO2MessageFileEventListener(); //O2AscxGUI.addControlToMenu(typeof (ascx_SpringMvcAnalyzer), O2DockState.Document, // "Experimental - Spring MVC Analyzer"); O2AscxGUI.addControlToMenu(typeof(ascx_PythonCmdShell), O2DockState.Document, "Experimental - Python Cmd Shell"); O2AscxGUI.addControlToMenu(typeof(ascx_Scripts)); O2AscxGUI.openAscx(typeof(ascx_CirDataViewer), O2DockState.DockRight, "Cir Viewer"); O2AscxGUI.openAscx(typeof(ascx_ExploitSpringMvc), O2DockState.Document, "Exploit Spring MVC"); O2AscxGUI.openAscx(typeof(ascx_CreateSpringMvcMappings), O2DockState.Document, "Create Spring MVC Mappings"); //O2AscxGUI.openAscx(typeof(ascx_JoinControllersWithFindings),O2DockState.DockRight, "Cir Viewer"); O2AscxGUI.addControlToMenu(typeof(ascx_FindingsViewer)); //O2AscxGUI.addControlToMenu(typeof(ascx_SourceCodeEditor)); //openFindingsViewerAndSourceCodeEditor(); // enable opening findings file references /*KO2MessageQueue.getO2KernelQueue().onMessages += o2Message => HandleO2MessageOnSD. * o2MessageHelper_Handle_IM_FileOrFolderSelected * (o2Message, * null);*/ } }); O2AscxGUI.waitForAscxGuiClose(); }
/// <summary> /// The main entry point for the application. /// </summary> //[STAThread] private static void Main() { // this will make files to be opened on the main Document window HandleO2MessageOnSD.setO2MessageFileEventListener(); if (O2AscxGUI.launch("O2 Tool - Search Engine")) // O2Messages.openGUI(); { var fileMappings = (ascx_FileMappings)O2AscxGUI.openAscx(typeof(ascx_FileMappings), O2DockState.DockLeft, "File Mappings"); //fileMappings.loadFilesFromFolder(DI.config.CurrentExecutableDirectory); // O2Messages.openControlInGUI(typeof (ascx_TextSearch), O2DockState.Document, "Text Search"); O2AscxGUI.openAscx(typeof(ascx_SearchTargets), O2DockState.DockRight, "Search Targets"); O2AscxGUI.openAscx(typeof(ascx_SearchResults), O2DockState.DockTop, "Search Results"); O2AscxGUI.addControlToMenu(typeof(ascx_FunctionsViewer), O2DockState.Document, "Signatures Viewer"); OunceAvailableEngines.addAvailableEnginesToControl(typeof(ascx_FindingsViewer)); //ascx_FindingsViewer.o2AssessmentLoadEngines.Add(new O2AssessmentLoad_OunceV6()); O2AscxGUI.addControlToMenu(typeof(ascx_FindingsViewer), O2DockState.Document, "Findings Viewer"); O2AscxGUI.addControlToMenu(typeof(ascx_SourceCodeEditor), O2DockState.Document, "Source Code Editor"); O2AscxGUI.addControlToMenu(typeof(ascx_TilesDefinition_xml)); O2AscxGUI.addControlToMenu(typeof(ascx_J2EE_web_xml)); O2AscxGUI.addControlToMenu(typeof(ascx_Validation_xml)); O2AscxGUI.addControlToMenu(typeof(ascx_Struts_config_xml)); O2AscxGUI.addControlToMenu(typeof(ascx_StrutsMappings_ManualMapping)); O2AscxGUI.addControlToMenu(typeof(ascx_DotNet_Dependencies)); O2AscxGUI.addControlToMenu(typeof(ascx_O2Rules_Struts), O2DockState.Document, "O2 Rules Struts"); } /*var o2Message = new KO2GenericMessage("Text Search") {messageType = O2MessageType.AddControlToGUI}; * o2Message.messageData.Add(typeof(ascx_TextSearch)); * o2Message.messageData.Add(O2DockState.Document); * * * DI.o2MessageQueue.sendMessage(o2Message); * * DI.o2MessageQueue.sendMessage(new KO2GenericMessage("Search Criteria", O2MessageType.AddControlToGUI, * new List<object> * {typeof (ascx_SearchCriteria), O2DockState.DockLeft}));*/ /*DI.windowsForms.openAscx(typeof(ascx_TextSearch),O2DockState.Document,"Text Search"); * DI.windowsForms.openAscx(typeof(ascx.ascx_SearchCriteria), O2DockState.DockLeft,"Search Criteria"); * DI.windowsForms.openAscx(typeof(ascx.ascx_SearchTargets), O2DockState.DockLeft, "Search Targets"); * DI.windowsForms.openAscx(typeof(ascx.ascx_SearchResults), O2DockState.Document,"Search Results"); * DI.windowsForms.openAscx(typeof(ascx_TextSearch), O2DockState.Document, "Text Search"); * DI.windowsForms.WaitForGuiClose();*/ //Application.EnableVisualStyles(); //Application.SetCompatibleTextRenderingDefault(false); /*String sFormTitle = core.Exec.getFormTitle_forClickOnce("Text Search"); * Exec.execControl(sFormTitle, typeof (ascx_TextSearch));*/ /* DI.log = new WinFormsUILog(); * * * if (DI.config.setDI("O2_Views_ASCX.dll", "O2.Views.ASCX.DI", "windowsForms", new WindowsFormsImpl()) && * DI.config.setDI("O2_Views_ASCX.dll", "O2.Views.ASCX.DI", "log", new WinFormsUILog())) * { * //Views.ASCX.DI.assemblyAnalysis = new WindowsFormsImpl(); * var logViewer = new O2DockContent(typeof (ascx_LogViewer)); * var textSearch = new O2DockContent(typeof (ascx_TextSearch)); * * new O2DockPanel(new List<O2DockContent> {logViewer, textSearch}); * } * else * DI.log.reportCriticalErrorToO2Developers(null, null, "in Main, there was a problem setting 'windowsForms' DI"); * */ }