Project

General

Profile

Common Tasks » History » Version 1

Version 1/4 - Next » - Current version
Luke Murphey, 04/02/2010 07:17 PM


Common Tasks

Adding Functions to the Script Environment

The environment used by scripts is populated in the ScriptClassLoader.populateShortcuts() method. 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");