Common Tasks » History » Version 2
« Previous -
Version 2/4
(diff) -
Next » -
Current version
Luke Murphey, 04/09/2010 12:36 AM
Common Tasks¶
Adding Functions to the Script Environment¶
The environment used by scripts is populated in the populateShortcuts() method in source:/trunk/src/net/lukemurphey/nsia/scan/ScriptClassLoader.java. The populateShortcuts must be updated anytime changes are made to the namespaces used to populate the environment must (see below for an example).
Hashtable<String, String> temp = new Hashtable<String, String>();
temp.put("ThreatScript.Result", "net.lukemurphey.nsia.scan.Result");
temp.put("HTTP.URL", "java.net.URL");
temp.put("HTTP.TagNameFilter", "org.htmlparser.filters.TagNameFilter");
temp.put("ThreatScript.DataAnalysis", "net.lukemurphey.nsia.scan.ScriptSignatureUtils");