You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(25) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(1) |
Mar
(61) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Marcus <the...@us...> - 2004-03-24 16:07:53
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25598 Added Files: DatabasePlugin.java Log Message: initial import --- NEW FILE: DatabasePlugin.java --- /* * juNK - a file search system for smb shares * * Copyright 2004 by * Marcus Proest (theevilflow at users dot sf dot net) * Uwe van Heesch (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). * * junk is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * junk is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with junk; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * DatabasePlugin.java * * Created on 23. März 2004, 20:28 */ package junk.plugin.database; import junk.plugin.PluginTools; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.util.HashMap; import javax.servlet.ServletException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.struts.action.ActionServlet; import org.apache.struts.action.PlugIn; import org.apache.struts.config.ModuleConfig; /** * plugin to provide a database connection instead of using DBCP * @author Marcus Proest */ public class DatabasePlugin implements PlugIn, ConnectionProvider { /** * context saving key */ public static final String KEY_DATABASE_CON = "database-provider"; /** the actionservlet of the struts application */ private ActionServlet actionServlet = null; /** * plugin configuration */ private HashMap conf = null; /** log writer */ private Log log = LogFactory.getLog(DatabasePlugin.class); /** * database password */ private String pass = null; /** * database url */ private String url = null; /** * database user */ private String user = null; /** Creates a new instance of DatabasePlugin */ public DatabasePlugin() { } /** * return a valid database connection * @throws SQLException yupp, life's bad * @return a valid database connection */ public Connection getConnection() throws SQLException { return DriverManager.getConnection(url, user, pass); } /** * destroy plugin */ public void destroy() { log.info("DatabasePlugin just left the building"); } /** * initialize plugin * @param a ActionServlet of the struts application * @param m the ModuleConfig of the struts application * @throws ServletException ServletException */ public void init(ActionServlet a, ModuleConfig m) throws ServletException { this.actionServlet = a; this.conf = PluginTools.getPluginConfig(DatabasePlugin.class, m); if (this.conf == null) { log.fatal("No database configuration found."); } String driver = (String) this.conf.get("driverClass"); this.url = (String) this.conf.get("url"); this.user = (String) this.conf.get("user"); this.pass = (String) this.conf.get("password"); if ((driver == null) || (url == null) || (user == null) || (pass == null)) { log.fatal("Bad database configuration:" + "[" + driver + "][" + url + "][" + user + "][(pass null?)" + (pass == null) + "]", new IllegalArgumentException()); } try { Class.forName(driver).newInstance(); Connection con = DriverManager.getConnection(url, user, pass); con.close(); } catch (SQLException e1) { log.fatal("Error while connecting to data source.", e1); } catch (ClassNotFoundException e2) { log.fatal("Could not find JDBC driver.", e2); } catch (InstantiationException e3) { log.fatal("Could not instantiate JDBC driver.", e3); } catch (IllegalAccessException e4) { log.fatal("Illegal access while instatiating JDBC driver.", e4); } this.actionServlet.getServletContext().setAttribute(DatabasePlugin.KEY_DATABASE_CON, (ConnectionProvider) this); log.info("DatabasePlugin loaded ( [" + driver + "][" + url + "][" + user + "] )"); } } |
From: Marcus <the...@us...> - 2004-03-24 16:07:19
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25467 Added Files: ConnectionProvider.java Log Message: initial import --- NEW FILE: ConnectionProvider.java --- /* * juNK - a file search system for smb shares * * Copyright 2004 by * Marcus Proest (theevilflow at users dot sf dot net) * Uwe van Heesch (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). * * junk is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * junk is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with junk; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ package junk.plugin.database; import java.sql.Connection; import java.sql.SQLException; /** * interface to retrieve a database connection * @author flow */ public interface ConnectionProvider { /** * should return a connection to the configured database * the remarkable feature of this file is, that the comments are way larger * than the code itself. I love such stuff. * @throws SQLException might be thrown if the instatiaton of the connection * fails * @return a connection to the configured database */ public Connection getConnection() throws SQLException; } |
From: Marcus <the...@us...> - 2004-03-24 16:06:08
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25267/database Log Message: Directory /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/database added to the repository |
From: Marcus <the...@us...> - 2004-03-24 16:04:05
|
Update of /cvsroot/junk/junk/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24863 Modified Files: junk-config.xml Log Message: database plugin configuration added Index: junk-config.xml =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/junk-config.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** junk-config.xml 23 Mar 2004 15:32:59 -0000 1.2 --- junk-config.xml 24 Mar 2004 15:53:27 -0000 1.3 *************** *** 3,7 **** <data-sources> <data-source> ! <set-property property="url" value="jdbc:mysql://10.0.80.5/smbsearch?autoReconnect=true" /> <!-- change this to your db connect string --> <set-property property="user" value="reader" /> <!-- change this to your db user --> <set-property property="password" value="reader" /> <!--change this to your db password --> --- 3,7 ---- <data-sources> <data-source> ! <set-property property="url" value="jdbc:mysql://10.0.80.5/smbsearch" /> <!-- change this to your db connect string --> <set-property property="user" value="reader" /> <!-- change this to your db user --> <set-property property="password" value="reader" /> <!--change this to your db password --> *************** *** 13,16 **** --- 13,23 ---- </data-source> </data-sources> + <plug-in className="junk.plugin.database.DatabasePlugin"> + <set-property property="url" value="jdbc:mysql://10.0.80.5/smbsearch?autoReconnect=true" /> <!-- change this to your db connect string --> + <set-property property="user" value="reader" /> <!-- change this to your db user --> + <set-property property="password" value="reader" /> <!--change this to your db password --> + <set-property property="description" value="Shodan Mysql Datasource Configuration" /> + <set-property property="driverClass" value="org.gjt.mm.mysql.Driver" /> + </plug-in> <plug-in className="junk.plugin.scanner.ScannerPlugin"> <set-property property="scan-interval" value="300000" /><!--5 minutes --> |
From: Tyron E. <ty...@us...> - 2004-03-23 15:43:29
|
Update of /cvsroot/junk/junk/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18227 Modified Files: junk-config.xml Log Message: nerfigen Proest Bug ausgebügelt Index: junk-config.xml =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/junk-config.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** junk-config.xml 23 Mar 2004 15:15:04 -0000 1.1 --- junk-config.xml 23 Mar 2004 15:32:59 -0000 1.2 *************** *** 1,12 **** <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> - <plug-in className="junk.plugin.scanner.ScannerPlugin"> - <set-property property="scan-interval" value="300000" /><!--5 minutes --> - <set-property property="thread-sleep" value="10000" /><!--10 seconds--> - <set-property property="ip-range" value="10.0.80.0/24" /><!-- a.b.c.d/s,e.f.g.h/t --> - <set-property property="tcp-timeout" value="100" /><!-- 100 ms --> - <set-property property="map-save-file" value="data/hostmap" /><!-- relative to context root, directory has to exist! --> - </plug-in> - <data-sources> <data-source> --- 1,4 ---- *************** *** 21,23 **** --- 13,22 ---- </data-source> </data-sources> + <plug-in className="junk.plugin.scanner.ScannerPlugin"> + <set-property property="scan-interval" value="300000" /><!--5 minutes --> + <set-property property="thread-sleep" value="10000" /><!--10 seconds--> + <set-property property="ip-range" value="10.0.80.0/24" /><!-- a.b.c.d/s,e.f.g.h/t --> + <set-property property="tcp-timeout" value="100" /><!-- 100 ms --> + <set-property property="map-save-file" value="data/hostmap" /><!-- relative to context root, directory has to exist! --> + </plug-in> </struts-config> \ No newline at end of file |
From: Tyron E. <ty...@us...> - 2004-03-23 15:29:25
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15001 Modified Files: Info.jsp Log Message: Removed Who is Online part Index: Info.jsp =================================================================== RCS file: /cvsroot/junk/junk/pages/Info.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Info.jsp 18 Dec 2003 09:37:25 -0000 1.2 --- Info.jsp 23 Mar 2004 15:18:56 -0000 1.3 *************** *** 41,46 **** <tr> <td> ! <br /><br /> ! <tiles:insert page="/WhoIsOnline.do" flush="true" /> </td> </tr> --- 41,46 ---- <tr> <td> ! Dieser Platz ist für ein Logo reserviert.<br/> ! Oh wie wer das schön wenn wir ein Logo hätten.<br/> </td> </tr> |
From: Tyron E. <ty...@us...> - 2004-03-23 15:28:52
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14862 Modified Files: application.properties application_de.properties application_nl.properties Log Message: removed awkward errors Index: application.properties =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/resources/application.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** application.properties 18 Nov 2003 16:07:51 -0000 1.2 --- application.properties 23 Mar 2004 15:18:19 -0000 1.3 *************** *** 26,31 **** errors.token=Request could not be completed. Operation is not in sequence. # -- search -- ! search.title=::: juNK [java usefull Net Kollector] Ver 0.01 ::: ! search.info=** Welcome to juNK [Java usefull Net Kollector] **<br>To start a new search simply fill in the search properties into the form. search.search=Search # -- search - Fehler -- --- 26,31 ---- errors.token=Request could not be completed. Operation is not in sequence. # -- search -- ! search.title=::: juNK [java useful Net Kollector] Ver 0.01 ::: ! search.info=** Welcome to juNK [Java useful Net Kollector] **<br>To start a new search simply fill in the search properties into the form.\ \ \ \ \ \ \ \ \ \ \ \ search.search=Search # -- search - Fehler -- Index: application_de.properties =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/resources/application_de.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** application_de.properties 9 Dec 2003 15:55:26 -0000 1.3 --- application_de.properties 23 Mar 2004 15:18:19 -0000 1.4 *************** *** 26,31 **** errors.token=Der Vorgang konnte nicht beendet werden. Operation is not in sequence. # -- search -- ! search.title=::: juNK [java usefull Net Kollector] Ver 0.01 ::: ! search.info=** Herzlich wilkommen zu juNK [Java usefull Net Kollector] **<br>Um eine Suche zu starten einfach die Parameter oben eingeben und auf Finden klicken.\ \ \ \ \ \ \ \ \ \ \ \ search.search=Suche # -- search - Fehler -- --- 26,31 ---- errors.token=Der Vorgang konnte nicht beendet werden. Operation is not in sequence. # -- search -- ! search.title=::: juNK [java useful Net Kollector] Ver 0.01 ::: ! search.info=** Herzlich wilkommen zu juNK [Java useful Net Kollector] **<br>Um eine Suche zu starten einfach die Parameter oben eingeben und auf Finden klicken.\ \ \ \ \ \ \ \ \ \ \ \\ search.search=Suche # -- search - Fehler -- Index: application_nl.properties =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/resources/application_nl.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** application_nl.properties 20 Nov 2003 23:43:47 -0000 1.3 --- application_nl.properties 23 Mar 2004 15:18:19 -0000 1.4 *************** *** 26,31 **** errors.token=algemene fout. # -- search -- ! search.title=::: juNK [java usefull Net Kollector] Ver 0.01 ::: ! search.info=** Hartelijk welkom bij juNK [Java usefull Net Kollector] **<br>Voor het starten van de zoekmaschine de parameters boven invullen en op vinden klikken.\ \ \ \ \ \ \ \ \ \ \ \ search.search=zoek # -- search - Fehler -- --- 26,31 ---- errors.token=algemene fout. # -- search -- ! search.title=::: juNK [java useful Net Kollector] Ver 0.01 ::: ! search.info=** Hartelijk welkom bij juNK [Java useful Net Kollector] **<br>Voor het starten van de zoekmaschine de parameters boven invullen en op vinden klikken.\ \ \ \ \ \ \ \ \ \ \ \\ search.search=zoek # -- search - Fehler -- |
From: Marcus <the...@us...> - 2004-03-23 15:25:33
|
Update of /cvsroot/junk/junk/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14179 Added Files: junk-config.xml Log Message: initial release --- NEW FILE: junk-config.xml --- <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <plug-in className="junk.plugin.scanner.ScannerPlugin"> <set-property property="scan-interval" value="300000" /><!--5 minutes --> <set-property property="thread-sleep" value="10000" /><!--10 seconds--> <set-property property="ip-range" value="10.0.80.0/24" /><!-- a.b.c.d/s,e.f.g.h/t --> <set-property property="tcp-timeout" value="100" /><!-- 100 ms --> <set-property property="map-save-file" value="data/hostmap" /><!-- relative to context root, directory has to exist! --> </plug-in> <data-sources> <data-source> <set-property property="url" value="jdbc:mysql://10.0.80.5/smbsearch?autoReconnect=true" /> <!-- change this to your db connect string --> <set-property property="user" value="reader" /> <!-- change this to your db user --> <set-property property="password" value="reader" /> <!--change this to your db password --> <set-property property="autoCommit" value="false" /> <set-property property="description" value="Shodan Mysql Datasource Configuration" /> <set-property property="driverClass" value="org.gjt.mm.mysql.Driver" /> <set-property property="maxCount" value="4" /> <set-property property="minCount" value="2" /> </data-source> </data-sources> </struts-config> |
From: Marcus <the...@us...> - 2004-03-23 15:23:38
|
Update of /cvsroot/junk/junk/pages/pics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13718 Modified Files: computer.png Log Message: added transparency Index: computer.png =================================================================== RCS file: /cvsroot/junk/junk/pages/pics/computer.png,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsP0ciui and /tmp/cvsk5lPjX differ |
From: Tyron E. <ty...@us...> - 2004-03-23 15:18:42
|
Update of /cvsroot/junk/junk/pics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12258 Removed Files: computer.png file.png logo_fs.png Log Message: Folder moved to /pages/pics --- computer.png DELETED --- --- logo_fs.png DELETED --- --- file.png DELETED --- |
From: Tyron E. <ty...@us...> - 2004-03-23 15:17:19
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11922 Modified Files: Result.jsp Log Message: Took out message icon. This will be back if mailslot support is integrated into jcifs Index: Result.jsp =================================================================== RCS file: /cvsroot/junk/junk/pages/Result.jsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Result.jsp 18 Dec 2003 16:27:06 -0000 1.4 --- Result.jsp 23 Mar 2004 15:06:51 -0000 1.5 *************** *** 39,44 **** <tr class="online"> <td class="online"> ! <img src="pics/computer.gif"> <a href="<bean:write name="resultProperties" property="linkPrefix"/><bean:write name="computer" property="ip"/>/" target="_blank"><b><bean:write name="computer" property="name"/></b></a> ! <a onmouseover="style.cursor='hand'" onclick="mod_open('/junk/messageProcessor.do?destHost=<bean:write name="computer" property="name"/>');" title="<bean:message key="message.title"/>"><img src="pics/message.gif" border="0"></a><br> </td> </tr> --- 39,43 ---- <tr class="online"> <td class="online"> ! <img src="pics/computer.png"> <a href="<bean:write name="resultProperties" property="linkPrefix"/><bean:write name="computer" property="ip"/>/" target="_blank"><b><bean:write name="computer" property="name"/></b></a><br> </td> </tr> *************** *** 46,50 **** <logic:equal name="netfile" property="online" value="true"> <tr class="online"> ! <td class="online" width="40%" valign="middle"> <img src="pics/file.gif"></b> <a href="<bean:write name="resultProperties" property="linkPrefix"/><bean:write name="netfile" property="location"/>" target="_blank" title="<bean:write name="netfile" property="fullname"/>"> <bean:write name="netfile" property="name"/> --- 45,49 ---- <logic:equal name="netfile" property="online" value="true"> <tr class="online"> ! <td class="online" width="40%" valign="middle"> <img src="pics/file.png"></b> <a href="<bean:write name="resultProperties" property="linkPrefix"/><bean:write name="netfile" property="location"/>" target="_blank" title="<bean:write name="netfile" property="fullname"/>"> <bean:write name="netfile" property="name"/> *************** *** 63,67 **** <logic:notEqual name="netfile" property="online" value="true"> <tr class="offline"> ! <td class="offline" width="40%" valign=middle> <img src="pics/file.gif"></b> <a class="offline" title="<bean:write name="netfile" property="fullname"/>"><bean:write name="netfile" property="name"/></a> </td> --- 62,66 ---- <logic:notEqual name="netfile" property="online" value="true"> <tr class="offline"> ! <td class="offline" width="40%" valign=middle> <img src="pics/file.png"></b> <a class="offline" title="<bean:write name="netfile" property="fullname"/>"><bean:write name="netfile" property="name"/></a> </td> *************** *** 82,91 **** <tr> <td bordercolor="#ffa0a0"> ! <img src="pics/computer.gif"> <b><bean:write name="computer" property="name"/></b><br> </td> </tr> <logic:iterate id="netfile" name="computer" property="netFiles"> <tr class="offline"> ! <td class="offline" width="40%" valign=middle> <img src="pics/file.gif"></b> <a class="offline" title="<bean:write name="netfile" property="fullname"/>"><bean:write name="netfile" property="name"/></a> </td> --- 81,90 ---- <tr> <td bordercolor="#ffa0a0"> ! <img src="pics/computer.png"> <b><bean:write name="computer" property="name"/></b><br> </td> </tr> <logic:iterate id="netfile" name="computer" property="netFiles"> <tr class="offline"> ! <td class="offline" width="40%" valign=middle> <img src="pics/file.png"></b> <a class="offline" title="<bean:write name="netfile" property="fullname"/>"><bean:write name="netfile" property="name"/></a> </td> |
From: Marcus <the...@us...> - 2004-03-23 15:14:02
|
Update of /cvsroot/junk/junk/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11093 Modified Files: struts-config.xml web.xml Log Message: splitted junk-config Index: struts-config.xml =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/struts-config.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** struts-config.xml 15 Feb 2004 18:11:30 -0000 1.5 --- struts-config.xml 23 Mar 2004 15:03:21 -0000 1.6 *************** *** 1,23 **** <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> - <!-- ======= Data Source Configuration --> - - <data-sources> - <data-source> - <!-- this is the datasource for our test server system. change the settings to fit your needs --> - <set-property property="url" value="jdbc:mysql://10.0.80.5/smbsearch?autoReconnect=true" /> <!-- change this to your db connect string --> - <set-property property="user" value="reader" /> <!-- change this to your db user --> - <set-property property="password" value="reader" /> <!--change this to your db password --> - - <set-property property="autoCommit" value="false" /> - <set-property property="description" value="Shodan Mysql Datasource Configuration" /> - <set-property property="driverClass" value="org.gjt.mm.mysql.Driver" /> - <set-property property="maxCount" value="4" /> - <set-property property="minCount" value="2" /> - </data-source> - </data-sources> - - <!-- ======================================== Form Bean Definitions --> <form-beans> --- 1,12 ---- <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> + <!-- + YOU SHOULD NOT NEED TO EDIT THIS FILE! + ONLY CHANGE ANYTHING IN HERE + IF YOU KNOW WHAT YOU ARE DOING! + + To adjust the juNK settings, refer to "junk-config.xml" + --> <struts-config> <!-- ======================================== Form Bean Definitions --> <form-beans> *************** *** 94,112 **** </action> - <!-- sample input and input submit actions - <action - path="/Input" - type="org.apache.struts.actions.ForwardAction" - parameter="/pages/Input.jsp"/> - - <action - path="/InputSubmit" - type="app.InputAction" - name="inputForm" - scope="request" - validate="true" - input="/pages/Input.jsp"/> - - end samples --> </action-mappings> --- 83,86 ---- *************** *** 124,205 **** <!-- ======================================= Plug Ins Configuration --> - <!-- ========== Tiles plugin =================== --> - - <!-- --> - - <!-- - - This plugin initialize Tiles definition factory. This later can takes some - - parameters explained here after. The plugin first read parameters from web.xml, then - - overload them with parameters defined here. All parameters are optional. - - The plugin should be declared in each struts-config file. - - - definitions-config: (optional) - - Specify configuration file names. There can be several comma - - separated file names (default: ?? ) - - - moduleAware: (optional - struts1.1) - - Specify if the Tiles definition factory is module aware. If true (default), - - there will be one factory for each Struts module. - - If false, there will be one common factory for all module. In this later case, - - it is still needed to declare one plugin per module. The factory will be - - initialized with parameters found in the first initialized plugin (generally the - - one associated with the default module). - - true : One factory per module. (default) - - false : one single shared factory for all modules - - - definitions-parser-validate: (optional) - - Specify if xml parser should validate the Tiles configuration file. - - true : validate. DTD should be specified in file header. (default) - - false : no validation - - - - Paths found in Tiles definitions are relative to the main context. - - --> - - <!-- comment following if struts1.0.x --> - <plug-in className="org.apache.struts.tiles.TilesPlugin"> - <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" /> - <set-property property="moduleAware" value="true" /> - <set-property property="definitions-parser-validate" value="true" /> - </plug-in> - <!-- end comment if struts1.0.x --> - <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" /> </plug-in> - <plug-in className="junk.plugin.scanner.ScannerPlugin"> - <set-property property="scan-interval" value="300000" /><!--5 minutes --> - <set-property property="thread-sleep" value="10000" /><!--10 seconds--> - <set-property property="ip-range" value="10.0.80.0/24" /><!-- a.b.c.d/s,e.f.g.h/t --> - <set-property property="tcp-timeout" value="100" /><!-- 100 ms --> - <set-property property="map-save-file" value="data/hostmap" /><!-- relative to context root, directory must exist! --> - </plug-in> - - </struts-config> \ No newline at end of file --- 98,110 ---- Index: web.xml =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/web.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** web.xml 18 Nov 2003 18:57:14 -0000 1.2 --- web.xml 23 Mar 2004 15:03:21 -0000 1.3 *************** *** 1 **** ! <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <display-name>juNK Application</display-name> <!-- Standard Action Servlet Configuration (with debugging) --> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <!-- Standard Action Servlet Mapping --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <!-- The Usual Welcome File List --> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <!-- global error mapping --> <error-page> <exception-type>java.lang.OutOfMemoryError</exception-type> <location>/pages/Error.jsp</location> </error-page> <!-- Struts Tag Library Descriptors --> <taglib> <taglib-uri>/tags/struts-bean</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-html</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-logic</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-nested</taglib-uri> <taglib-location>/WEB-INF/struts-nested.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-tiles</taglib-uri> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location> </taglib> </web-app> \ No newline at end of file --- 1 ---- ! <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <display-name>juNK Application</display-name> <!-- Standard Action Servlet Configuration (with debugging) --> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml, /WEB-INF/junk-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <!-- Standard Action Servlet Mapping --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <!-- The Usual Welcome File List --> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <!-- global error mapping --> <error-page> <exception-type>java.lang.OutOfMemoryError</exception-type> <location>/pages/Error.jsp</location> </error-page> <!-- Struts Tag Library Descriptors --> <taglib> <taglib-uri>/tags/struts-bean</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-html</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-logic</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-nested</taglib-uri> <taglib-location>/WEB-INF/struts-nested.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-tiles</taglib-uri> <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location> </taglib> </web-app> \ No newline at end of file |
From: Tyron E. <ty...@us...> - 2004-03-23 14:14:49
|
Update of /cvsroot/junk/junk/pages/pics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30245 Added Files: computer.png Log Message: bla --- NEW FILE: computer.png --- (This appears to be a binary file; contents omitted.) |
From: Tyron E. <ty...@us...> - 2004-03-23 14:14:41
|
Update of /cvsroot/junk/junk/pages/pics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30111 Added Files: logo_fs.png Log Message: .png --- NEW FILE: logo_fs.png --- (This appears to be a binary file; contents omitted.) |
From: Tyron E. <ty...@us...> - 2004-03-23 14:13:53
|
Update of /cvsroot/junk/junk/pages/pics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30010 Added Files: file.png Log Message: png file type --- NEW FILE: file.png --- (This appears to be a binary file; contents omitted.) |
From: Tyron E. <ty...@us...> - 2004-03-23 14:11:21
|
Update of /cvsroot/junk/junk/pages/pics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29554 Removed Files: computer.gif file.gif logo_wh.gif message.gif Log Message: only .png file format for images --- message.gif DELETED --- --- file.gif DELETED --- --- logo_wh.gif DELETED --- --- computer.gif DELETED --- |
From: Marcus <the...@us...> - 2004-03-22 19:31:24
|
Update of /cvsroot/junk/junk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv669 Removed Files: make.xml Log Message: renamed to build.xml --- make.xml DELETED --- |
From: Marcus <the...@us...> - 2004-03-22 17:52:56
|
Update of /cvsroot/junk/junk/META-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11521 Removed Files: MANIFEST.MF Log Message: manifest will now be generated by ant --- MANIFEST.MF DELETED --- |
From: Marcus <the...@us...> - 2004-03-22 16:23:48
|
Update of /cvsroot/junk/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23094 Modified Files: cvswrappers Log Message: binary stuff Index: cvswrappers =================================================================== RCS file: /cvsroot/junk/CVSROOT/cvswrappers,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cvswrappers 11 Nov 2003 12:12:42 -0000 1.1 --- cvswrappers 22 Mar 2004 16:13:22 -0000 1.2 *************** *** 21,23 **** # and value is a single-quote delimited value. # For example: ! #*.gif -k 'b' --- 21,24 ---- # and value is a single-quote delimited value. # For example: ! *.png -k 'b' ! *.jar -k 'b' |
From: Tyron E. <ty...@us...> - 2004-03-22 15:32:01
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11169 Modified Files: style.css Log Message: Added style elements for wio (which is totally superfluous Index: style.css =================================================================== RCS file: /cvsroot/junk/junk/pages/style.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** style.css 18 Dec 2003 09:39:59 -0000 1.4 --- style.css 22 Mar 2004 15:21:43 -0000 1.5 *************** *** 1 **** ! body { font-family: Verdana, Helvetica, sans-serif; font-weight: normal; font-size: 12pt; } table.navigation{ border: 2px solid black; border-spacing: 3px; padding: 0px 0px; background-color: #1F54B5; color: #ffffff; } td.error{ color: white; border: 1px dotted white; } table.online{ border: 1px solid black; border-spacing: 0px; padding: 3px 3px; background-color: #D7D7D7; color: black; } tr.online{ background-color: #D7D7D7; } td.online{ background-color: #D7D7D7; color: black; } table.offline{ border: 1px solid black; border-spacing: 0px; padding: 3px 3px; background-color: #ffa0a0; color: black; } tr.offline{ border: 1px solid black; background-color: #ffa0a0; } td.offline{ background-color: #ffa0a0; } a:hover { color: #1F54B5; } a { text-decoration: none; font-weight: normal; color: black; } td.wio { border-bottom: 1px dotted black; padding-left: 15px; padding-right: 15px; padding-top: 2px; padding-bottom: 0px; text-align: center; white-space: nowrap; } h1.wio { font-size: 22px; color: #000033; } \ No newline at end of file --- 1,102 ---- ! body { ! font-family: Verdana, Helvetica, sans-serif; ! font-weight: normal; ! font-size: 12pt; ! } ! ! table.navigation{ ! border: 2px solid black; ! border-spacing: 2px; ! padding: 0px 0px; ! background-color: #1F54B5; ! color: #ffffff; ! } ! td.navigation{ ! border-right: 1px dotted white; ! } ! ! ! td.error{ ! color: white; ! border: 1px dotted white; ! } ! ! table.online{ ! border: 1px solid black; ! border-spacing: 0px; ! padding: 3px 3px; ! background-color: #D7D7D7; ! color: black; ! } ! ! tr.online{ ! background-color: #D7D7D7; ! } ! ! td.online{ ! background-color: #D7D7D7; ! white-space: nowrap; ! border-top: 1px dotted white; ! color: black; ! } ! ! table.offline{ ! border: 1px dashed black; ! border-spacing: 0px; ! padding: 3px 3px; ! background-color: #e8e8e8; ! color: #666666; ! } ! ! tr.offline{ ! border: 1px solid black; ! background-color: #e8e8e8; ! } ! ! td.offline{ ! white-space: nowrap; ! border-top: 1px dotted white; ! background-color: #e8e8e8; ! } ! ! table.message{ ! border: 2px solid black; ! border-spacing: 2px; ! padding: 0px 0px; ! background-color: #1F54B5; ! color: #ffffff; ! } ! td.message{ ! border-right: 1px dotted white; ! } ! ! ! a.offline{ ! color: #666666; ! } ! ! a:hover { ! color: #1F54B5; ! } ! ! a{ ! text-decoration: none; ! font-weight: normal; ! color: black; ! ! } ! ! td.wio { ! border-bottom: 1px dotted black; ! padding-left: 15px; ! padding-right: 15px; ! padding-top: 2px; ! padding-bottom: 0px; ! text-align: center; ! white-space: nowrap; ! } ! ! h1.wio { ! font-size: 22px; ! color: #000033; ! } \ No newline at end of file |
From: Tyron E. <ty...@us...> - 2004-03-22 15:27:02
|
Update of /cvsroot/junk/junk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9910 Added Files: build.xml Log Message: renamed --- NEW FILE: build.xml --- <?xml version="1.0" encoding="UTF-8"?> <project basedir="WEB-INF/classes/." default="all" name="juNK"> <target name="init"> <echo message="setting central properties" /> <property name="version" value="0.1 alpha" /> <property name="lib-dir" value="../lib" /> </target> <target name="manifest"> <manifest file="../../META-INF/MANIFEST.MF"> <attribute name="Built-By" value="${user.name}"/> <section name="junk"> <attribute name="Specification-Title" value="java useful Net Kollektor"/> <attribute name="Specification-Vendor" value="U. v. Heesch, M. Proest"/> <attribute name="Specification-Version" value="${version}"/> <attribute name="Implementation-Title" value="junk"/> <attribute name="Implementation-Vendor" value="U. v. Heesch, M. Proest"/> <attribute name="Implementation-Version" value="${version}"/> </section> </manifest> </target> <target depends="init, clean-classes" name="compile" description="Compile the classes"> <javac debug="true" deprecation="true" destdir="." srcdir="."> <classpath> <fileset dir="${lib-dir}"> <include name="**/*.jar"/> </fileset> </classpath> </javac> </target> <target depends="init, clean-binary, compile, manifest" name="war" description="Create WAR file"> <war basedir="../../." compress="true" destfile="../../junk.war" webxml="../web.xml" manifest="../../META-INF/MANIFEST.MF" > <exclude name="**/*.java"/> <exclude name="**/*.form"/> <exclude name="**/.nbattrs"/> <exclude name="**/hostmap"/> <exclude name="**/*.war"/> <exclude name="**/.nbintdb"/> <exclude name="**/*~*"/> <exclude name="**/web.xml"/> <exclude name="apidoc"/> <exclude name="make.xml"/> </war> </target> <target depends="clean, javadoc, war" description="Build everything." name="all"> <echo message="Application built." /> </target> <target depends="init, clean-doc" description="javadoc" name="javadoc"> <mkdir dir="../../apidoc"/> <javadoc destdir="../../apidoc" packagenames="junk.*" Windowtitle=" juNK API " Use="true" access="private" > <doctitle>juNK [java usefull Net Kollektor] API Documentation</doctitle> <bottom><![CDATA[<center><a target="_blank" href="http://junk.sf.net">Homepage</a></center>]]></bottom> <link href="http://java.sun.com/j2se/1.4.2/docs/api/" /> <link href="http://jakarta.apache.org/struts/api/" /> <link href="http://jakarta.apache.org/commons/logging/api/" /> <sourcepath> <pathelement location="."/> </sourcepath> <classpath> <fileset dir="${lib-dir}"> <include name="**/*.jar"/> </fileset> </classpath> </javadoc> </target> <target depends="clean-doc, clean-classes, clean-war" description="Clean all build products." name="clean" /> <target depends="clean-classes, clean-war" name="clean-binary" /> <target name="clean-classes"> <delete> <fileset dir="."> <include name="**/*.class"/> </fileset> </delete> </target> <target name="clean-war"> <delete file="../../junk.war"/> </target> <target name="clean-doc"> <delete dir="../../apidoc"/> </target> </project> |
From: Marcus <the...@us...> - 2004-03-22 13:37:27
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/scanner In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16645/plugin/scanner Modified Files: ScannerPlugin.java ScannerConfig.java Log Message: corrected typo Index: ScannerConfig.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/scanner/ScannerConfig.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ScannerConfig.java 21 Mar 2004 17:29:11 -0000 1.4 --- ScannerConfig.java 22 Mar 2004 13:27:08 -0000 1.5 *************** *** 2,6 **** * juNK - a file search system for smb shares * ! * Copyright 2003 by Marcus Proest (theevilflow at users dot sf dot net) * * This file is part of junk (java useful net kollektor). --- 2,8 ---- * juNK - a file search system for smb shares * ! * Copyright 2004 by ! * Marcus Proest (theevilflow at users dot sf dot net) ! * Uwe van Heesch (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). *************** *** 21,26 **** --- 23,31 ---- * */ + package junk.plugin.scanner; + import junk.util.IpSubnet; + import java.io.File; *************** *** 29,34 **** import java.util.Iterator; - import junk.util.IpSubnet; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; --- 34,37 ---- *************** *** 43,84 **** */ public class ScannerConfig { ! /** ! * plugin configuration key defining the sleep time of the scanner thread ! */ protected static final String KEY_THREAD_SLEEP = "thread-sleep"; ! /** plugin configuration key defining the scanning interval */ protected static final String KEY_SCAN_INTERVAL = "scan-interval"; ! /** plugin configuration key defining the ip range */ protected static final String KEY_IP_RANGE = "ip-range"; ! /** plugin configuration key defining the tcp timeout */ protected static final String KEY_TCP_TO = "tcp-timeout"; ! /** plugin configuration key defining the save map path */ protected static final String KEY_SAVE_MAP = "map-save-file"; ! ! /** log writer */ ! private Log log = LogFactory.getLog(ScannerPlugin.class); ! ! /** the time the scannerthread sleeps */ ! private long sleep = 10000; ! ! /** the scanning interval */ ! private long interval = 300000; ! ! /** the tcp timeout */ ! private int tcpTimeout = 100; ! ! /** the path to load and save the hostmap to */ ! private String savemappath = "data/hostmap"; ! /** the ip subnets to scan over */ private ArrayList ipSubnets = null; ! /** initial ipsubnetsString */ private String ipSubnetsString = null; ! /** Creates a new instance of ScannerConfig. * protected standard constructor to prevent instantiation outside --- 46,85 ---- */ public class ScannerConfig { ! /** plugin configuration key defining the sleep time of the scanner thread */ protected static final String KEY_THREAD_SLEEP = "thread-sleep"; ! /** plugin configuration key defining the scanning interval */ protected static final String KEY_SCAN_INTERVAL = "scan-interval"; ! /** plugin configuration key defining the ip range */ protected static final String KEY_IP_RANGE = "ip-range"; ! /** plugin configuration key defining the tcp timeout */ protected static final String KEY_TCP_TO = "tcp-timeout"; ! /** plugin configuration key defining the save map path */ protected static final String KEY_SAVE_MAP = "map-save-file"; ! /** the ip subnets to scan over */ private ArrayList ipSubnets = null; ! ! /** log writer */ ! private Log log = LogFactory.getLog(ScannerPlugin.class); ! /** initial ipsubnetsString */ private String ipSubnetsString = null; ! ! /** the path to load and save the hostmap to */ ! private String savemappath = "data/hostmap"; ! ! /** the tcp timeout */ ! private int tcpTimeout = 100; ! ! /** the scanning interval */ ! private long interval = 300000; ! ! /** the time the scannerthread sleeps */ ! private long sleep = 10000; ! /** Creates a new instance of ScannerConfig. * protected standard constructor to prevent instantiation outside *************** *** 87,91 **** protected ScannerConfig() { } ! /** Creates a new instance of ScannerConfig. * @param m ModuleConfig --- 88,99 ---- protected ScannerConfig() { } ! ! /** To provide a StandAlone config ! * @param h the standalone config ! */ ! protected ScannerConfig(HashMap h) { ! this.applyConfig(h, null); ! } ! /** Creates a new instance of ScannerConfig. * @param m ModuleConfig *************** *** 95,128 **** */ protected ScannerConfig(ActionServlet a, ModuleConfig m) ! throws IllegalArgumentException { HashMap conf = null; PlugInConfig[] pluginConfigs = m.findPlugInConfigs(); ! //get the config... there has to be another way to get it for (int x = 0; x < pluginConfigs.length; x++) { ! if (pluginConfigs[x].getClassName() ! .equals(ScannerPlugin.class.getName())) { conf = (HashMap) pluginConfigs[x].getProperties(); ! break; //leave loop if config found } } ! if (conf == null) { throw new IllegalArgumentException("plugin config not found"); } ! String path = a.getServletContext().getRealPath("/WEB-INF"); ! this.applyConfig(conf, path); } ! ! /** To provide a StandAlone config ! * @param h the standalone config */ ! protected ScannerConfig(HashMap h) { ! this.applyConfig(h, null); } ! /** Apply the config values. * @param conf configuration values --- 103,171 ---- */ protected ScannerConfig(ActionServlet a, ModuleConfig m) ! throws IllegalArgumentException { HashMap conf = null; PlugInConfig[] pluginConfigs = m.findPlugInConfigs(); ! //get the config... there has to be another way to get it for (int x = 0; x < pluginConfigs.length; x++) { ! if (pluginConfigs[x].getClassName().equals(ScannerPlugin.class ! .getName())) { conf = (HashMap) pluginConfigs[x].getProperties(); ! break; //leave loop if config found } } ! if (conf == null) { throw new IllegalArgumentException("plugin config not found"); } ! String path = a.getServletContext().getRealPath("/WEB-INF"); ! this.applyConfig(conf, path); } ! ! /** Returns the interval value. ! * @return returns the interval value */ ! public long getInterval() { ! return this.interval; } ! ! /** Returns the path to the saved hostmap. ! * @return the path to the saved hostmap ! */ ! public String getSaveMapPath() { ! return this.savemappath; ! } ! ! /** Returns the sleep value. ! * @return returns the sleep value ! */ ! public long getSleep() { ! return this.sleep; ! } ! ! /** return the initial ipSubnets String ! * @return initial ipsubnets String ! */ ! public String getSubnets() { ! return this.ipSubnetsString; ! } ! ! /** Returns the tcp timeout value. ! * @return tcp timeout ! */ ! public int getTcpTimeout() { ! return this.tcpTimeout; ! } ! ! /** Returns an iterator over the configured ip subnets. ! * @return an iterator over the configured ip subnets ! */ ! protected Iterator getIpSubnetIterator() { ! return this.ipSubnets.iterator(); ! } ! /** Apply the config values. * @param conf configuration values *************** *** 132,161 **** */ private void applyConfig(HashMap conf, String basepath) ! throws IllegalArgumentException { try { ! this.sleep = Long.parseLong( ! (String) conf.get( ! ScannerConfig.KEY_THREAD_SLEEP)); } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.KEY_THREAD_SLEEP ! + " FAILED, defaulting to " + this.sleep, e); } ! try { ! this.interval = Long.parseLong( ! (String) conf.get( ! ScannerConfig.KEY_SCAN_INTERVAL)); } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.KEY_SCAN_INTERVAL ! + "FAILED, defaulting to " + this.interval, e); } ! try { String subnetConfigs = (String) conf.get(ScannerConfig.KEY_IP_RANGE); this.ipSubnetsString = subnetConfigs; ! String[] scArray = subnetConfigs.split(","); this.ipSubnets = new ArrayList(scArray.length); ! for (int x = 0; x < scArray.length; x++) { this.ipSubnets.add(x, new IpSubnet(scArray[x])); --- 175,202 ---- */ private void applyConfig(HashMap conf, String basepath) ! throws IllegalArgumentException { try { ! this.sleep = Long.parseLong((String) conf.get( ! ScannerConfig.KEY_THREAD_SLEEP)); } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.KEY_THREAD_SLEEP ! + " FAILED, defaulting to " + this.sleep, e); } ! try { ! this.interval = Long.parseLong((String) conf.get( ! ScannerConfig.KEY_SCAN_INTERVAL)); } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.KEY_SCAN_INTERVAL ! + "FAILED, defaulting to " + this.interval, e); } ! try { String subnetConfigs = (String) conf.get(ScannerConfig.KEY_IP_RANGE); this.ipSubnetsString = subnetConfigs; ! String[] scArray = subnetConfigs.split(","); this.ipSubnets = new ArrayList(scArray.length); ! for (int x = 0; x < scArray.length; x++) { this.ipSubnets.add(x, new IpSubnet(scArray[x])); *************** *** 164,231 **** //this value cannot be defaulted, so failing ist fatal. throw new IllegalArgumentException("Loading parameter " ! + ScannerConfig.KEY_IP_RANGE ! + " FAILED. (" + e.getMessage() ! + ")"); } ! try { ! this.tcpTimeout = Integer.parseInt( ! (String) conf.get( ! ScannerConfig.KEY_TCP_TO)); } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.KEY_TCP_TO ! + " FAILED, defaulting to " + this.tcpTimeout, e); } ! try { String filename = (String) conf.get(ScannerConfig.KEY_SAVE_MAP); this.savemappath = basepath + File.separatorChar + ".." ! + File.separatorChar + filename; } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.KEY_SAVE_MAP ! + " FAILED, defaulting to " + this.savemappath, e); } } ! ! /** Returns the sleep value. ! * @return returns the sleep value ! */ ! public long getSleep() { ! return this.sleep; ! } ! ! /** Returns the interval value. ! * @return returns the interval value ! */ ! public long getInterval() { ! return this.interval; ! } ! ! /** Returns the tcp timeout value. ! * @return tcp timeout ! */ ! public int getTcpTimeout() { ! return this.tcpTimeout; ! } ! ! /** Returns an iterator over the configured ip subnets. ! * @return an iterator over the configured ip subnets ! */ ! protected Iterator getIpSubnetIterator() { ! return this.ipSubnets.iterator(); ! } ! ! /** Returns the path to the saved hostmap. ! * @return the path to the saved hostmap ! */ ! public String getSaveMapPath() { ! return this.savemappath; ! } ! ! /** return the initial ipSubnets String ! * @return initial ipsubnets String ! */ ! public String getSubnets() { ! return this.ipSubnetsString; ! } ! } \ No newline at end of file --- 205,228 ---- //this value cannot be defaulted, so failing ist fatal. throw new IllegalArgumentException("Loading parameter " ! + ScannerConfig.KEY_IP_RANGE + " FAILED. (" + e.getMessage() ! + ")"); } ! try { ! this.tcpTimeout = Integer.parseInt((String) conf.get( ! ScannerConfig.KEY_TCP_TO)); } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.KEY_TCP_TO ! + " FAILED, defaulting to " + this.tcpTimeout, e); } ! try { String filename = (String) conf.get(ScannerConfig.KEY_SAVE_MAP); this.savemappath = basepath + File.separatorChar + ".." ! + File.separatorChar + filename; } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.KEY_SAVE_MAP ! + " FAILED, defaulting to " + this.savemappath, e); } } ! } Index: ScannerPlugin.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/scanner/ScannerPlugin.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ScannerPlugin.java 18 Dec 2003 19:17:54 -0000 1.6 --- ScannerPlugin.java 22 Mar 2004 13:27:08 -0000 1.7 *************** *** 2,6 **** * juNK - a file search system for smb shares * ! * Copyright 2003 by Marcus Proest (theevilflow at users dot sf dot net) * * This file is part of junk (java useful net kollektor). --- 2,8 ---- * juNK - a file search system for smb shares * ! * Copyright 2004 by ! * Marcus Proest (theevilflow at users dot sf dot net) ! * Uwe van Heesch (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). *************** *** 21,26 **** --- 23,35 ---- * */ + package junk.plugin.scanner; + import jcifs.netbios.NbtAddress; + + import junk.util.HostMap; + import junk.util.IpSubnet; + import junk.util.NameOnline; + import java.io.FileInputStream; import java.io.FileOutputStream; *************** *** 36,45 **** import javax.servlet.ServletException; - import jcifs.netbios.NbtAddress; - - import junk.util.HostMap; - import junk.util.IpSubnet; - import junk.util.NameOnline; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; --- 45,48 ---- *************** *** 53,65 **** * The main plugin class, wich provides a thread to scan the network. * The collected data is saved in the ActionServlets Servlet Context under the ! * key HOSTS_MAP_KEY. * * @author Marcus Proest (theevilflow at users dot sf dot net) */ public class ScannerPlugin implements PlugIn, Runnable { ! /** the key under which the map is stored in the servlet context ! * @deprecated use KEY_HOSTS_MAP ! * @see ScannerPlugin#KEY_HOSTS_MAP ! */ public static final String HOSTS_MAP_KEY = ScannerPlugin.KEY_HOSTS_MAP; --- 56,65 ---- * The main plugin class, wich provides a thread to scan the network. * The collected data is saved in the ActionServlets Servlet Context under the ! * key KEY_HOSTS_MAP. * * @author Marcus Proest (theevilflow at users dot sf dot net) */ public class ScannerPlugin implements PlugIn, Runnable { ! /** @deprecated use KEY_HOSTS_MAP */ public static final String HOSTS_MAP_KEY = ScannerPlugin.KEY_HOSTS_MAP; *************** *** 76,112 **** private static final int SMB_PORT = 139; ! /** semaphore */ ! private boolean isScanning = false; ! ! /** wether the thread is running. ! * has to be maintained by the thread itself ! */ ! private boolean isRunning = false; ! /** the scanner configuration options */ ! private ScannerConfig conf = null; /** log writer */ private Log log = LogFactory.getLog(ScannerPlugin.class); /** the scanner thread */ private Thread scanThread = null; ! /** the actionservlet of the struts application */ ! private ActionServlet actionServlet = null; ! /** the hostmap */ ! private HostMap hosts = null; ! /** standalone constructor ! * @param sc scannerconfiguration ! */ ! protected ScannerPlugin(ScannerConfig sc) { ! this.conf = sc; } ! /** empty standard constructor ! */ ! public ScannerPlugin() { } --- 76,124 ---- private static final int SMB_PORT = 139; ! /** the actionservlet of the struts application */ ! private ActionServlet actionServlet = null; ! /** the hostmap */ ! private HostMap hosts = null; /** log writer */ private Log log = LogFactory.getLog(ScannerPlugin.class); + /** the scanner configuration options */ + private ScannerConfig conf = null; + /** the scanner thread */ private Thread scanThread = null; ! /** whether the thread is running. ! * has to be maintained by the thread itself ! */ ! private boolean isRunning = false; ! /** semaphore */ ! private boolean isScanning = false; ! /** empty standard constructor */ ! public ScannerPlugin() { } ! /** destroys the plugin. */ ! public void destroy() { ! this.scanThread = null; //the thread will now terminate ! ! /* the server will continue to shutdown as we leave the destroy ! * method. To ensure that we leave our run method in time, we ! * have to wait until isRunning is false. ! * <br /> ! * I know is is not very stylish, but for now i have no better idea ! */ ! while (this.isRunning) { ! ; ! } ! ! this.saveMap(this.hosts); ! ! log.debug("juNK scanner plugin (" + ScannerPlugin.VERSION ! + ") thread terminated"); } *************** *** 117,121 **** */ public void init(ActionServlet a, ModuleConfig m) ! throws ServletException { this.actionServlet = a; --- 129,133 ---- */ public void init(ActionServlet a, ModuleConfig m) ! throws ServletException { this.actionServlet = a; *************** *** 128,138 **** } ! this.actionServlet.getServletContext() ! .setAttribute(ScannerPlugin.KEY_SCANNER_CONFIG, this.conf); ! //load the persistent map and save it in the context ! this.actionServlet.getServletContext() ! .setAttribute(ScannerPlugin.KEY_HOSTS_MAP, this.loadMap()); //start the real thread --- 140,149 ---- } ! this.actionServlet.getServletContext().setAttribute(ScannerPlugin.KEY_SCANNER_CONFIG, ! this.conf); //load the persistent map and save it in the context ! this.actionServlet.getServletContext().setAttribute(ScannerPlugin.KEY_HOSTS_MAP, ! this.loadMap()); //start the real thread *************** *** 143,167 **** log.info("juNK scanner plugin (" + ScannerPlugin.VERSION ! + ") thread started"); ! } ! ! /** destroys the plugin. */ ! public void destroy() { ! this.scanThread = null; //the thread will now terminate ! ! /* the server will continue to shutdown as we leave the destroy ! * method. To ensure that we leave our run method in time, we ! * have to wait until isRunning is false. ! * <br /> ! * I know is is not very stylish, but for now i have no better idea ! */ ! while (this.isRunning) { ! ; ! } ! ! this.saveMap(this.hosts); ! ! log.debug("juNK scanner plugin (" + ScannerPlugin.VERSION ! + ") thread terminated"); } --- 154,158 ---- log.info("juNK scanner plugin (" + ScannerPlugin.VERSION ! + ") thread started"); } *************** *** 182,186 **** //every 'interval' milliseconds ! if ((System.currentTimeMillis() % (this.conf.getInterval())) <= this.conf.getSleep()) { this.scan(); } --- 173,178 ---- //every 'interval' milliseconds ! if ((System.currentTimeMillis() % (this.conf.getInterval())) <= this.conf ! .getSleep()) { this.scan(); } *************** *** 190,277 **** } ! /** standalone wrapper method ! * @return HostMap containing NameOnline values ! */ ! protected HostMap performScan() { ! this.scan(true); ! ! return this.hosts; ! } ! ! /** same as scan(true) ! * @return see scan(boolean) ! * @see ScannerPlugin#scan(boolean) ! */ ! private synchronized boolean scan() { ! return this.scan(false); ! } ! ! /** scans the net. ! * @return <CODE>true</CODE> if the scan was performed. ! * @param standalone true, if the method is started standalone ! * (out of struts) ! */ ! private synchronized boolean scan(boolean standalone) { ! if (this.isScanning) { ! return false; //semaphore, to be sure ! } ! ! this.isScanning = true; //set the semaphore ! ! //get the old hostmap ! if (!standalone) { //if not standalone get it from struts ! this.hosts = (HostMap) this.actionServlet.getServletContext() ! .getAttribute(ScannerPlugin.HOSTS_MAP_KEY); ! } else { //or, if standalone, apply an empty one ! this.hosts = this.populateMap(); ! } ! ! //get subnet iterator ! Iterator iterator = this.conf.getIpSubnetIterator(); ! ! //iterate over the subnet ! while (iterator.hasNext()) { ! //get an IpSubnet clone ! IpSubnet i = (IpSubnet) ((IpSubnet) iterator.next()).clone(); ! ! long start = System.currentTimeMillis(); //to get a scanningtime ! ! while (i.hasNext()) { ! String ip = (String) i.next(); //get next IP ! ! if (this.isSmb(ip)) { //the host is handled as 'online' ! this.hosts.put(ip, ! new NameOnline(this.getNetBiosName(ip), ! Boolean.TRUE)); ! } else { //the host is handled as 'offline' ! ! //get the old values to preserve the name ! NameOnline no = (NameOnline) hosts.get(ip); ! ! no.setOnline(Boolean.FALSE); //set it offline ! ! this.hosts.put(ip, no); //save it ! ! //maybe the thread wants to terminate while we are in here ! if ((this.scanThread == null) && !standalone) { ! return false; ! } ! } ! } ! ! //calculate scanning time ! long time = System.currentTimeMillis() - start; ! log.info(i.toString() + " scan completed in " + time + " ms"); ! } ! ! //store the results in the context ! if (!standalone) { ! this.actionServlet.getServletContext() ! .setAttribute(ScannerPlugin.HOSTS_MAP_KEY, hosts); ! } ! ! this.isScanning = false; ! ! return true; } --- 182,187 ---- } ! protected void setConf(ScannerConfig conf) { ! this.conf = conf; } *************** *** 310,316 **** try { //try to connect to the smb port ! sock.connect(new InetSocketAddress(ip, ScannerPlugin.SMB_PORT), ! this.conf.getTcpTimeout()); ! //if it worked, close it again --- 220,225 ---- try { //try to connect to the smb port ! sock.connect(new InetSocketAddress(ip, ScannerPlugin.SMB_PORT), ! this.conf.getTcpTimeout()); //if it worked, close it again *************** *** 325,346 **** } - /** serialize the hostmap and save it. - * @param h hostmap to save - */ - private void saveMap(HostMap h) { - String path = this.conf.getSaveMapPath(); - - try { - FileOutputStream f = new FileOutputStream(path); - ObjectOutputStream o = new ObjectOutputStream(f); - o.writeObject(h); - o.close(); - f.close(); - log.info("Hostmap saved (" + path + ")"); - } catch (Exception e) { - log.warn("Could not save hostmap", e); - } - } - /** load an deserialize the hostmap. * @return loaded map --- 234,237 ---- *************** *** 358,362 **** log.info("Loaded persistent data map (" + path + ")"); } catch (Exception e) { ! h = populateMap(); //if there is no data, populate map log.warn("No persistent data map found", e); } --- 249,253 ---- log.info("Loaded persistent data map (" + path + ")"); } catch (Exception e) { ! h = populateMap(); //if there is no data, populate map log.warn("No persistent data map found", e); } *************** *** 366,370 **** /** populates a HostMap with inital NameOnline values. ! * @return a HostMap with inital NameOnlien values */ private HostMap populateMap() { --- 257,261 ---- /** populates a HostMap with inital NameOnline values. ! * @return a HostMap with inital NameOnline values */ private HostMap populateMap() { *************** *** 384,389 **** } ! protected void setConf(ScannerConfig conf) { ! this.conf = conf; } ! } \ No newline at end of file --- 275,356 ---- } ! /** serialize the hostmap and save it. ! * @param h hostmap to save ! */ ! private void saveMap(HostMap h) { ! String path = this.conf.getSaveMapPath(); ! ! try { ! FileOutputStream f = new FileOutputStream(path); ! ObjectOutputStream o = new ObjectOutputStream(f); ! o.writeObject(h); ! o.close(); ! f.close(); ! log.info("Hostmap saved (" + path + ")"); ! } catch (Exception e) { ! log.warn("Could not save hostmap", e); ! } } ! ! /** scans the net. ! * @return <CODE>true</CODE> if the scan was performed. ! * @param standalone true, if the method is started standalone ! * (out of struts) ! */ ! private synchronized boolean scan() { ! if (this.isScanning) { ! return false; //semaphore, to be sure ! } ! ! this.isScanning = true; //set the semaphore ! ! //get the old hostmap ! this.hosts = (HostMap) this.actionServlet.getServletContext() ! .getAttribute(ScannerPlugin.KEY_HOSTS_MAP); ! ! //get subnet iterator ! Iterator iterator = this.conf.getIpSubnetIterator(); ! ! //iterate over the subnet ! while (iterator.hasNext()) { ! //get an IpSubnet clone ! IpSubnet i = (IpSubnet) ((IpSubnet) iterator.next()).clone(); ! ! long start = System.currentTimeMillis(); //to get a scanningtime ! ! while (i.hasNext()) { ! String ip = (String) i.next(); //get next IP ! ! if (this.isSmb(ip)) { //the host is handled as 'online' ! this.hosts.put(ip, ! new NameOnline(this.getNetBiosName(ip), Boolean.TRUE)); ! } else { //the host is handled as 'offline' ! ! //get the old values to preserve the name ! NameOnline no = (NameOnline) hosts.get(ip); ! ! no.setOnline(Boolean.FALSE); //set it offline ! ! this.hosts.put(ip, no); //save it ! ! //maybe the thread wants to terminate while we are in here ! if ((this.scanThread == null)) { ! return false; ! } ! } ! } ! ! //calculate scanning time ! long time = System.currentTimeMillis() - start; ! log.info(i.toString() + " scan completed in " + time + " ms"); ! } ! ! //store the results in the context ! this.actionServlet.getServletContext().setAttribute(ScannerPlugin.KEY_HOSTS_MAP, ! hosts); ! ! this.isScanning = false; ! ! return true; ! } ! } |
From: Marcus <the...@us...> - 2004-03-22 13:37:25
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16645/util Modified Files: HostIteratorProvider.java HostMap.java IpSubnet.java Log Message: corrected typo Index: HostIteratorProvider.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/HostIteratorProvider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HostIteratorProvider.java 18 Dec 2003 15:26:01 -0000 1.1 --- HostIteratorProvider.java 22 Mar 2004 13:27:08 -0000 1.2 *************** *** 1,6 **** ! /* * juNK - a file search system for smb shares * ! * Copyright 2003 by Marcus Proest (theevilflow at users dot sf dot net) * * This file is part of junk (java useful net kollektor). --- 1,8 ---- ! /* * juNK - a file search system for smb shares * ! * Copyright 2004 by ! * Marcus Proest (theevilflow at users dot sf dot net) ! * Uwe van Heesch (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). *************** *** 21,24 **** --- 23,27 ---- * */ + package junk.util; *************** *** 31,42 **** */ public interface HostIteratorProvider { - /** get an Iterator over the online IP's - * @return an Iterator over the online IP's - */ - public Iterator getOnlineIpStringIterator(); - /** get an Iterator over online Computer Objects * @return an Iterator over online Computer Objects */ public Iterator getOnlineComputerIterator(); ! } \ No newline at end of file --- 34,45 ---- */ public interface HostIteratorProvider { /** get an Iterator over online Computer Objects * @return an Iterator over online Computer Objects */ public Iterator getOnlineComputerIterator(); ! ! /** get an Iterator over the online IP's ! * @return an Iterator over the online IP's ! */ ! public Iterator getOnlineIpStringIterator(); ! } Index: HostMap.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/HostMap.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HostMap.java 22 Mar 2004 12:34:09 -0000 1.4 --- HostMap.java 22 Mar 2004 13:27:08 -0000 1.5 *************** *** 4,8 **** * Copyright 2004 by * Marcus Proest (theevilflow at users dot sf dot net) ! * Uwe van Heeschh (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). --- 4,8 ---- * Copyright 2004 by * Marcus Proest (theevilflow at users dot sf dot net) ! * Uwe van Heesch (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). Index: IpSubnet.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/IpSubnet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IpSubnet.java 22 Mar 2004 12:17:52 -0000 1.2 --- IpSubnet.java 22 Mar 2004 13:27:08 -0000 1.3 *************** *** 4,8 **** * Copyright 2004 by * Marcus Proest (theevilflow at users dot sf dot net) ! * Uwe van Heeschh (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). --- 4,8 ---- * Copyright 2004 by * Marcus Proest (theevilflow at users dot sf dot net) ! * Uwe van Heesch (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). |
From: Marcus <the...@us...> - 2004-03-22 12:44:27
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5629 Modified Files: HostMap.java Log Message: new code conventions Index: HostMap.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/HostMap.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** HostMap.java 18 Dec 2003 15:27:22 -0000 1.3 --- HostMap.java 22 Mar 2004 12:34:09 -0000 1.4 *************** *** 2,6 **** * juNK - a file search system for smb shares * ! * Copyright 2003 by Marcus Proest (theevilflow at users dot sf dot net) * * This file is part of junk (java useful net kollektor). --- 2,8 ---- * juNK - a file search system for smb shares * ! * Copyright 2004 by ! * Marcus Proest (theevilflow at users dot sf dot net) ! * Uwe van Heeschh (tyron_e at users dot sf dot net) * * This file is part of junk (java useful net kollektor). *************** *** 21,32 **** * */ package junk.util; import java.util.HashMap; import java.util.Iterator; import java.util.Map; - import junk.util.NameOnline; - /** Hashmap Wrapper to provide additional functionality --- 23,35 ---- * */ + package junk.util; + import junk.util.NameOnline; + import java.util.HashMap; import java.util.Iterator; import java.util.Map; /** Hashmap Wrapper to provide additional functionality *************** *** 34,38 **** --- 37,50 ---- */ public class HostMap extends HashMap implements HostIteratorProvider, Map { + /** returns an Iterator over the online computers + * @see junk.util.Computer + * @return an Iterator over the online computers + */ + public Iterator getOnlineComputerIterator() { + return new OnlineComputerIterator(this); + } + /** returns an Iterator over the online ip addresses + * @see junk.util.NameOnline * @return an Iterator over the online ip addresses */ *************** *** 41,48 **** } - public Iterator getOnlineComputerIterator() { - return new OnlineComputerIterator(this); - } - /** implements an iterator over the online ip addresses */ class OnlineIpStringIterator implements Iterator { --- 53,56 ---- *************** *** 65,69 **** } ! /** Returns true if the iteration has more elements. (In other words, * returns true if next would return an element rather than throwing * an exception.) --- 73,77 ---- } ! /** Returns true if the iteration has more elements. (In other words, * returns true if next would return an element rather than throwing * an exception.) *************** *** 73,82 **** public boolean hasNext() { while (this.keys.hasNext()) { ! if (((NameOnline) this.h.get(ip)).getOnline() ! .equals(Boolean.TRUE)) { return true; //return true if we get an online ip } - //if it was false (or null), try the next one this.ip = (String) this.keys.next(); --- 81,88 ---- public boolean hasNext() { while (this.keys.hasNext()) { ! if (((NameOnline) this.h.get(ip)).getOnline().equals(Boolean.TRUE)) { return true; //return true if we get an online ip } //if it was false (or null), try the next one this.ip = (String) this.keys.next(); *************** *** 88,97 **** /** Returns the next element in the iteration. * @return the next element in the iteration. - * */ public Object next() { while (this.keys.hasNext()) { ! if (((NameOnline) this.h.get(ip)).getOnline() ! .equals(Boolean.TRUE)) { String temp = this.ip; //save current value this.ip = (String) keys.next(); //forward iterator --- 94,101 ---- /** Returns the next element in the iteration. * @return the next element in the iteration. */ public Object next() { while (this.keys.hasNext()) { ! if (((NameOnline) this.h.get(ip)).getOnline().equals(Boolean.TRUE)) { String temp = this.ip; //save current value this.ip = (String) keys.next(); //forward iterator *************** *** 133,137 **** } ! /** Returns true if the iteration has more elements. (In other words, * returns true if next would return an element rather than throwing * an exception.) --- 137,141 ---- } ! /** Returns true if the iteration has more elements. (In other words, * returns true if next would return an element rather than throwing * an exception.) *************** *** 141,150 **** public boolean hasNext() { while (this.keys.hasNext()) { ! if (((NameOnline) this.h.get(ip)).getOnline() ! .equals(Boolean.TRUE)) { return true; //return true if we get an online ip } - //if it was false (or null), try the next one this.ip = (String) this.keys.next(); --- 145,152 ---- public boolean hasNext() { while (this.keys.hasNext()) { ! if (((NameOnline) this.h.get(ip)).getOnline().equals(Boolean.TRUE)) { return true; //return true if we get an online ip } //if it was false (or null), try the next one this.ip = (String) this.keys.next(); *************** *** 160,165 **** public Object next() { while (this.keys.hasNext()) { ! if (((NameOnline) this.h.get(ip)).getOnline() ! .equals(Boolean.TRUE)) { //assemble Computer Computer c = new Computer(); --- 162,166 ---- public Object next() { while (this.keys.hasNext()) { ! if (((NameOnline) this.h.get(ip)).getOnline().equals(Boolean.TRUE)) { //assemble Computer Computer c = new Computer(); *************** *** 187,189 **** } } ! } \ No newline at end of file --- 188,190 ---- } } ! } |
From: Marcus <the...@us...> - 2004-03-22 12:41:54
|
Update of /cvsroot/junk/junk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5045 Modified Files: make.xml Log Message: additional manifest information Index: make.xml =================================================================== RCS file: /cvsroot/junk/junk/make.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** make.xml 22 Mar 2004 05:55:36 -0000 1.3 --- make.xml 22 Mar 2004 12:31:24 -0000 1.4 *************** *** 12,24 **** <attribute name="Built-By" value="${user.name}"/> <section name="junk"> ! <!--<attribute name="Sealed" value="true"/>--> </section> </manifest> ! </target> ! <target depends="init, clean-classes" name="compile" description="Compile the classes"> <javac debug="true" deprecation="true" destdir="." srcdir="."> <classpath> ! <fileset dir="${lib-dir}"> <include name="**/*.jar"/> </fileset> --- 12,29 ---- <attribute name="Built-By" value="${user.name}"/> <section name="junk"> ! <attribute name="Specification-Title" value="java useful Net Kollektor"/> ! <attribute name="Specification-Vendor" value="U. v. Heesch, M. Proest"/> ! <attribute name="Specification-Version" value="${version}"/> ! <attribute name="Implementation-Title" value="junk"/> ! <attribute name="Implementation-Vendor" value="U. v. Heesch, M. Proest"/> ! <attribute name="Implementation-Version" value="${version}"/> </section> </manifest> ! </target> ! <target depends="init, clean-classes" name="compile" description="Compile the classes"> <javac debug="true" deprecation="true" destdir="." srcdir="."> <classpath> ! <fileset dir="${lib-dir}"> <include name="**/*.jar"/> </fileset> *************** *** 27,31 **** </target> ! <target depends="init,clean-binary,compile, manifest" name="war" description="Create WAR file"> <war basedir="../../." --- 32,36 ---- </target> ! <target depends="init, clean-binary, compile, manifest" name="war" description="Create WAR file"> <war basedir="../../." *************** *** 35,39 **** manifest="../../META-INF/MANIFEST.MF" > - <exclude name="**/*.java"/> <exclude name="**/*.form"/> --- 40,43 ---- *************** *** 49,53 **** </target> ! <target depends="clean, javadoc,war" description="Build everything." name="all"> <echo message="Application built." /> </target> --- 53,57 ---- </target> ! <target depends="clean, javadoc, war" description="Build everything." name="all"> <echo message="Application built." /> </target> |