Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Multiple updates

  • Loading branch information...
commit 991654e06293c1438e68044607c0c78c07e2e0b6 1 parent 3255cb8
@DinisCruz DinisCruz authored
Showing with 912 additions and 36 deletions.
  1. +8 −5 3rdParty/Chrome/API_Chrome_Hijack.cs
  2. +2 −2 3rdParty/Chrome/Util - Chrome Browser with REPL.h2
  3. +3 −3 3rdParty/EasyHook/EasyHook_Installer.cs
  4. +0 −1  3rdParty/JAD/Util - Java Decompiler (JAD based).h2
  5. +5 −0 3rdParty/NuGet/PoC - download all raw Package info.h2
  6. +1 −1  3rdParty/Selenium/Selenium_Installer.cs
  7. +91 −0 3rdParty/TeamMentor/PoC - View TeamMentor Article (using GUID.h2
  8. +395 −0 3rdParty/_Installers/Doxygen_Installer.cs
  9. +33 −0 3rdParty/_Installers/Grails_Tool_Suite_Installer.cs
  10. +64 −0 3rdParty/_Installers/Groovy_Installer.cs
  11. +33 −0 3rdParty/_Installers/ReactOS_Installer.cs
  12. +36 −0 3rdParty/_Installers/Sandcastle_Installer.cs
  13. +34 −3 3rdParty/_Installers/Tool_API.cs
  14. +19 −0 APIs/Groovy/API_Groovy.cs
  15. +10 −0 APIs/Groovy/Util - Groovy - Start Native Console UI.h2
  16. +28 −0 APIs/Groovy/Util - Simple Groovy Shell.h2
  17. +9 −7 APIs/IKVM/API_IKVM.cs
  18. +31 −11 APIs/IKVM/API_IKVMC.cs
  19. +1 −1  APIs/MediaWiki/MediaWiki_GuiControls/ascx_MediaWiki_ConfigAndLogin.cs
  20. +24 −0 APIs/Windows/Win32_DLL_Imports/API_WinAPI_ExtensionMethods.cs
  21. +84 −1 Utils/ExtensionMethods/_Extra_methods_To_Add_to_Main_CodeBase.cs
  22. +1 −1  _Sample_Vulns/XmlSerialization/XmlDecode/Util - XmlDecode in memory using IKVM.h2
View
13 3rdParty/Chrome/API_Chrome_Hijack.cs
@@ -57,12 +57,15 @@ public API_Chrome_Hijack open_ChromeDriver()
ChromeDriver = new ChromeDriver(ChromeDriverService, ChromeOptions);
//resolve driverServiceProcess
- var fieldInfo = (FieldInfo)typeof(DriverService).field("driverServiceProcess");
- ChromeDriverProcess = (Process)fieldInfo.GetValue(ChromeDriverService);
+ //var fieldInfo = (FieldInfo)typeof(DriverService).field("driverServiceProcess");
+ var fieldInfo = typeof(DriverService).fieldInfo("driverServiceProcess");
+ if (fieldInfo.notNull())
+ {
+ ChromeDriverProcess = (Process)fieldInfo.GetValue(ChromeDriverService);
- ChromeDriverProcess.waitFor_MainWindowHandle();
- ChromeProcess = ChromeDriverProcess.getProcessWithParentHandle();
-
+ ChromeDriverProcess.waitFor_MainWindowHandle();
+ ChromeProcess = ChromeDriverProcess.getProcessWithParentHandle();
+ }
return this;
}
View
4 3rdParty/Chrome/Util - Chrome Browser with REPL.h2
@@ -1,6 +1,6 @@
//var topPanel = panel.clear().add_Panel();
var topPanel = "Util - Chrome with REPL".popupWindow(1200,600);
-
+
var replPanel = topPanel.add_GroupBox("C# Repl").add_Panel();
var chromeHijack = new API_Chrome_Hijack().open_ChromeDriver()
@@ -14,7 +14,7 @@ chromeDriver.FindElement(By.Name(""q""))
chromeDriver.FindElement(By.Name(""btnG""))
.Click();
return ""done"";
-
+//using O2.XRules.Database.APIs
//using OpenQA.Selenium;
//O2Ref:WebDriver.dll
//O2File:API_ChromeDriver.cs";
View
6 3rdParty/EasyHook/EasyHook_Installer.cs
@@ -18,9 +18,9 @@ public class EasyHook_Installer : Tool_API
public EasyHook_Installer()
{
config("EasyHook",
- "EasyHook 2.6 Binaries.zip",
- "http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=easyhook&DownloadId=61309&FileTime=128810691555630000&Build=19727".uri(),
- "README.txt");
+ "EasyHook-2.7.4761.0-Binaries.zip",
+ "http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=easyhook&DownloadId=371803&FileTime=130025275074470000&Build=20748".uri(),
+ "NetFX4.0\\README.txt");
installFromZip_Web();
}
View
1  3rdParty/JAD/Util - Java Decompiler (JAD based).h2
@@ -34,7 +34,6 @@ files.afterSelect<string>(
});
files.onDrop(extractClassesFromJar);
-//using O2.XRules.Database.APIs
//O2File:API_Jad.cs
//O2EmbedTool:Jad
View
5 3rdParty/NuGet/PoC - download all raw Package info.h2
@@ -5,6 +5,9 @@ var urlTemplate = "https://nuget.org/api/v2/Search()?$filter=IsLatestVersion&$or
var start = DateTime.Now;
var top = 30;
var skip = 0;
+
+targetDir.startProcess();
+
while(skip < 20000)
{
var url = urlTemplate.format(skip, top);
@@ -19,4 +22,6 @@ while(skip < 20000)
}
skip+= top;
}
+
+
return start.duration_To_Now();
View
2  3rdParty/Selenium/Selenium_Installer.cs
@@ -18,7 +18,7 @@ public Selenium_Installer()
{
config("Selenium",
"http://selenium.googlecode.com/files/selenium-dotnet-2.33.0.zip".uri(),
- @"Selenium\WebDriver.dll");
+ @"Selenium\net40\WebDriver.dll");
installFromZip_Web();
}
View
91 3rdParty/TeamMentor/PoC - View TeamMentor Article (using GUID.h2
@@ -0,0 +1,91 @@
+//var topPanel = "{name}".popupWindow(700,400);
+Web.Https.ignoreServerSslErrors(); // in case we have fiddler on
+
+//var topPanel = panel.clear().add_Panel(); // use when in developent
+var topPanel = "PoC - View TeamMentor Article (using GUID)".popupWindow(1200,500); // use when done
+
+Func<string,string,string,string> getArticle =
+ (contentType, articleId, sessionId)
+ =>{
+ var tmArticleUrl = "https://teammentor.net/{0}/{1}"; // REST GET call for content
+ return tmArticleUrl.format(contentType,articleId) // set contentType and session
+ .GET("Session=" + sessionId); // make GET request with provided cookie value
+ };
+
+Func<string,string> wrapCss =
+ (bodyContent) =>{
+ return @"<html>
+ <head>
+ <link href='http://getbootstrap.com/dist/css/bootstrap.css' rel='stylesheet'>
+ </head>
+ <body>
+ {0}
+ </body>
+ </html>".format(bodyContent);
+ };
+
+Action loadData = null; // placeholder for this lamda method
+
+var configPanel = topPanel.insert_ActionPanel();
+var username_TextBox = configPanel .add_Label ("Username:" ).top(2).append_TextBox("");
+var password_TextBox = username_TextBox.append_Label("Password:" ).top(2).append_TextBox("").isPasswordField();
+var article_TextBox = password_TextBox.append_Label("Article to Show").top(2).append_TextBox("").width(400);
+var loadData_Link = article_TextBox .append_Link ("Load Data" , () => loadData());
+
+var htmlViewer = topPanel.title ("Article as Html" ).add_WebBrowser().silent(true); // use webBrowser to see article's content
+var rawViewer = topPanel.insert_Right("Article as Raw" ).add_WebBrowser().silent(true); // use webBrowser to see article's object as jsonp
+var jsonpViewer = topPanel.insert_Below("Article as Jsonp").add_WebBrowser().silent(true); // use webBrowser to see article's object as raw xml
+
+Func<string,string,string> getLoginId =
+ (username, password)
+ =>{
+ var loginRequest = "https://teammentor.net/rest/login/{0}/{1}" // create GET URL
+ .format(username, password);
+ return username.add(password) // use username+password as cache key
+ .o2Cache<string>(()=>loginRequest.GET().xRoot().innerXml()); // login request made here
+ };
+Action<string> showMessageInBrowsers =
+ (messageToShow)
+ =>{
+ htmlViewer .showMessage(messageToShow);
+ jsonpViewer.showMessage(messageToShow);
+ rawViewer .showMessage(messageToShow);
+ };
+Action<string,string,string> showArticle =
+ (articleId, username, password)
+ =>{
+ showMessageInBrowsers("....logging in...");
+
+ var userId = getLoginId(username, password);
+
+ if (userId.guid() == Guid.Empty) // handle failed login attempt
+ showMessageInBrowsers("...login failed! ...");
+ else
+ {
+ showMessageInBrowsers(".... loading data ...");
+ htmlViewer .set_Html(wrapCss(getArticle("content",articleId, userId)));
+ rawViewer .set_Html(getArticle("raw" ,articleId, userId));
+ jsonpViewer .set_Html(getArticle("jsonp" ,articleId, userId));
+ }
+ };
+
+loadData = ()=> showArticle(article_TextBox.get_Text(), username_TextBox.get_Text(), password_TextBox.get_Text());
+
+article_TextBox.set_Text("7d647e95-e47f-42e3-bb84-fd0dd727245c");
+
+var crendential = "TestAccounts.xml".credential("TeamMentor"); // load username/password from disk
+
+if (crendential.notNull())
+{
+ crendential.UserName.add(crendential.Password).o2Cache(null); // just in case, clear login cache
+ username_TextBox.set_Text(crendential.UserName); // set default values on TextBoxes
+ password_TextBox.set_Text(crendential.Password);
+ loadData_Link.click(); // trigger show article workflow
+}
+
+rawViewer.showMessage("... please set the login account and article Id (a GUID) on the Textboxes above ...");
+
+return "done";
+
+//using FluentSharp.CoreLib.Utils
+//O2File:_Extra_methods_To_Add_to_Main_CodeBase.cs
View
395 3rdParty/_Installers/Doxygen_Installer.cs
@@ -0,0 +1,395 @@
+using System;
+using System.Diagnostics;
+using FluentSharp.CoreLib;
+
+//O2File:Tool_API.cs
+
+namespace O2.XRules.Database.APIs
+{
+ public class Doxygen_Installer_Test
+ {
+ public void test()
+ {
+ new Doxygen_Installer().start();
+ }
+ }
+ public class Doxygen_Installer : Tool_API
+ {
+
+ public Doxygen_Installer()
+ {
+ config("Doxygen",
+ "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.5.windows.bin.zip".uri(),
+ "doxygen.exe");
+ installFromZip_Web();
+ }
+
+
+ public Process start()
+ {
+ if (this.isInstalled())
+ return this.Executable.startProcess();
+ return null;
+ }
+ }
+}
+/* Script that executed it:
+
+//var topPanel = "{name}".popupWindow(700,400);
+var topPanel = panel.clear().add_Panel();
+var output = topPanel.add_TextArea();
+
+var tmpDocs = "FluentSharp_Docs".tempDir(false);
+var code = @"E:\O2\_Source_Code\FluentSharp";
+var configFile = tmpDocs.pathCombine("FluentSharp.doxConfig");
+
+Action<string> handleLine =
+ (line)=>{
+ output.append_Line(line);
+ };
+Action<string> executeDoxygen =
+ (args)=>{
+ "Doxygen/doxygen.exe".local().startProcess(args, handleLine);
+ };
+Action createConfigFile =
+ ()=>{
+ var args = "-s -g \"{0}\"".format(configFile);
+ executeDoxygen(args);
+ };
+Action runConfigFile =
+ ()=>{
+ var args = "\"{0}\"".format(configFile);
+ executeDoxygen(args);
+ };
+
+if(configFile.file_Doesnt_Exist())
+{
+ createConfigFile();
+ configFile.showInCodeEditor();
+}
+else
+{
+ runConfigFile();
+ tmpDocs.startProcess();
+}
+
+
+//return
+
+//O2File:_Extra_methods_To_Add_to_Main_CodeBase.cs
+
+//Installer:Doxygen_Installer.cs!Doxygen/doxygen.exe
+
+*/
+
+/*used config file:
+
+# Doxyfile 1.8.5
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING = UTF-8
+PROJECT_NAME = "My Project"
+PROJECT_NUMBER =
+PROJECT_BRIEF =
+PROJECT_LOGO =
+OUTPUT_DIRECTORY = C:\Users\o2\AppData\Roaming\OWASP_O2_Platform_5.3\9_5_2013\FluentSharp_Docs
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF =
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH =
+STRIP_FROM_INC_PATH =
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = NO
+QT_AUTOBRIEF = NO
+MULTILINE_CPP_IS_BRIEF = NO
+INHERIT_DOCS = YES
+SEPARATE_MEMBER_PAGES = NO
+TAB_SIZE = 4
+ALIASES =
+TCL_SUBST =
+OPTIMIZE_OUTPUT_FOR_C = NO
+OPTIMIZE_OUTPUT_JAVA = NO
+OPTIMIZE_FOR_FORTRAN = NO
+OPTIMIZE_OUTPUT_VHDL = NO
+EXTENSION_MAPPING =
+MARKDOWN_SUPPORT = YES
+AUTOLINK_SUPPORT = YES
+BUILTIN_STL_SUPPORT = NO
+CPP_CLI_SUPPORT = NO
+SIP_SUPPORT = NO
+IDL_PROPERTY_SUPPORT = YES
+DISTRIBUTE_GROUP_DOC = NO
+SUBGROUPING = YES
+INLINE_GROUPED_CLASSES = NO
+INLINE_SIMPLE_STRUCTS = NO
+TYPEDEF_HIDES_STRUCT = NO
+LOOKUP_CACHE_SIZE = 0
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_PACKAGE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_LOCAL_METHODS = NO
+EXTRACT_ANON_NSPACES = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = NO
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+FORCE_LOCAL_INCLUDES = NO
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_MEMBERS_CTORS_1ST = NO
+SORT_GROUP_NAMES = NO
+SORT_BY_SCOPE_NAME = NO
+STRICT_PROTO_MATCHING = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+SHOW_FILES = YES
+SHOW_NAMESPACES = YES
+FILE_VERSION_FILTER =
+LAYOUT_FILE =
+CITE_BIB_FILES =
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = NO
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_NO_PARAMDOC = NO
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = E:\O2\_Source_Code\FluentSharp\FluentSharp.CoreLib
+INPUT_ENCODING = UTF-8
+FILE_PATTERNS =
+RECURSIVE = YES
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXCLUDE_SYMBOLS =
+EXAMPLE_PATH =
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_PATTERNS =
+FILTER_SOURCE_FILES = NO
+FILTER_SOURCE_PATTERNS =
+USE_MDFILE_AS_MAINPAGE =
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION = NO
+REFERENCES_LINK_SOURCE = YES
+SOURCE_TOOLTIPS = YES
+USE_HTAGS = NO
+VERBATIM_HEADERS = YES
+CLANG_ASSISTED_PARSING = NO
+CLANG_OPTIONS =
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = YES
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_EXTRA_STYLESHEET =
+HTML_EXTRA_FILES =
+HTML_COLORSTYLE_HUE = 220
+HTML_COLORSTYLE_SAT = 100
+HTML_COLORSTYLE_GAMMA = 80
+HTML_TIMESTAMP = YES
+HTML_DYNAMIC_SECTIONS = NO
+HTML_INDEX_NUM_ENTRIES = 100
+GENERATE_DOCSET = NO
+DOCSET_FEEDNAME = "Doxygen generated docs"
+DOCSET_BUNDLE_ID = org.doxygen.Project
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+DOCSET_PUBLISHER_NAME = Publisher
+GENERATE_HTMLHELP = NO
+CHM_FILE =
+HHC_LOCATION =
+GENERATE_CHI = NO
+CHM_INDEX_ENCODING =
+BINARY_TOC = NO
+TOC_EXPAND = NO
+GENERATE_QHP = NO
+QCH_FILE =
+QHP_NAMESPACE = org.doxygen.Project
+QHP_VIRTUAL_FOLDER = doc
+QHP_CUST_FILTER_NAME =
+QHP_CUST_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
+QHG_LOCATION =
+GENERATE_ECLIPSEHELP = NO
+ECLIPSE_DOC_ID = org.doxygen.Project
+DISABLE_INDEX = NO
+GENERATE_TREEVIEW = NO
+ENUM_VALUES_PER_LINE = 4
+TREEVIEW_WIDTH = 250
+EXT_LINKS_IN_WINDOW = NO
+FORMULA_FONTSIZE = 10
+FORMULA_TRANSPARENT = YES
+USE_MATHJAX = NO
+MATHJAX_FORMAT = HTML-CSS
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_EXTENSIONS =
+MATHJAX_CODEFILE =
+SEARCHENGINE = YES
+SERVER_BASED_SEARCH = NO
+EXTERNAL_SEARCH = NO
+SEARCHENGINE_URL =
+SEARCHDATA_FILE = searchdata.xml
+EXTERNAL_SEARCH_ID =
+EXTRA_SEARCH_MAPPINGS =
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = YES
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = a4
+EXTRA_PACKAGES =
+LATEX_HEADER =
+LATEX_FOOTER =
+LATEX_EXTRA_FILES =
+PDF_HYPERLINKS = YES
+USE_PDFLATEX = YES
+LATEX_BATCHMODE = NO
+LATEX_HIDE_INDICES = NO
+LATEX_SOURCE_CODE = NO
+LATEX_BIB_STYLE = plain
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = NO
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = NO
+MAN_OUTPUT = man
+MAN_EXTENSION = .3
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = NO
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+GENERATE_DOCBOOK = NO
+DOCBOOK_OUTPUT = docbook
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE =
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+EXTERNAL_PAGES = YES
+PERL_PATH = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+MSCGEN_PATH =
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = NO
+DOT_NUM_THREADS = 0
+DOT_FONTNAME = Helvetica
+DOT_FONTSIZE = 10
+DOT_FONTPATH =
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+GROUP_GRAPHS = YES
+UML_LOOK = NO
+UML_LIMIT_NUM_FIELDS = 10
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+CALLER_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DIRECTORY_GRAPH = YES
+DOT_IMAGE_FORMAT = png
+INTERACTIVE_SVG = NO
+DOT_PATH =
+DOTFILE_DIRS =
+MSCFILE_DIRS =
+DOT_GRAPH_MAX_NODES = 50
+MAX_DOT_GRAPH_DEPTH = 0
+DOT_TRANSPARENT = NO
+DOT_MULTI_TARGETS = NO
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+
+*/
View
33 3rdParty/_Installers/Grails_Tool_Suite_Installer.cs
@@ -0,0 +1,33 @@
+using System.Diagnostics;
+using FluentSharp.CoreLib;
+
+//O2File:Tool_API.cs
+
+namespace O2.XRules.Database.APIs
+{
+ public class GrailsToolSuite_Installer_Test
+ {
+ public void test()
+ {
+ new GrailsToolSuite_Installer().start();
+ }
+ }
+
+ public class GrailsToolSuite_Installer : Tool_API
+ {
+ public GrailsToolSuite_Installer()
+ {
+ config("Grails Tool Suite",
+ "http://download.springsource.com/release/STS/3.3.0/dist/e4.3/groovy-grails-tool-suite-3.3.0.RELEASE-e4.3-win32.zip".uri(),
+ "ReactOS-0.3.15-QEMU\\boot.bat");
+ installFromZip_Web();
+ }
+
+ public Process start()
+ {
+ if (isInstalled())
+ this.Executable.startProcess();
+ return null;
+ }
+ }
+}
View
64 3rdParty/_Installers/Groovy_Installer.cs
@@ -0,0 +1,64 @@
+using System.Diagnostics;
+using FluentSharp.CoreLib;
+using FluentSharp.CoreLib.API;
+using FluentSharp.WinForms;
+
+//O2File:Tool_API.cs
+//O2File:API_IKVM.cs
+//Installer:IKVM_Installer.cs!IKVM\ikvm-7.2.4630.5\bin\ikvm.exe
+
+namespace O2.XRules.Database.APIs
+{
+ public class Groovy_Installer_Test
+ {
+ public void test()
+ {
+ new Groovy_Installer().start();
+ }
+ }
+ public class Groovy_Installer : Tool_API
+ {
+ public string Groovy_Version { get; set; }
+ public string Groovy_DotNet_Folder { get; set; }
+ public string Groovy_DotNet_Dll { get; set; }
+
+ public Groovy_Installer()
+ {
+ Groovy_Version = "2.1.6";
+ config("Groovy",
+ "http://dist.groovy.codehaus.org/distributions/groovy-binary-{0}.zip".format(Groovy_Version).uri(),
+ @"groovy-{0}\bin\groovyConsole.bat".format(Groovy_Version));
+ installFromZip_Web();
+
+ Groovy_DotNet_Folder = this.Install_Dir.pathCombine("DotNet_IKVM");
+ Groovy_DotNet_Dll = Groovy_DotNet_Folder.pathCombine("groovy-all-{0}.dll".format(Groovy_Version));
+
+ if (Groovy_DotNet_Folder.dirExists().isFalse() || Groovy_DotNet_Dll.fileExists().isFalse())
+ Create_DotNetDll_Using_IKVM();
+ if (Groovy_DotNet_Dll.fileExists())
+ "Groovy DLL is ready for use: {0}".debug(Groovy_DotNet_Dll);
+ else
+ "Could not find Groovy DLL: {0}".error(Groovy_DotNet_Dll);
+ }
+
+ public void Create_DotNetDll_Using_IKVM()
+ {
+ "Creating Groovy .NET Dll using IKVM: {0}".info();
+ Groovy_DotNet_Folder.createDir();
+ var groovyJar = this.Install_Dir.pathCombine(@"groovy-{0}\embeddable\groovy-all-{0}.jar".format(Groovy_Version));
+ //"Groovy Jar: {0} {1}".info(groovyJar, groovyJar.fileExists());
+
+ var apiIKVM = new API_IKVM();
+
+ var result = apiIKVM.convertJarFileIntoDotNetAssembly(groovyJar,Groovy_DotNet_Folder);
+ "Result: {0}".info(result);
+ }
+
+ public Process start()
+ {
+ //if (isInstalled())
+ // return this.Executable.startProcess();
+ return null;
+ }
+ }
+}
View
33 3rdParty/_Installers/ReactOS_Installer.cs
@@ -0,0 +1,33 @@
+using System.Diagnostics;
+using FluentSharp.CoreLib;
+
+//O2File:Tool_API.cs
+
+namespace O2.XRules.Database.APIs
+{
+ public class ReactOS_Installer_Test
+ {
+ public void test()
+ {
+ new ReactOS_Installer().start();
+ }
+ }
+
+ public class ReactOS_Installer : Tool_API
+ {
+ public ReactOS_Installer()
+ {
+ config("ReactOS",
+ "http://kent.dl.sourceforge.net/project/reactos/ReactOS/0.3.15/ReactOS-0.3.15-REL-QEMU.zip".uri(),
+ "ReactOS-0.3.15-QEMU\\boot.bat");
+ installFromZip_Web();
+ }
+
+ public Process start()
+ {
+ if (isInstalled())
+ this.Executable.startProcess();
+ return null;
+ }
+ }
+}
View
36 3rdParty/_Installers/Sandcastle_Installer.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Diagnostics;
+using FluentSharp.CoreLib;
+
+//O2File:Tool_API.cs
+
+namespace O2.XRules.Database.APIs
+{
+ public class Sandcastle_Installer_test
+ {
+ public void test()
+ {
+ new Sandcastle_Installer().start();
+ }
+ }
+ public class Sandcastle_Installer : Tool_API
+ {
+
+ public Sandcastle_Installer()
+ {
+ config("Sandcastle",
+ "SHFBGuidedInstaller_1970.zip",
+ buildCodePlexDownloadUri("shfb", 652438, 130098389357400000).uri(),
+ "doxygen.exe");
+ installFromZip_Web();
+ }
+
+
+ public Process start()
+ {
+ if (this.isInstalled())
+ return this.Install_Dir.startProcess();
+ return null;
+ }
+ }
+}
View
37 3rdParty/_Installers/Tool_API.cs
@@ -14,11 +14,15 @@
using FluentSharp.WinForms;
//O2File:_7_Zip.cs
+//O2File:_Extra_methods_To_Add_to_Main_CodeBase.cs
+
namespace O2.XRules.Database.APIs
{
// this calls exists to simplify the creation of new Tool APIs
public class Tool_API
{
+ public static string CODEPLEX_BUILD_ID = "20748";
+
public string ToolName { get; set; }
public string Version { get; set; }
public string VersionWebDownload { get; set; }
@@ -269,8 +273,16 @@ public string download(string file)
var localPath = localDownloadsDir.pathCombine(file);
if (localPath.fileExists())
{
- "found previously downloaded copy: {0}".info(localPath);
- return localPath;
+ if (localPath.extension(".zip") && localPath.isZipFile().isFalse())
+ {
+ "found previously downloaded zip file, but it was corrupted, so downloading it again: {0}".error(localPath);
+ localPath.delete_File();
+ }
+ else
+ {
+ "found previously downloaded copy: {0}".info(localPath);
+ return localPath;
+ }
}
var s3Path = "{0}{1}".format(s3DownloadFolder, file);
@@ -363,6 +375,25 @@ public void cleanInstallTargets()
Files.deleteFile(tempLocalDownload);
delete_Install_Dir();
}
-
+
+ public string buildCodePlexDownloadUri(string projectName, int downloadId, long fileTime)
+ {
+ var codePlexBuildId = "codePlex_Html".o2Cache<string>("http://www.codeplex.com/".GET)
+ .lines_RegEx("<li>Version.*</li>")
+ .first().trim()
+ .split(".").last()
+ .remove("</li>");
+ if(codePlexBuildId.valid())
+ {
+ "[ToolAPI] Found CodePlex Build Id: {0}".info(codePlexBuildId);
+ var downloadUrl = "http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName={0}&DownloadId={1}&FileTime={2}&Build={3}"
+ .format(projectName, downloadId, fileTime, codePlexBuildId);
+ "[ToolAPI] Mapped DownloadUrl to : {0}".info(downloadUrl);
+ return downloadUrl;
+ }
+ "[ToolAPI] Could not find CodePlex Build id".error();
+ return null;
+ }
+
}
}
View
19 APIs/Groovy/API_Groovy.cs
@@ -0,0 +1,19 @@
+// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
+using System;
+using System.IO;
+using FluentSharp.CoreLib;
+//using FluentSharp.CoreLib.API;
+
+//using O2.XRules.Database.Languages_and_Frameworks.DotNet;
+
+//Installer:IKVM_Installer.cs!IKVM\ikvm-7.2.4630.5\bin\ikvm.exe
+//Installer:Groovy_Installer.cs!Groovy\groovy-2.1.6\bin\groovyConsole.bat
+
+//namespace O2.XRules.Database.APIs.IKVM
+namespace FluentSharp.CoreLib.API
+{
+ public class API_Groovy
+ {
+
+ }
+}
View
10 APIs/Groovy/Util - Groovy - Start Native Console UI.h2
@@ -0,0 +1,10 @@
+new API_IKVMC(); // ensure all required IKVM assemblies are loaded
+
+var args = new string[] {}; // no arguments passed
+groovy.ui.Console.main(args); // starts Groovy console UI
+
+//O2Ref:Groovy\DotNet_IKVM\groovy-all-2.1.6.dll
+//O2Ref:IKVM.OpenJDK.Core.dll
+//O2Ref:IKVM.OpenJDK.SwingAWT.dll
+//O2File:API_IKVMC.cs
+//using O2.XRules.Database.APIs.IKVM
View
28 APIs/Groovy/Util - Simple Groovy Shell.h2
@@ -0,0 +1,28 @@
+new API_IKVMC();
+
+var topPanel = "Util - Simple Groovy Shell".popupWindow(700,400);
+//var topPanel = panel.clear().add_Panel();
+var replUI = topPanel.add_REPL_Gui();
+var code = replUI.Code_Panel.add_SourceCodeViewer();
+
+var groovyShell = new groovy.lang.GroovyShell();
+replUI.On_ExecuteCode =
+ ()=>{
+ try
+ {
+ var result = groovyShell.evaluate(code.get_Text());
+ replUI.showOutput(result.str());
+ }
+ catch(Exception ex)
+ {
+ replUI.showOutput(ex.Message + " : " + ex.StackTrace);
+ }
+ };
+
+code.set_Text("java.lang.System.getProperties();");
+replUI.Execute_Button.click();
+
+//O2File:API_IKVMC.cs
+//O2Ref:IKVM\ikvm-7.2.4630.5\bin\IKVM.OpenJDK.Core.dll
+//O2Ref:Groovy\DotNet_IKVM\groovy-all-2.1.6.dll
+//using O2.XRules.Database.APIs.IKVM
View
16 APIs/IKVM/API_IKVM.cs
@@ -2,13 +2,14 @@
using System;
using System.IO;
using FluentSharp.CoreLib;
-using FluentSharp.CoreLib.API;
+//using FluentSharp.CoreLib.API;
//using O2.XRules.Database.Languages_and_Frameworks.DotNet;
//Installer:IKVM_Installer.cs!IKVM\ikvm-7.2.4630.5\bin\ikvm.exe
-namespace O2.XRules.Database.APIs.IKVM
+//namespace O2.XRules.Database.APIs.IKVM
+namespace FluentSharp.CoreLib.API
{
public class API_IKVM
{
@@ -29,8 +30,7 @@ public class API_IKVM
public string javaParserExecutable { get; set; }
public API_IKVM()
- {
-
+ {
_IKVMRuntimeDir = PublicDI.config.ToolsOrApis.pathCombine(@"\IKVM\ikvm-7.2.4630.5\bin");
//"_IKVM_Runtime.zip";
@@ -121,9 +121,11 @@ public static string convertJarFileIntoDotNetAssembly(this API_IKVM ikvm, string
Files.deleteFile(destinationFile);
var executionParameters = string.Format(ikvm.IKVMCompilerArgumentsFormat, pathToJarFile,
destinationFile);
- var executionResult =
- Processes.startProcessAsConsoleApplicationAndReturnConsoleOutput(ikvm.IKVMCompilerExecutable,
- executionParameters);
+ //var executionResult =
+ // Processes.startProcessAsConsoleApplicationAndReturnConsoleOutput(ikvm.IKVMCompilerExecutable,
+ // executionParameters);
+ var process = ikvm.IKVMCompilerExecutable.startProcess(executionParameters, (line)=>line.info());
+ process.WaitForExit();
if (File.Exists(destinationFile))
return destinationFile;
View
42 APIs/IKVM/API_IKVMC.cs
@@ -29,37 +29,57 @@ namespace O2.XRules.Database.APIs.IKVM
{
public class API_IKVMC
{
+ public string BasePath { get; set; }
public Assembly IkvmcAssembly { get; set;}
- public Type StaticCompiler { get; set;}
- public object IkvmRuntime { get; set;}
- public object IkvmRuntimeJni { get; set;}
- public object IkvmcCompiler { get; set;}
- public object CompilerOptions { get; set;}
-
+ public Type StaticCompiler { get; set;}
+ public object IkvmRuntime { get; set;}
+ public object IkvmRuntimeJni { get; set;}
+ public object IkvmcCompiler { get; set;}
+ public object CompilerOptions { get; set;}
+
public API_IKVMC()
{
setup();
}
public void setup()
- {
+ {
+ BasePath = @"IKVM\ikvm-7.2.4630.5\bin\";
//IkvmcAssembly = "ikvmc.exe".assembly();
- var basePath = @"IKVM\ikvm-7.2.4630.5\bin\";
- IkvmcAssembly = basePath.add(@"ikvmc.exe").assembly();
+
+ IkvmcAssembly = BasePath.add(@"ikvmc.exe").assembly();
StaticCompiler = IkvmcAssembly.type("StaticCompiler");
//IkvmRuntime = StaticCompiler.invokeStatic("LoadFile",Environment.CurrentDirectory.pathCombine("IKVM.Runtime.dll"));
- IkvmRuntime = StaticCompiler.invokeStatic("LoadFile",basePath.add("IKVM.Runtime.dll").assembly().Location);
+ IkvmRuntime = StaticCompiler.invokeStatic("LoadFile",BasePath.add("IKVM.Runtime.dll").assembly().Location);
PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("runtimeAssembly"),IkvmRuntime);
//IkvmRuntimeJni = StaticCompiler.invokeStatic("LoadFile",Environment.CurrentDirectory.pathCombine("IKVM.Runtime.JNI.dll"));
- IkvmRuntimeJni = StaticCompiler.invokeStatic("LoadFile",basePath.add("IKVM.Runtime.JNI.dll").assembly().Location);
+ IkvmRuntimeJni = StaticCompiler.invokeStatic("LoadFile",BasePath.add("IKVM.Runtime.JNI.dll").assembly().Location);
PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("runtimeJniAssembly"),IkvmRuntimeJni);
IkvmcCompiler = IkvmcAssembly.type("IkvmcCompiler").ctor();
CompilerOptions = IkvmcAssembly.type("CompilerOptions").ctor();
PublicDI.reflection.setField((FieldInfo)StaticCompiler.field("toplevel"),CompilerOptions);
+ //ensure assemblies are loaded into memory()
+ loadCoreIKVMAssemblies();
}
+ public void loadCoreIKVMAssemblies()
+ {
+ BasePath.add("IKVM.Runtime.dll" ).assembly();
+ BasePath.add("IKVM.Runtime.JNI.dll" ).assembly();
+ BasePath.add("IKVM.OpenJDK.Util.dll" ).assembly();
+ BasePath.add("IKVM.OpenJDK.Core.dll" ).assembly();
+ BasePath.add("IKVM.Reflection.dll" ).assembly();
+ BasePath.add("IKVM.OpenJDK.XML.API.dll" ).assembly();
+ BasePath.add("IKVM.OpenJDK.Beans.dll" ).assembly();
+ BasePath.add("IKVM.OpenJDK.SwingAWT.dll" ).assembly();
+ BasePath.add("IKVM.OpenJDK.Naming.dll" ).assembly();
+ BasePath.add("IKVM.OpenJDK.Management.dll" ).assembly();
+ BasePath.add("IKVM.OpenJDK.Text.dll" ).assembly();
+
+
+ }
}
public static class API_IKVMC_ExtensionMethods_CreateJavaMetadata
View
2  APIs/MediaWiki/MediaWiki_GuiControls/ascx_MediaWiki_ConfigAndLogin.cs
@@ -12,7 +12,7 @@
//O2File:O2PlatformWikiApi.cs
//O2File:OwaspWikiAPI.cs
//O2File:ISecretData.cs
-//O2File:SecretData_ExtensionMethods.cs
+//_O2File:SecretData_ExtensionMethods.cs
namespace O2.XRules.Database.APIs
{
View
24 APIs/Windows/Win32_DLL_Imports/API_WinAPI_ExtensionMethods.cs
@@ -112,6 +112,22 @@ public static IntPtr window_Move(this IntPtr windowHandle, int x, int y, int wid
WinAPI.MoveWindow(windowHandle,x,y,width, height,true);
return windowHandle;
}
+ public static IntPtr window_Maximized(this IntPtr windowHandle)
+ {
+ WinAPI.ShowWindow(windowHandle,WinAPI.ShowWindowCommands.ShowMaximized);
+ return windowHandle;
+ }
+ public static IntPtr window_Minimized(this IntPtr windowHandle)
+ {
+ WinAPI.ShowWindow(windowHandle,WinAPI.ShowWindowCommands.ShowMinimized);
+ return windowHandle;
+ }
+ public static IntPtr window_Default(this IntPtr windowHandle)
+ {
+ WinAPI.ShowWindow(windowHandle,WinAPI.ShowWindowCommands.ShowDefault);
+ return windowHandle;
+ }
+
public static IntPtr window_Show(this IntPtr windowHandle)
{
@@ -175,6 +191,14 @@ public static IntPtr window_Highlight(this IntPtr windowHandle)
return windowHandle;
}
+
+ public static WinAPI.RECT window_Rectangle(this IntPtr windowHandle)
+ {
+ WinAPI.RECT rect = new WinAPI.RECT(0, 0, 0, 0);
+ WinAPI.GetWindowRect(windowHandle, ref rect);
+ return rect;
+ }
+
//public static Bitmap PrintWindow(IntPtr hwnd)
public static Bitmap window_ScreenShot(this IntPtr windowHandle)
{
View
85 Utils/ExtensionMethods/_Extra_methods_To_Add_to_Main_CodeBase.cs
@@ -1,5 +1,6 @@
// This file is part of the OWASP O2 Platform (http://www.owasp.org/index.php/OWASP_O2_Platform) and is released under the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
using System;
+using System.Drawing;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
@@ -7,12 +8,46 @@
using FluentSharp.CoreLib;
using FluentSharp.CoreLib.API;
using FluentSharp.WinForms;
-
+using Ionic.Zip;
//O2Ref:Ionic.Zip.dll
namespace FluentSharp.CoreLib
{
+ public static class Extra_Web
+ {
+ public static string GET(this string url, string cookies)
+ {
+ return new Web().getUrlContents(url,cookies, false);
+ }
+
+ public static string GET(this Web web, string url)
+ {
+ if (web.notNull())
+ return web.getUrlContents(url);
+ return null;
+ }
+ }
+ public static class Extra_Zip
+ {
+ public static bool isZipFile(this string zipFile)
+ {
+ if (zipFile.fileExists())
+ {
+ try
+ {
+ var entries = new ZipFile(zipFile).Entries;
+ return entries.size() >0;
+ }
+ catch(Exception ex)
+ {
+ ex.log("[zipFile] isZipFile");
+ }
+ }
+ return false;
+ }
+ }
+
public static class Extra_Process
{
public static Process startProcess(this string processExe, string arguments, string workingDirectory)
@@ -25,6 +60,33 @@ public static Process startProcess(this string processExe, string argument
return Processes.startProcessAndRedirectIO(processExe, arguments, workingDirectory, onDataReceived, onDataReceived);
}
}
+ public static class Extra_Icon
+ {
+ public static Icon file_Icon(this string filePath)
+ {
+ if(filePath.fileExists())
+ {
+ try
+ {
+ return Icon.ExtractAssociatedIcon(filePath);
+ }
+ catch(Exception ex)
+ {
+ ex.log("[filePath].file_Icon");
+ }
+ }
+ return null;
+ }
+
+ public static Image toImage(this Icon icon)
+ {
+ if (icon.notNull())
+ return icon.ToBitmap();
+ return null;
+
+ }
+ }
+
public static class Extra_IO
{
public static string fileContents(this string folder, string file)
@@ -42,6 +104,15 @@ public static string folder(this string basePath, string folderName)
return targetFolder;
return null;
}
+
+ public static bool file_Doesnt_Exist(this string file)
+ {
+ return file.file_Exists().isFalse();
+ }
+ public static bool file_Exists(this string file)
+ {
+ return file.fileExists();
+ }
}
public static class Extra_Misc
{
@@ -54,6 +125,17 @@ public static class Extra_Misc
return control;
}
}
+ public static class Extra_Lines
+ {
+ public static List<string> lines_RegEx(this string target, string regEx)
+ {
+ return target.lines().containing_RegEx(regEx);
+ }
+ public static List<string> containing_RegEx(this List<string> items, string regEx)
+ {
+ return items.where(item=>item.regEx(regEx));
+ }
+ }
public static class Extra_WinForm_Controls_ToolStrip
{
@@ -74,6 +156,7 @@ public static ToolStripDropDown add_DropDown_Menu(this ToolStrip toolStrip, stri
}
+
public static class Extra_WinForm_Controls_TreeView
{
View
2  _Sample_Vulns/XmlSerialization/XmlDecode/Util - XmlDecode in memory using IKVM.h2
@@ -22,7 +22,7 @@ toolStrip.add_CheckBox("Auto Convert", (value)=> autoConvert = value);
var fileLoaded = toolStrip.add_Label("Exploit:").add_TextBox("").width(150);
toolStrip.add_Button("Save", "SaveFile".formImage(),()=> saveFile()).add_Separator();;
-
+
toolStrip.add_Button("REPL Last XmlDecoder", "text_x_script".formImage(), ()=> xmlDecoder.script_Me().code_Append("//O2Ref:IKVM.OpenJDK.Core.dll"));
convert = ()=>{
Please sign in to comment.
Something went wrong with that request. Please try again.