Common Tasks » History » Version 3
Version 2 (Luke Murphey, 04/09/2010 12:36 AM) → Version 3/4 (Luke Murphey, 07/24/2010 12:46 AM)
h1. Common Tasks
h2. 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).
<pre><code class="java">
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");
</pre>
h2. Creating New Packages
The following steps must be performed in order to build a new version of NSIA:
# Update Application class with the version of the application
# Update NEWS (in docs directory)
# Update the version in the default.properties file
# Update the Java archive (nsia.jar)
# Update the web console archive if necessary (webconsole.war)
# Build the Zip archive and delete the meta-inf directory from the resulting zip file
# Update the NSIS installer version description
h2. 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).
<pre><code class="java">
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");
</pre>
h2. Creating New Packages
The following steps must be performed in order to build a new version of NSIA:
# Update Application class with the version of the application
# Update NEWS (in docs directory)
# Update the version in the default.properties file
# Update the Java archive (nsia.jar)
# Update the web console archive if necessary (webconsole.war)
# Build the Zip archive and delete the meta-inf directory from the resulting zip file
# Update the NSIS installer version description