OWASP O2 Platform Blog

Example of Custom O2 focused on a security consultant’s need

In sequence to the  Creating custom O2 Versions post, here is an example of a Custom O2 that is focused on a particular Security Consultant’s needs (in this case Matt Parsons which was doing some analysis using IBM’s AppScan Source Edition 7.x (previously known as Ounce 6.x))

 Screenshots of Gui:

Source code:

var title = "Matt Parsons";  
var currentScript = PublicDI.CurrentScript;  
  
var ribbon = CustomO2.create(title, 1024,300);   // stand alone version   
//var ribbon = CustomO2.create(panel.clear().add_Panel(),title);   // use when inside 'Quick Development GUI'
 
var appScanSource7Tab = ribbon.add_Tab("IBM AppScan Source 7.x");
var appScanSource6Tab = ribbon.add_Tab("IBM AppScan Source 6.x");
appScanSource7Tab.add_Group("Findings Viewer")
      .add_Script("7.x Findings Viewer", "Tool - Findings Viewer - IBM AppScan Source 7.0.h2");

appScanSource7Tab.add_Group("Support Files")
   .add_RibbonButton_ShowCodeFile("Schema File of *.ozasmt","xsd_Ozasmt_OunceV7_0.xsd".local())
   .add_RibbonButton_ShowCodeFile("CSharp file of Schema File","xsd_Ozasmt_OunceV7_0.cs".local());

appScanSource6Tab.add_Group("Findings Viewer(s)")
    .add_Script("6.x Findings Viewer (with code viewer)", "Util - Simple Findings Viewer (with code viewer).h2")
    .add_Script("6.x Findings Viewer (just viewer/editor)", "Util - Simple Findings Viewer.h2")
    .add_Script("6.x Findings Viewer (indexed by Source-Code viewer)", "Util - Findings Viewer (filtered by SourceCode).h2")
    .add_Script("6.x and others Findings Viewer (separate GUI)", "Findings Viewer.h2");    
  
var o2Scripting = ribbon.add_Tab("O2 Scripting");
o2Scripting.add_Group_developmentGuis();
ribbon.add_Tab_MiscTools();
o2Scripting.add_RibbonGroup("Custom O2")
      .add_RibbonButton("Edit this Custom O2 Script",
      () => O2Gui.open<Panel>("Custom O2",800,400)
           .add_SourceCodeEditor()
           .open(currentScript));   

ribbon.add_Tab_BrowserAutomation();

return "done";

//O2File:WPF_Ribbon_ExtensionMethods.cs
//O2File:CustomO2.cs 

//O2Ref:WindowsFormsIntegration.dll
//O2Ref:RibbonControlsLibrary.dll

November 2, 2010 - Posted by | O2 Internals

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: