示例#1
0
        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
            }
        }
示例#2
0
        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()
        {
            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");
            }
        }
示例#4
0
 static void Main()
 {
     if (O2AscxGUI.launch("Cir Viewer"))
     {
         HandleO2MessageOnSD.setO2MessageFileEventListener();
         O2AscxGUI.openAscx(typeof(ascx_CirDataViewer), O2DockState.DockLeft, "Cir Viewer");
     }
 }
        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..");
            }
        }
示例#7
0
        /*  public static void openScriptEditor()
         * {
         *
         *
         * }*/

        public static void gui()
        {
            O2Thread.mtaThread(
                () =>
            {
                if (O2AscxGUI.launch("Findings Filter GUI"))
                {
                    openFindingsViewerAndSourceCodeEditor();
                    // enable opening findings file references
                    HandleO2MessageOnSD.setO2MessageFileEventListener();

                    /*KO2MessageQueue.getO2KernelQueue().onMessages += o2Message => HandleO2MessageOnSD.
                     *                                                                o2MessageHelper_Handle_IM_FileOrFolderSelected
                     *                                                                (o2Message,
                     *                                                                 null);*/
                }
            });
        }
示例#8
0
        /*  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]
        static void Main()
        {
            // load python execution engines
            IKVMEngine.addCurrentIKVMEnginesTo_ascx_SourceCodeEditor();

            // make setO2MessageFileEventListener
            HandleO2MessageOnSD.setO2MessageFileEventListener();

            if (O2AscxGUI.launch("O2 Tool - Java Execution"))
            {
                //O2AscxGUI.openAscx(typeof (ascx_JavaExecution));
                //O2AscxGUI.openAscx(DI.reflection.getType("O2_External_SharpDevelop.dll", "ascx_Scripts"));

                var scriptsFolder = (ascx_ScriptsFolder)O2AscxGUI.openAscx(typeof(ascx_ScriptsFolder), O2DockState.DockLeft, "scripts folder");
                scriptsFolder.loadSampleScripts(typeof(JavaSamples).ctor(), true);

                O2AscxGUI.openAscx(typeof(ascx_JavaExecution));
            }
        }
示例#10
0
        /// <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");
             * */
        }