Common Tasks » History » Version 4
Luke Murphey, 07/24/2010 12:47 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 | 4 | Luke Murphey | </code> |
| 15 | 1 | Luke Murphey | </pre> |
| 16 | 3 | Luke Murphey | |
| 17 | 3 | Luke Murphey | h2. Creating New Packages |
| 18 | 3 | Luke Murphey | |
| 19 | 3 | Luke Murphey | The following steps must be performed in order to build a new version of NSIA: |
| 20 | 3 | Luke Murphey | # Update Application class with the version of the application |
| 21 | 3 | Luke Murphey | # Update NEWS (in docs directory) |
| 22 | 3 | Luke Murphey | # Update the version in the default.properties file |
| 23 | 3 | Luke Murphey | # Update the Java archive (nsia.jar) |
| 24 | 3 | Luke Murphey | # Update the web console archive if necessary (webconsole.war) |
| 25 | 3 | Luke Murphey | # Build the Zip archive and delete the meta-inf directory from the resulting zip file |
| 26 | 3 | Luke Murphey | # Update the NSIS installer version description |