Project

General

Profile

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");

Creating New Packages

The following steps must be performed in order to build a new version of NSIA:
  1. Update Application class with the version of the application
  2. Update NEWS (in docs directory)
  3. Update the version in the default.properties file
  4. Update the Java archive (nsia.jar)
  5. Update the web console archive if necessary (webconsole.war)
  6. Build the Zip archive and delete the meta-inf directory from the resulting zip file
  7. Update the NSIS installer version description