Project

General

Profile

Common Tasks » History » Version 3

Luke Murphey, 07/24/2010 12:46 AM

1 1 Luke Murphey
h1. Common Tasks
2 1 Luke Murphey
3 1 Luke Murphey
h2. Adding Functions to the Script Environment
4 1 Luke Murphey
5 2 Luke Murphey
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).
6 1 Luke Murphey
7 1 Luke Murphey
<pre><code class="java">
8 1 Luke Murphey
Hashtable<String, String> temp = new Hashtable<String, String>();
9 1 Luke Murphey
				
10 1 Luke Murphey
temp.put("ThreatScript.Result", "net.lukemurphey.nsia.scan.Result");
11 1 Luke Murphey
temp.put("HTTP.URL", "java.net.URL");
12 1 Luke Murphey
temp.put("HTTP.TagNameFilter", "org.htmlparser.filters.TagNameFilter");
13 1 Luke Murphey
temp.put("ThreatScript.DataAnalysis", "net.lukemurphey.nsia.scan.ScriptSignatureUtils");
14 1 Luke Murphey
</pre>
15 3 Luke Murphey
16 3 Luke Murphey
h2. Creating New Packages
17 3 Luke Murphey
18 3 Luke Murphey
The following steps must be performed in order to build a new version of NSIA:
19 3 Luke Murphey
# Update Application class with the version of the application
20 3 Luke Murphey
# Update NEWS (in docs directory)
21 3 Luke Murphey
# Update the version in the default.properties file
22 3 Luke Murphey
# Update the Java archive (nsia.jar)
23 3 Luke Murphey
# Update the web console archive if necessary (webconsole.war)
24 3 Luke Murphey
# Build the Zip archive and delete the meta-inf directory from the resulting zip file
25 3 Luke Murphey
# Update the NSIS installer version description