[Owasp-o2-platform] Running O2 REPL Script environment inside Visual Studio 2010

Dinis Cruz dinis at ddplus.net
Sat Mar 24 01:01:30 UTC 2012


For the VisualStudio 2010 users, here is how to setup the VisualStudio 2010
AddIn that is included with the latest version of
O2<http://diniscruz.blogspot.co.uk/2012/03/installer-for-o2-platform-v40-first.html>
and
same examples on how to use it.

In the folder you installed O2, if you go to the *
O2.Platform.Projects/binaries* folder, you should find a file called *
O2_Platform_VisualStudio_AddIn.AddIn*
*
*
[image: Inline image 1]

That is the O2 Visual Studio 2010 AddIn, and the easiest way to load it up
in VisualStudio is to add this folder into the path VisualStudio 2010 will
look for Addins.

To get there:

   - open *VisualStudio 2010, *
   - go the menu *Tools -> Options,  *
   - in the popup window, go to* Environment ->Add-in/Macros Securty*
   - Click *Add*
   - Enter the path

It should look something like this:

[image: Inline image 2]

Then open the Add-In manager (from the menu *Options-> Add-In manager...*)

[image: Inline image 3]

Tick the 'O2_Platform_VisualStudio_AddIn' box (if it is not there you might
need to reboot it) and Click OK:

After that, if all goes according to plan :) ,  you should see a MessageBox
that looks like this:

[image: Inline image 4]

Followed by an *O2 Log Viewer* WinForm and the addition of an *O2
Platform*menu item to Visual Studio

[image: Inline image 5]


If you open the Menu Item you should see these 3 options:


[image: Inline image 6]

Which look like this when opened:

[image: Inline image 7]


What is very cool is that these are WinForm Controls running inside an (non
WinForm) Visual Studio Window. Which means that we can place these anywhere
in visualStudio GUI:


[image: Inline image 9]

And now that we are inside VisualStudio, we can script VisualStudio from
inside VisualStudio :)

For example, this is how to add a new top level menu:

[image: Inline image 10]

How you open an empty WinForm's Panel:

[image: Inline image 11]

And finally, here is how you add/consume an existing O2 WinForm Control.
For example the *ascx_Search_AST *from the* O2 .NET Static Analysis *engine
(in this case we will first load up a C# file and then browse its AST)

[image: Inline image 12]


Let me know if you have any issues running it.

Dinis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.owasp.org/pipermail/owasp-o2-platform/attachments/20120324/19c98e48/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3_24_2012_12_23_11_AM[1].jpg
Type: image/jpeg
Size: 28153 bytes
Desc: not available
URL: <http://lists.owasp.org/pipermail/owasp-o2-platform/attachments/20120324/19c98e48/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CropperCapture[1].jpg
Type: image/jpeg
Size: 89416 bytes
Desc: not available
URL: <http://lists.owasp.org/pipermail/owasp-o2-platform/attachments/20120324/19c98e48/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CropperCapture[2].jpg
Type: image/jpeg
Size: 127440 bytes
Desc: not available
URL: <http://lists.owasp.org/pipermail/owasp-o2-platform/attachments/20120324/19c98e48/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3_24_2012_12_34_56_AM[1].jpg
Type: image/jpeg
Size: 190371 bytes
Desc: not available
URL: <http://lists.owasp.org/pipermail/owasp-o2-platform/attachments/20120324/19c98e48/attachment-0007.jpg>


More information about the Owasp-o2-platform mailing list