Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: acaa081edd
Fetching contributors…

Cannot retrieve contributors at this time

155 lines (125 sloc) 8.604 kB
<?xml version="1.0"?>
<H2>
<SourceCode>O2Setup.extractEmbededConfigZips();
"O2Logo.ico".local().icon().set_As_Default_Form_Icon();
var title = "OWASP O2 Platform v{0} : {1}".format(o2.version(), clr.details());
var topPanel = title.popupWindow(790,218);
Action&lt;string&gt; executeH2Script =
(script)=&gt; O2Thread.mtaThread( ()=&gt; script.executeFirstMethod());
//var topPanel = panel.fill(false).width(800).height(190).clear().add_Panel();
topPanel.parent().backColor(Color.White);
var logViewerPanel = topPanel.insert_Below(150);
topPanel.splitContainer().distance(80).fixedPanel1();
topPanel.visible(false);
topPanel.add_PictureBox().open("OWASP_O2_Platform.png".local()).fill(false).width(341).height(41).top(10)
.onDoubleClick(()=&gt; executeH2Script("Util - O2 Available scripts.h2"))
.onDrop((file)=&gt; executeH2Script(file));
var menuPanel = topPanel.insert_Right&lt;Panel&gt;(440);
var menu = topPanel.parentForm().add_Menu().white();
topPanel.visible(true);
var scriptMappings = new Items();
var o2Script = (Environment.Version.Major == 4)
? "Util - C# REPL Script [4.0].h2"
: "C# REPL Script Editor.h2";
var scripting_Mappings = new Items().add("O2 REPL C# Script",o2Script)
.add("C# REPL (WinFormUI)", "Util - O2 C# REPL using WinFormsUI.h2")
.add("C# REPL (Simple mode)", "C# REPL Script Editor.h2")
.add("C# REPL (Text Based)", "Util - Text Based C# REPL.h2")
.add("O2 Dev Environment", "Util - O2 Development Environment.h2")
.add("Browser REPL","Util - Browser REPL.h2")
.add("O2 Object Model", "Util - O2 Object Model.h2")
.add("IE Script","IE Automation (Simple mode).h2")
.add("Graph REPL","ascx_GraphWithInspector.cs.o2")
.add("IE Google", "IE_Google - Execution.h2")
.add("Write for NUnitGUI", "Util - Execute O2ified tests on NUnitGui.h2")
.add("Write Unit Tests", "Write and Execute Unit Tests.h2")
.add("SourceCode Editor", "Util - SourceCodeEditor.h2")
;
var o2tools_Mappings = new Items().add("Package O2 Script", "Util - Package O2 Script into separate Folder.h2")
.add("Screenshot tool", "Util - Show ScreenShot Tool.h2")
.add("Search Engine", "Search Engine Tool.h2")
.add("Windows Handles Viewer", "Util - Windows Handles Viewer (Simple GUI with REPL).h2")
.add("Search O2 Scripts", "Util - Quick File Search.h2")
.add("Execute Unit Tests", "Execute Unit Tests.h2")
.add("WSDL (Web Services)", "ascx_WSDL_Creation_and_Execution.cs.o2")
//.add("O2 Web Proxy", "Util - O2 Web Proxy (simple view).h2")
//.add("O2 Web Cache", "Tool - Cache from O2 Web Proxy.h2")
//.add("O2 WAF Simulator", "Util - O2 WAF Simulator (simple Gui).h2")
//.add("Movie Creator", "Util - Movie Creator.h2")
//.add("Find an O2 Script", "Util - O2 Available scripts.h2")
.add("Simple Text Edito","Util - Simple Text Editor.h2")
.add("Stop O2 Instances", "Uitl - Stop all (but current) O2_XRules_Database processes.h2");
var otherTools_Mapping = new Items().add("Process Explorer", "ProcessExplorer.cs")
.add("Process Monitor", "ProcessMonitor.cs")
.add("Open Ports via Netstat", "Util - Show Open Ports (via NetStat -afo).h2")
.add("Putty", "Putty.cs")
.add("ILSpy (like Reflector)", "ILSpy_Installer.cs")
//.add("LINQPad", "Util - Inject O2 into LinqPad.h2")
.add("LINQPad", "LinqPad.cs")
.add("MDbg - Managed Debugger", "Installer_Mdbg_Sample_4_0.cs")
.add("HawkEye - Hook WinForms", "Installer_HawkEye.cs")
.add("Snoop - Hook WPF", "Snoop.cs")
.add("FuzzDB on RegEx", "Util - Text RegEx using FuzzDb.h2")
.add("Amazon EC2 Browser", "Tool - Amazon EC2 Browser.h2")
.add("Amazon S3 Browser", "Amazon S3 Browser.h2")
.add("OpenPGP Tool", "Tool - Using OpenPgp to Encrypt or Decrypt.h2")
//.add("AppScan Standard + O2","Util - Launch AppScan Standard (O2 version).h2")
.add("EtherPad (IE Viewer)","Util - EtherPad (IE Viewer).h2")
.add("EtherPad (Text Viewer)","Util - EtherPad (Text Viewer).h2");
var o2Guis_Mappings = new Items().add("Security Consultants", "Security Consultants (Custom O2 version).h2")
.add("OWASP Projects &amp; Wiki", "OWASP Projects and Website (Custom O2).h2")
.add(".NET Static Analysis", "DotNet Static Analysis (Custom O2).h2")
.add("BlackBox", "BlackBox and Browser Automation (Custom O2).h2")
.add("SuperSecureBank", "_SSB - Custom O2.h2")
.add("HacmeBank", "HacmeBank - Vulnerable Web Application (Custom O2).h2");
var help_Mappings = new Items().add("O2 Documentation", "http://o2platform.com/wiki/Documentation")
.add("O2 Mailing list", "https://lists.owasp.org/mailman/listinfo/owasp-o2-platform")
.add("O2 Blog (tons of script samples", "http://o2platform.wordpress.com")
.add("O2 Website (at OWASP)", "http://owasp.org/index.php/O2");
menu.add_MenuItem("Main")
.add_MenuItem("Find an O2 Script", ()=&gt; executeH2Script("Util - O2 Available scripts.h2"));
menu.add_MenuItem("Debug")
.add_MenuItem("AppDomains in Current Process", ()=&gt; executeH2Script("Util - AppDomains in Current Process.h2"))
.add_MenuItem("Restart O2 (will kill current process)", ()=&gt; { Application.ExecutablePath.startProcess(); Processes.getCurrentProcess().stop();})
.add_MenuItem("View O2 Config Object", ()=&gt; PublicDI.config.showInfo())
.add_MenuItem("Compile All Scripts",()=&gt; executeH2Script("Compile All Local O2 Scripts.h2"))
.add_MenuItem("REPL this GUI",()=&gt; topPanel.parentForm().script_Me("form"))
.add_MenuItem("Edit this Gui's Script", ()=&gt; open.scriptEditor("Main O2 Gui.h2".local()))
.add_MenuItem("Folders",false)
.add_MenuItem("TempDir",()=&gt; PublicDI.config.O2TempDir.startProcess())
.add_MenuItem("References Downloaded",()=&gt; PublicDI.config.ReferencesDownloadLocation.startProcess())
.add_MenuItem("Embedded Assemblies",()=&gt; PublicDI.config.EmbeddedAssemblies.startProcess())
.add_MenuItem("Tools or APIs",()=&gt; PublicDI.config.ToolsOrApis.startProcess())
.add_MenuItem("of current Executable",()=&gt; PublicDI.config.CurrentExecutableDirectory.startProcess());
menu.add_MenuItem("Compilation Cache(s)")
.add_MenuItem("Clear LocalScript mappings" , ()=&gt; { CompileEngine.clearLocalScriptFileMappings();})
.add_MenuItem("Clear Compilation Cache" , ()=&gt; { CompileEngine.clearCompilationCache();})
.add_MenuItem("Clear Compilation Cache and Downloads" , ()=&gt; { CompileEngine.clearAllCompilationRelatedDownloadsAndCaches();})
.add_MenuItem("clear AssembliesCheckedIfExists list" , () =&gt; { O2GitHub.clear_AssembliesCheckedIfExists(); });
menu.add_MenuItem("Help")
.add_MenuItem("Report bug",()=&gt; ReportBug.showGui(topPanel))
.add_MenuItem("O2 Mailing list",()=&gt; "https://lists.owasp.org/mailman/listinfo/owasp-o2-platform".startProcess())
.add_MenuItem("Dinis Cruz Blog (Main O2 Dev", ()=&gt; "http://DinisCruz.blogger.com".startProcess())
.add_MenuItem("O2 Website (at OWASP)", ()=&gt; "http://owasp.org/index.php/O2".startProcess());
menuPanel.add_ExecutionComboBox("Write Script:",15,0,scripting_Mappings).dropDownHeight(300);
menuPanel.add_ExecutionComboBox("O2 Tools:",36,0,o2tools_Mappings).leftAdd(13).dropDownHeight(300);
menuPanel.add_Link("Find an O2 Script",57,69,()=&gt; executeH2Script("Util - O2 Available scripts.h2"));
menuPanel.add_ExecutionComboBox("Open O2 Gui for:",15,200, o2Guis_Mappings).leftAdd(-5).widthAdd(20).dropDownHeight(300);
menuPanel.add_ExecutionComboBox("3rd Party Tools:",36,200,otherTools_Mapping).widthAdd(20).dropDownHeight(300);
menuPanel.add_ExecutionComboBox("Need Help?",57,200, help_Mappings).leftAdd(20).widthAdd(20);
logViewerPanel.add_LogViewer().white();
return "done";
//using O2.Views.ASCX.Forms
//using O2.Kernel.CodeUtils
//O2Tag_DontAddExtraO2Files
//O2Embed:O2_FluentSharp_Roslyn.dll
//O2Embed:O2_External_IE.dll
//O2Embed:WatiN.Core.1x.dll
//O2Embed:Interop.SHDocVw.dll
//O2Embed:O2_Misc_Microsoft_MPL_Libs.dll
//_O2Package:OWASP_O2_Platform.png,O2Logo.ico
//_O2Package:Util - C# REPL Script [4.0].cs.o2, Util - O2 Development Environment.h2, Util - O2 Available scripts.h2
//_O2Package:Util - Browser REPL.h2
//O2Package:ALL_SCRIPTS</SourceCode>
<ReferencedAssemblies />
</H2>
Jump to Line
Something went wrong with that request. Please try again.