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: <the...@us...> - 2003-12-18 09:37:28
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1:/tmp/cvs-serv2571 Modified Files: Info.jsp Log Message: wio Index: Info.jsp =================================================================== RCS file: /cvsroot/junk/junk/pages/Info.jsp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Info.jsp 17 Nov 2003 19:39:08 -0000 1.1.1.1 --- Info.jsp 18 Dec 2003 09:37:25 -0000 1.2 *************** *** 1,3 **** ! <!-- /* * juNK - a file search system for smb shares --- 1,3 ---- ! <% /* * juNK - a file search system for smb shares *************** *** 21,40 **** * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! */--> <%@ taglib uri="/tags/struts-bean" prefix="bean" %> <%@ taglib uri="/tags/struts-html" prefix="html" %> <%@ taglib uri="/tags/struts-logic" prefix="logic" %> <center> ! <table border="0" width="70%"> ! <tr> ! <td align="center" valign="middle" height="25%" width="100%"> ! <bean:message key="search.info" /> ! </td> ! <td align="center" valign="middle" width="40"> ! <h1><bean:message key="search.title"/></h1> ! </td> ! </tr> ! </table> </center> <br /> --- 21,49 ---- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! */ ! %> ! <%@ taglib uri="/tags/struts-bean" prefix="bean" %> <%@ taglib uri="/tags/struts-html" prefix="html" %> <%@ taglib uri="/tags/struts-logic" prefix="logic" %> + <%@ taglib uri="/tags/struts-tiles" prefix="tiles" %> <center> ! <table border="0" width="99%"> ! <tr> ! <td align="center" width="94%"> ! <bean:message key="search.info" /> ! </td> ! <td rowspan="2" valign="top" width="5%" align="right"> ! <h1><bean:message key="search.title" /></h1> ! </td> ! </tr> ! <tr> ! <td> ! <br /><br /> ! <tiles:insert page="/WhoIsOnline.do" flush="true" /> ! </td> ! </tr> ! </table> </center> <br /> |
From: <the...@us...> - 2003-12-18 09:35:56
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1:/tmp/cvs-serv2240 Modified Files: Search.jsp Log Message: enhancements Index: Search.jsp =================================================================== RCS file: /cvsroot/junk/junk/pages/Search.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Search.jsp 20 Nov 2003 23:42:33 -0000 1.3 --- Search.jsp 18 Dec 2003 09:35:52 -0000 1.4 *************** *** 1,3 **** ! <!-- /* * juNK - a file search system for smb shares --- 1,5 ---- ! <%@page contentType="text/html"%><?xml version="1.0" encoding="iso-8859-1" ?> ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ! <% /* * juNK - a file search system for smb shares *************** *** 20,25 **** * along with junk; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */--> <%@ taglib uri="/tags/struts-bean" prefix="bean" %> <%@ taglib uri="/tags/struts-html" prefix="html" %> --- 22,27 ---- * along with junk; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! %> <%@ taglib uri="/tags/struts-bean" prefix="bean" %> <%@ taglib uri="/tags/struts-html" prefix="html" %> *************** *** 111,115 **** </tr> </table> ! <hr noshade> <logic:present name="searchResult"> <jsp:include page="Result.jsp"/> --- 113,117 ---- </tr> </table> ! <hr noshade="noshade"> <logic:present name="searchResult"> <jsp:include page="Result.jsp"/> *************** *** 118,122 **** <jsp:include page="Info.jsp"/> </logic:notPresent> ! <hr noshade> <center> <bean:message key="search.disclaimer"/> --- 120,124 ---- <jsp:include page="Info.jsp"/> </logic:notPresent> ! <hr noshade="noshade"> <center> <bean:message key="search.disclaimer"/> |
From: <the...@us...> - 2003-12-18 09:15:18
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1:/tmp/cvs-serv31505 Modified Files: WhoIsOnline.jsp Log Message: styling Index: WhoIsOnline.jsp =================================================================== RCS file: /cvsroot/junk/junk/pages/WhoIsOnline.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WhoIsOnline.jsp 17 Dec 2003 23:05:40 -0000 1.2 --- WhoIsOnline.jsp 18 Dec 2003 09:15:15 -0000 1.3 *************** *** 1,4 **** - <%@page contentType="text/html"%><?xml version="1.0" encoding="iso-8859-1" ?> - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <% /* --- 1,2 ---- *************** *** 26,48 **** <%@ taglib uri="/tags/struts-html" prefix="html" %> <%@ taglib uri="/tags/struts-logic" prefix="logic" %> ! ! <html:html locale="true"> ! <head> ! <title>WhoIsOnline</title> ! <html:base /> ! <link href="style.css" rel="stylesheet" type="text/css"> ! <script language="JavaScript" src="functions.js" type="text/javascript"></script> ! </head> ! <body> ! <center> ! <h2>Jetzt Online:</h2> <table> <logic:iterate id="row" name="wio-iterator" scope="request"> <tr> <logic:iterate id="host" name="row"> ! <td style="border-bottom: 1px dotted black;"align="center" nowrap="nowrap"> ! <a href="file://<bean:write name="host" property="ip"/>"> <bean:write name="host" property="name"/> ! </a> </td> </logic:iterate> --- 24,44 ---- <%@ taglib uri="/tags/struts-html" prefix="html" %> <%@ taglib uri="/tags/struts-logic" prefix="logic" %> ! <!--wio--> ! <center> ! <a title="Hosts online: <bean:write name="wio-num-online" />"> ! <h1 class="wio">Jetzt Online:</h1> ! </a> <table> <logic:iterate id="row" name="wio-iterator" scope="request"> <tr> <logic:iterate id="host" name="row"> ! <td class="wio" nowrap="nowrap"> ! <a ! href="file://<bean:write name="host" property="ip"/>" ! title="<bean:write name="host" property="ip"/>" ! target="_blank" ! > <bean:write name="host" property="name"/> ! </a> </td> </logic:iterate> *************** *** 51,54 **** </table> </center> ! </body> ! </html:html> \ No newline at end of file --- 47,49 ---- </table> </center> ! <!--/wio--> \ No newline at end of file |
From: <the...@us...> - 2003-12-18 09:14:35
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/controller In directory sc8-pr-cvs1:/tmp/cvs-serv31401 Modified Files: WhoIsOnlineAction.java Log Message: speed enhancements Index: WhoIsOnlineAction.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/controller/WhoIsOnlineAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WhoIsOnlineAction.java 17 Dec 2003 23:06:59 -0000 1.2 --- WhoIsOnlineAction.java 18 Dec 2003 09:14:32 -0000 1.3 *************** *** 44,51 **** /** * ! * @author flow */ public class WhoIsOnlineAction extends Action { public static final String KEY_ONLINE_ITERATOR = "wio-iterator"; public ActionForward execute(ActionMapping actionMapping, --- 44,52 ---- /** * ! * @author mp */ public class WhoIsOnlineAction extends Action { public static final String KEY_ONLINE_ITERATOR = "wio-iterator"; + public static final String KEY_NUM_ONLINE = "wio-num-online"; public ActionForward execute(ActionMapping actionMapping, *************** *** 57,61 **** .getAttribute(ScannerPlugin.KEY_HOSTS_MAP); ! Iterator i = hosts.keySet().iterator(); TreeSet sortedOnline = new TreeSet(); --- 58,62 ---- .getAttribute(ScannerPlugin.KEY_HOSTS_MAP); ! Iterator i = hosts.getOnlineIterator(); TreeSet sortedOnline = new TreeSet(); *************** *** 64,85 **** NameOnline no = (NameOnline) hosts.get(ip); ! if (no.getOnline().equals(Boolean.TRUE)) { ! Computer c = new Computer(); ! c.setIp(ip); ! c.setName(no.getName()); ! c.setNetFiles(null); ! c.setOnline(no.getOnline()); ! sortedOnline.add(c); ! } } i = sortedOnline.iterator(); ! int w = 4; //this will be a parameter ! ! //modulo stuff to get even values (yes... i know) ! int h = ((sortedOnline.size() % w) + sortedOnline.size()) / w; ArrayList col = new ArrayList(); --- 65,82 ---- NameOnline no = (NameOnline) hosts.get(ip); ! Computer c = new Computer(); ! c.setIp(ip); ! c.setName(no.getName()); ! c.setNetFiles(null); ! c.setOnline(no.getOnline()); ! sortedOnline.add(c); } i = sortedOnline.iterator(); ! int w = 3; //this will be a parameter + int h = (sortedOnline.size() / w) + 1; ArrayList col = new ArrayList(); *************** *** 97,107 **** } ! if (i.hasNext()) { ! col.add(row); ! } else { ! break; ! } } //free mem as soon as possible --- 94,103 ---- } ! col.add(row); } + httpServletRequest.setAttribute(KEY_ONLINE_ITERATOR, col); + httpServletRequest.setAttribute(KEY_NUM_ONLINE, new Integer(sortedOnline.size())); + //free mem as soon as possible *************** *** 109,114 **** hosts = null; i = null; - - httpServletRequest.setAttribute(KEY_ONLINE_ITERATOR, col); return actionMapping.findForward("wio"); --- 105,108 ---- |
From: <the...@us...> - 2003-12-17 23:07:03
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/controller In directory sc8-pr-cvs1:/tmp/cvs-serv7465 Modified Files: WhoIsOnlineAction.java Log Message: sorting and hard coded rows, but slow.... Index: WhoIsOnlineAction.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/controller/WhoIsOnlineAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WhoIsOnlineAction.java 17 Dec 2003 16:59:12 -0000 1.1 --- WhoIsOnlineAction.java 17 Dec 2003 23:06:59 -0000 1.2 *************** *** 23,26 **** --- 23,30 ---- package junk.controller; + import java.util.ArrayList; + import java.util.Iterator; + import java.util.TreeSet; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; *************** *** 28,32 **** --- 32,38 ---- import junk.plugin.scanner.ScannerPlugin; + import junk.util.Computer; import junk.util.HostMap; + import junk.util.NameOnline; import org.apache.struts.action.Action; *************** *** 51,75 **** .getAttribute(ScannerPlugin.KEY_HOSTS_MAP); ! java.util.Iterator i = hosts.keySet().iterator(); ! ! java.util.TreeSet l = new java.util.TreeSet(); while (i.hasNext()) { String ip = (String) i.next(); ! junk.util.NameOnline no = (junk.util.NameOnline) hosts.get(ip); ! junk.util.Computer c = new junk.util.Computer(); ! c.setIp(ip); ! c.setName(no.getName()); ! c.setNetFiles(null); ! c.setOnline(no.getOnline()); ! l.add(c); } //free mem as soon as possible hosts = null; i = null; ! httpServletRequest.setAttribute(KEY_ONLINE_ITERATOR, l); return actionMapping.findForward("wio"); --- 57,114 ---- .getAttribute(ScannerPlugin.KEY_HOSTS_MAP); ! Iterator i = hosts.keySet().iterator(); ! TreeSet sortedOnline = new TreeSet(); while (i.hasNext()) { String ip = (String) i.next(); ! NameOnline no = (NameOnline) hosts.get(ip); ! ! if (no.getOnline().equals(Boolean.TRUE)) { ! Computer c = new Computer(); ! ! c.setIp(ip); ! c.setName(no.getName()); ! c.setNetFiles(null); ! c.setOnline(no.getOnline()); ! sortedOnline.add(c); ! } ! } ! ! i = sortedOnline.iterator(); ! ! int w = 4; //this will be a parameter ! ! //modulo stuff to get even values (yes... i know) ! int h = ((sortedOnline.size() % w) + sortedOnline.size()) / w; ! ! ArrayList col = new ArrayList(); ! ! for (int x = 0; x < h; x++) { ! ArrayList row = new ArrayList(); ! ! for (int j = 0; j < w; j++) { ! if (i.hasNext()) { ! Computer c = (Computer) i.next(); ! ! row.add(c); ! } else { ! break; ! } ! } ! ! if (i.hasNext()) { ! col.add(row); ! } else { ! break; ! } } //free mem as soon as possible + sortedOnline = null; hosts = null; i = null; ! httpServletRequest.setAttribute(KEY_ONLINE_ITERATOR, col); return actionMapping.findForward("wio"); |
From: <the...@us...> - 2003-12-17 23:05:43
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1:/tmp/cvs-serv7110 Modified Files: WhoIsOnline.jsp Log Message: sort of works now Index: WhoIsOnline.jsp =================================================================== RCS file: /cvsroot/junk/junk/pages/WhoIsOnline.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WhoIsOnline.jsp 17 Dec 2003 16:58:27 -0000 1.1 --- WhoIsOnline.jsp 17 Dec 2003 23:05:40 -0000 1.2 *************** *** 36,44 **** <body> <center> ! <logic:iterate id="host" name="wio-iterator" scope="request"> ! <logic:equal name="host" value="true" property="online"> ! <a href="file://<bean:write name="host" property="ip"/>"><bean:write name="host" property="name"/></a><br /> ! </logic:equal> ! </logic:iterate> </center> </body> --- 36,53 ---- <body> <center> ! <h2>Jetzt Online:</h2> ! <table> ! <logic:iterate id="row" name="wio-iterator" scope="request"> ! <tr> ! <logic:iterate id="host" name="row"> ! <td style="border-bottom: 1px dotted black;"align="center" nowrap="nowrap"> ! <a href="file://<bean:write name="host" property="ip"/>"> ! <bean:write name="host" property="name"/> ! </a> ! </td> ! </logic:iterate> ! </tr> ! </logic:iterate> ! </table> </center> </body> |
From: <the...@us...> - 2003-12-17 21:26:37
|
Update of /cvsroot/junk/junk/WEB-INF In directory sc8-pr-cvs1:/tmp/cvs-serv17738 Modified Files: struts-config.xml Log Message: minor change (yes, i feel guilty) Index: struts-config.xml =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/struts-config.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** struts-config.xml 17 Dec 2003 17:02:24 -0000 1.3 --- struts-config.xml 17 Dec 2003 21:26:34 -0000 1.4 *************** *** 71,75 **** <action path="/Search" type="org.apache.struts.actions.ForwardAction" parameter="/pages/Search.jsp" /> ! <action path="/WIO" type="junk.controller.WhoIsOnlineAction"> <forward name="wio" path="/pages/WhoIsOnline.jsp" /> </action> --- 71,75 ---- <action path="/Search" type="org.apache.struts.actions.ForwardAction" parameter="/pages/Search.jsp" /> ! <action path="/WhoIsOnline" type="junk.controller.WhoIsOnlineAction"> <forward name="wio" path="/pages/WhoIsOnline.jsp" /> </action> |
From: <the...@us...> - 2003-12-17 17:02:27
|
Update of /cvsroot/junk/junk/WEB-INF In directory sc8-pr-cvs1:/tmp/cvs-serv23246 Modified Files: struts-config.xml Log Message: wio Index: struts-config.xml =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/struts-config.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** struts-config.xml 17 Dec 2003 15:03:22 -0000 1.2 --- struts-config.xml 17 Dec 2003 17:02:24 -0000 1.3 *************** *** 63,67 **** <forward name="error" path="/Error.jsp" /> <forward name="config" path="/Config.do" /> - <forward name="wio" path="/WIO.do" /> </global-forwards> --- 63,66 ---- *************** *** 72,76 **** <action path="/Search" type="org.apache.struts.actions.ForwardAction" parameter="/pages/Search.jsp" /> ! <action path="/WIO" type="org.apache.struts.actions.ForwardAction" parameter="/pages/WhoIsOnline.jsp" /> <action path="/Config" --- 71,77 ---- <action path="/Search" type="org.apache.struts.actions.ForwardAction" parameter="/pages/Search.jsp" /> ! <action path="/WIO" type="junk.controller.WhoIsOnlineAction"> ! <forward name="wio" path="/pages/WhoIsOnline.jsp" /> ! </action> <action path="/Config" |
From: <the...@us...> - 2003-12-17 17:00:06
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1:/tmp/cvs-serv22394 Modified Files: NameOnline.java Computer.java Log Message: implemented Comparable Index: NameOnline.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/NameOnline.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NameOnline.java 25 Nov 2003 12:05:57 -0000 1.6 --- NameOnline.java 17 Dec 2003 17:00:02 -0000 1.7 *************** *** 33,37 **** *@version 0.1 */ ! public class NameOnline implements Serializable { /** name of the resource */ private String name; --- 33,37 ---- *@version 0.1 */ ! public class NameOnline implements Serializable, Comparable { /** name of the resource */ private String name; *************** *** 93,95 **** --- 93,100 ---- return this.getName() + " " + this.getOnline(); } + + public int compareTo(Object o) { + return -((NameOnline)o).getName().compareTo(this.getName()); + } + } Index: Computer.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/Computer.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Computer.java 17 Nov 2003 19:39:59 -0000 1.1.1.1 --- Computer.java 17 Dec 2003 17:00:02 -0000 1.2 *************** *** 25,29 **** import java.util.*; ! public class Computer{ private Boolean online = new Boolean(false); --- 25,29 ---- import java.util.*; ! public class Computer implements Comparable { private Boolean online = new Boolean(false); *************** *** 84,87 **** --- 84,90 ---- } + public int compareTo(Object o) { + return -((Computer)o).getName().compareTo(this.getName()); + } } |
From: <the...@us...> - 2003-12-17 16:59:15
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/controller In directory sc8-pr-cvs1:/tmp/cvs-serv22162 Added Files: WhoIsOnlineAction.java Log Message: initial release --- NEW FILE: WhoIsOnlineAction.java --- /* * 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 usefull 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.controller; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import junk.plugin.scanner.ScannerPlugin; import junk.util.HostMap; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * * @author flow */ public class WhoIsOnlineAction extends Action { public static final String KEY_ONLINE_ITERATOR = "wio-iterator"; public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletRespone) throws Exception { HostMap hosts = (HostMap) getServlet().getServletContext() .getAttribute(ScannerPlugin.KEY_HOSTS_MAP); java.util.Iterator i = hosts.keySet().iterator(); java.util.TreeSet l = new java.util.TreeSet(); while (i.hasNext()) { String ip = (String) i.next(); junk.util.NameOnline no = (junk.util.NameOnline) hosts.get(ip); junk.util.Computer c = new junk.util.Computer(); c.setIp(ip); c.setName(no.getName()); c.setNetFiles(null); c.setOnline(no.getOnline()); l.add(c); } //free mem as soon as possible hosts = null; i = null; httpServletRequest.setAttribute(KEY_ONLINE_ITERATOR, l); return actionMapping.findForward("wio"); } } |
From: <the...@us...> - 2003-12-17 16:58:32
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1:/tmp/cvs-serv21867 Added Files: WhoIsOnline.jsp Log Message: initial release --- NEW FILE: WhoIsOnline.jsp --- <%@page contentType="text/html"%><?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <% /* * (c) 2003 by Marcus Proest * * This file is part of junk (java usefull 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 * */ %> <%@ taglib uri="/tags/struts-bean" prefix="bean" %> <%@ taglib uri="/tags/struts-html" prefix="html" %> <%@ taglib uri="/tags/struts-logic" prefix="logic" %> <html:html locale="true"> <head> <title>WhoIsOnline</title> <html:base /> <link href="style.css" rel="stylesheet" type="text/css"> <script language="JavaScript" src="functions.js" type="text/javascript"></script> </head> <body> <center> <logic:iterate id="host" name="wio-iterator" scope="request"> <logic:equal name="host" value="true" property="online"> <a href="file://<bean:write name="host" property="ip"/>"><bean:write name="host" property="name"/></a><br /> </logic:equal> </logic:iterate> </center> </body> </html:html> |
From: <the...@us...> - 2003-12-17 15:03:24
|
Update of /cvsroot/junk/junk/WEB-INF In directory sc8-pr-cvs1:/tmp/cvs-serv29338 Modified Files: struts-config.xml Log Message: WIO; Config Index: struts-config.xml =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/struts-config.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** struts-config.xml 17 Nov 2003 19:39:33 -0000 1.1.1.1 --- struts-config.xml 17 Dec 2003 15:03:22 -0000 1.2 *************** *** 39,42 **** --- 39,50 ---- </form-bean> + <form-bean name="configForm" type="org.apache.struts.action.DynaActionForm"> + <form-property name="scanInterval" type="java.lang.Long"/> + <form-property name="threadSleep" type="java.lang.Long"/> + <form-property name="ipRange" type="java.lang.String"/> + <form-property name="tcpTimeout" type="java.lang.Integer"/> + <form-property name="mapSaveFile" type="java.lang.String"/> + </form-bean> + </form-beans> *************** *** 45,75 **** <global-exceptions> - - - - <!-- sample exception handler - - - - <exception - - - - key="expired.password" - - - - type="app.ExpiredPasswordException" - - - - path="/changePassword.jsp"/> - - - - end sample --> - - - </global-exceptions> --- 53,56 ---- *************** *** 81,85 **** <forward name="search" path="/Search.do" /> <forward name="error" path="/Error.jsp" /> ! </global-forwards> --- 62,67 ---- <forward name="search" path="/Search.do" /> <forward name="error" path="/Error.jsp" /> ! <forward name="config" path="/Config.do" /> ! <forward name="wio" path="/WIO.do" /> </global-forwards> *************** *** 88,92 **** <action-mappings> ! <action path="/Search" type="org.apache.struts.actions.ForwardAction" parameter="/pages/Search.jsp" /> <action path="/searchProcessor" type="junk.controller.SearchAction" name="searchForm" scope="request" validate="true" input="/pages/Search.jsp"> --- 70,85 ---- <action-mappings> ! <action path="/Search" type="org.apache.struts.actions.ForwardAction" parameter="/pages/Search.jsp" /> ! ! <action path="/WIO" type="org.apache.struts.actions.ForwardAction" parameter="/pages/WhoIsOnline.jsp" /> ! ! <action path="/Config" ! type="junk.controller.ConfigurationAction" ! name="configForm" ! scope="request" ! validate="true" ! input="/pages/admin/Config.jsp"> ! <forward name="config" path="/pages/admin/Config.jsp" /> ! </action> <action path="/searchProcessor" type="junk.controller.SearchAction" name="searchForm" scope="request" validate="true" input="/pages/Search.jsp"> *************** *** 97,101 **** <forward name="message" path="/pages/Message.jsp" /> </action> ! <!-- sample input and input submit actions <action --- 90,94 ---- <forward name="message" path="/pages/Message.jsp" /> </action> ! <!-- sample input and input submit actions <action |
From: <the...@us...> - 2003-12-16 10:56:02
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/scanner In directory sc8-pr-cvs1:/tmp/cvs-serv778 Modified Files: ScannerPlugin.java Log Message: minor changes Index: ScannerPlugin.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/scanner/ScannerPlugin.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ScannerPlugin.java 26 Nov 2003 20:36:49 -0000 1.3 --- ScannerPlugin.java 16 Dec 2003 10:55:58 -0000 1.4 *************** *** 57,61 **** * @author Marcus Proest (theevilflow at users dot sf dot net) * @todo implement multithreaded scanning - * @version 0.1 */ public class ScannerPlugin implements PlugIn, Runnable { --- 57,60 ---- *************** *** 124,131 **** this.conf = new ScannerConfig(a, m); } catch (IllegalArgumentException e) { ! log.fatal("Loading config failed.", e); ! this.destroy(); //if some argument was illegal ! return; // we are out of here } --- 123,129 ---- this.conf = new ScannerConfig(a, m); } catch (IllegalArgumentException e) { ! log.fatal("Loading config FAILED. This is FATAL.", e); ! return; // if some argument was illegal we are out of here } *************** *** 154,159 **** /* 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. ! *i know is is not very stylish, but for now i have no better idea */ while (this.isRunning) { --- 152,158 ---- /* 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) { *************** *** 181,186 **** ; //wake up, neo } - - log.debug("this is the scanner plugin. i'm alive."); //every 'interval' milliseconds --- 180,183 ---- |
From: <the...@us...> - 2003-12-16 10:55:27
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/scanner In directory sc8-pr-cvs1:/tmp/cvs-serv706 Modified Files: ScannerConfig.java Log Message: minor changes Index: ScannerConfig.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/scanner/ScannerConfig.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ScannerConfig.java 25 Nov 2003 12:08:50 -0000 1.2 --- ScannerConfig.java 16 Dec 2003 10:55:15 -0000 1.3 *************** *** 4,8 **** * Copyright 2003 by Marcus Proest (theevilflow at users dot sf dot net) * ! * This file is part of junk (java usefull net kollektor). * * junk is free software; you can redistribute it and/or modify --- 4,8 ---- * Copyright 2003 by Marcus Proest (theevilflow 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 *************** *** 41,45 **** /** handles the config of the scanner plugin. * @author Marcus Proest (theevilflow at users dot sf dot net) - * @version 0.1 */ public class ScannerConfig { --- 41,44 ---- *************** *** 78,82 **** /** the ip subnets to scan over */ private ArrayList ipSubnets = null; ! /** initial ipsubnetsString */ private String ipSubnetsString = null; --- 77,82 ---- /** the ip subnets to scan over */ private ArrayList ipSubnets = null; ! ! /** initial ipsubnetsString */ private String ipSubnetsString = null; *************** *** 117,126 **** this.applyConfig(conf, path); } ! /** To provide a StandAlone config * @param h the standalone config ! */ protected ScannerConfig(HashMap h) { ! this.applyConfig(h,null); } --- 117,126 ---- this.applyConfig(conf, path); } ! /** To provide a StandAlone config * @param h the standalone config ! */ protected ScannerConfig(HashMap h) { ! this.applyConfig(h, null); } *************** *** 139,143 **** } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.THREAD_SLEEP_KEY ! + " failed, defaulting to " + this.sleep, e); } --- 139,143 ---- } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.THREAD_SLEEP_KEY ! + " FAILED, defaulting to " + this.sleep, e); } *************** *** 148,152 **** } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.SCAN_INTERVAL_KEY ! + "failed, defaulting to " + this.interval, e); } --- 148,152 ---- } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.SCAN_INTERVAL_KEY ! + "FAILED, defaulting to " + this.interval, e); } *************** *** 163,169 **** } catch (Exception e) { //this value cannot be defaulted, so failing ist fatal. ! log.fatal("Loading parameter " + ScannerConfig.IP_RANGE_KEY ! + " failed. This is fatal.", e); ! throw new IllegalArgumentException(); } --- 163,170 ---- } catch (Exception e) { //this value cannot be defaulted, so failing ist fatal. ! throw new IllegalArgumentException("Loading parameter " ! + ScannerConfig.IP_RANGE_KEY ! + " FAILED. (" + e.getMessage() ! + ")"); } *************** *** 174,178 **** } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.TCP_TO_KEY ! + " failed, defaulting to " + this.tcpTimeout, e); } --- 175,179 ---- } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.TCP_TO_KEY ! + " FAILED, defaulting to " + this.tcpTimeout, e); } *************** *** 183,187 **** } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.SAVE_MAP_KEY ! + " failed, defaulting to " + this.savemappath, e); } } --- 184,188 ---- } catch (Exception e) { log.warn("Loading parameter " + ScannerConfig.SAVE_MAP_KEY ! + " FAILED, defaulting to " + this.savemappath, e); } } *************** *** 224,228 **** /** return the initial ipSubnets String * @return initial ipsubnets String ! */ public String getSubnets() { return this.ipSubnetsString; --- 225,229 ---- /** return the initial ipSubnets String * @return initial ipsubnets String ! */ public String getSubnets() { return this.ipSubnetsString; |
From: <the...@us...> - 2003-12-16 10:54:28
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/scanner In directory sc8-pr-cvs1:/tmp/cvs-serv486 Modified Files: Scanner.java Log Message: minor changes Index: Scanner.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/plugin/scanner/Scanner.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Scanner.java 26 Nov 2003 20:30:26 -0000 1.3 --- Scanner.java 16 Dec 2003 10:54:25 -0000 1.4 *************** *** 31,35 **** /** Wrapper for standalone use * @author Marcus Proest (theevilflow at users dot sf dot net) - * @version 0.1 */ public class Scanner { --- 31,34 ---- *************** *** 69,76 **** * @param args - */ ! public static void main(String[] args) { Scanner s = new Scanner("10.0.80.0/24", 100); ! HostMap h = s.scan(); ! java.util.Iterator i = h.onlineIterator(); int x = 0; --- 68,75 ---- * @param args - */ ! /* public static void main(String[] args) { Scanner s = new Scanner("10.0.80.0/24", 100); ! junk.util.OnlineIteratorProvider h = s.scan(); ! java.util.Iterator i = h.getOnlineIterator(); int x = 0; *************** *** 79,82 **** System.out.println(x + " " + i.next()); } ! } } --- 78,81 ---- System.out.println(x + " " + i.next()); } ! }*/ } |
From: <the...@us...> - 2003-12-16 10:53:38
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1:/tmp/cvs-serv334 Modified Files: HostMap.java Log Message: implemented OnlineIteratorProvider Index: HostMap.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/HostMap.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HostMap.java 26 Nov 2003 20:26:53 -0000 1.1 --- HostMap.java 16 Dec 2003 10:53:31 -0000 1.2 *************** *** 25,28 **** --- 25,29 ---- import java.util.HashMap; import java.util.Iterator; + import java.util.Map; import junk.util.NameOnline; *************** *** 30,40 **** /** Hashmap Wrapper to provide additional functionality ! * @author flow */ ! public class HostMap extends HashMap { /** returns an Iterator over the online ip addresses * @return an Iterator over the online ip addresses */ ! public Iterator onlineIterator() { return new OnlineIterator(this); } --- 31,41 ---- /** Hashmap Wrapper to provide additional functionality ! * @author Marcus Proest (theevilflow at users dot sf dot net) */ ! public class HostMap extends HashMap implements OnlineIteratorProvider, Map { /** returns an Iterator over the online ip addresses * @return an Iterator over the online ip addresses */ ! public Iterator getOnlineIterator() { return new OnlineIterator(this); } *************** *** 70,76 **** if (((NameOnline) this.h.get(ip)).getOnline() .equals(Boolean.TRUE)) { ! return true; } this.ip = (String) this.keys.next(); } --- 71,79 ---- 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(); } *************** *** 87,94 **** if (((NameOnline) this.h.get(ip)).getOnline() .equals(Boolean.TRUE)) { ! String temp = this.ip; ! this.ip = (String) keys.next(); ! return temp; } --- 90,97 ---- if (((NameOnline) this.h.get(ip)).getOnline() .equals(Boolean.TRUE)) { ! String temp = this.ip; //save current value ! this.ip = (String) keys.next(); //forward iterator ! return temp; //return value } *************** *** 96,100 **** } ! //if there is no next key, hasNext should return false throw new java.util.NoSuchElementException(); } --- 99,103 ---- } ! //if there is no next key, hasNext would return false throw new java.util.NoSuchElementException(); } |
From: <the...@us...> - 2003-12-16 10:52:34
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1:/tmp/cvs-serv32599 Added Files: OnlineIteratorProvider.java Log Message: initial release --- NEW FILE: OnlineIteratorProvider.java --- /* * 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). * * 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.util; import java.util.Iterator; /** * Interface to provide an Iterator over the Online IP's * @author Marcus Proest (theevilflow at users dot sf dot net) */ public interface OnlineIteratorProvider { /** get an Iterator over the online IP's * @return an Iterator over the online IP's */ public Iterator getOnlineIterator(); } |
From: <ty...@us...> - 2003-12-09 23:17:11
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1:/tmp/cvs-serv12695 Modified Files: style.css Log Message: added elements for message.jsp Index: style.css =================================================================== RCS file: /cvsroot/junk/junk/pages/style.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** style.css 20 Nov 2003 23:43:18 -0000 1.2 --- style.css 9 Dec 2003 23:17:07 -0000 1.3 *************** *** 7,15 **** table.navigation{ border: 2px solid black; ! border-spacing: 3px; padding: 0px 0px; background-color: #1F54B5; color: #ffffff; } td.error{ --- 7,19 ---- 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{ *************** *** 32,53 **** 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; } --- 36,77 ---- 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; } |
From: <ty...@us...> - 2003-12-09 23:16:42
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1:/tmp/cvs-serv12501 Modified Files: Message.jsp Log Message: added Style elements Index: Message.jsp =================================================================== RCS file: /cvsroot/junk/junk/pages/Message.jsp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Message.jsp 17 Nov 2003 19:39:08 -0000 1.1.1.1 --- Message.jsp 9 Dec 2003 23:16:39 -0000 1.2 *************** *** 38,76 **** <html:form action="/messageProcessor" focus="message"> <center> ! <table border="1" cellpadding="1" cellspacing="0" bgcolor="#ffffff"> <tr> ! <td bgcolor="#4D694d"> ! <font color="white"><bean:message key="message.destination"/>: </font> </td> ! <td bgcolor="#4D694d"> <html:text property="destHost" readonly="true" size="50"/> </td> </tr> <tr> ! <td bgcolor="#4D694d"> ! <font color="white"><bean:message key="message.email"/>: </font> </td> ! <td bgcolor="#4D694d"> <html:text property="email" size="50" maxlength="50"/> </td> </tr> <tr> ! <td bgcolor="#4D694d"> ! <font color="white"><bean:message key="message.icq"/>: </font> </td> ! <td bgcolor="#4D694d"> <html:text property="icq" size="50" maxlength="50"/> </td> </tr> <tr> ! <td bgcolor="#4D694d"> ! <font color="white">* <bean:message key="message.message"/>: </font> </td> ! <td bgcolor="#4D694d"> <html:textarea property="message" cols="55" rows="10"/> </td> </tr> <tr> ! <td bgcolor="#4D694d" colspan="2" align="right"> <html:submit><bean:message key="message.send"/></html:submit> </td> --- 38,76 ---- <html:form action="/messageProcessor" focus="message"> <center> ! <table class="message"> <tr> ! <td class="message"> ! <bean:message key="message.destination"/>: </td> ! <td class="message"> <html:text property="destHost" readonly="true" size="50"/> </td> </tr> <tr> ! <td class="message"> ! <bean:message key="message.email"/>: </td> ! <td class="message"> <html:text property="email" size="50" maxlength="50"/> </td> </tr> <tr> ! <td class="message"> ! <bean:message key="message.icq"/>: </td> ! <td class="message"> <html:text property="icq" size="50" maxlength="50"/> </td> </tr> <tr> ! <td class="message"> ! * <bean:message key="message.message"/>: </td> ! <td class="message"> <html:textarea property="message" cols="55" rows="10"/> </td> </tr> <tr> ! <td class="message" colspan="2" align="right"> <html:submit><bean:message key="message.send"/></html:submit> </td> *************** *** 84,88 **** <logic:present name="gesendet"> ! <table border="0" width="100%" height="100%"> <tr> <td align="center" valign="middle"> --- 84,88 ---- <logic:present name="gesendet"> ! <table class="message" border="0" width="100%" height="100%"> <tr> <td align="center" valign="middle"> |
From: <ty...@us...> - 2003-12-09 23:09:50
|
Update of /cvsroot/junk/junk/pages In directory sc8-pr-cvs1:/tmp/cvs-serv11324 Modified Files: Result.jsp Log Message: removed j-script tags Index: Result.jsp =================================================================== RCS file: /cvsroot/junk/junk/pages/Result.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Result.jsp 20 Nov 2003 23:41:39 -0000 1.2 --- Result.jsp 9 Dec 2003 23:09:47 -0000 1.3 *************** *** 45,50 **** <logic:iterate id="netfile" name="computer" property="netFiles"> <logic:equal name="netfile" property="online" value="true"> ! <tr onmouseout="setPointer(this, 1, 'out' , '#D7D7D7', '#CACACA', '#D7D7D7');" onmouseover="setPointer(this, 1, 'over' , '#D7D7D7', '#CACACA', '#D7D7D7');"> ! <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,50 ---- <logic:iterate id="netfile" name="computer" property="netFiles"> <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"/> *************** *** 64,68 **** <tr class="offline"> <td class="offline" width="40%" valign=middle> <img src="pics/file.gif"></b> ! <a title="<bean:write name="netfile" property="fullname"/>"><bean:write name="netfile" property="name"/></a> </td> <td class="offline" width="50%" vailgn=middle> --- 64,68 ---- <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> <td class="offline" width="50%" vailgn=middle> *************** *** 88,92 **** <tr class="offline"> <td class="offline" width="40%" valign=middle> <img src="pics/file.gif"></b> ! <a title="<bean:write name="netfile" property="fullname"/>"><bean:write name="netfile" property="name"/></a> </td> <td class="offline" width="50%" vailgn=middle> --- 88,92 ---- <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> <td class="offline" width="50%" vailgn=middle> |
From: <ty...@us...> - 2003-12-09 15:57:25
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1:/tmp/cvs-serv20749 Modified Files: SmbMessage.java Log Message: Index: SmbMessage.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/SmbMessage.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SmbMessage.java 17 Nov 2003 19:39:59 -0000 1.1.1.1 --- SmbMessage.java 9 Dec 2003 15:57:21 -0000 1.2 *************** *** 24,48 **** import java.io.*; import java.net.*; public class SmbMessage { ! ! public static boolean sendMessage(String destHost, String srcHost, String message){ boolean retValue = false; ! try{ URL myUrl = SmbMessage.class.getResource("smbMessage.sh"); ! String[] envp = {"host="+destHost,"from="+srcHost,"message="+message}; ! Process myProcess = Runtime.getRuntime().exec(myUrl.getFile(), envp); ! BufferedReader in = new BufferedReader(new InputStreamReader(myProcess.getInputStream())); ! String returnValue = in.readLine(); ! if(returnValue.equals("0")){ retValue = true; } ! } ! catch(Exception ex){ ex.printStackTrace(); } return retValue; } ! ! } --- 24,56 ---- import java.io.*; + import java.net.*; + public class SmbMessage { ! public static boolean sendMessage(String destHost, String srcHost, ! String message) { boolean retValue = false; ! ! try { URL myUrl = SmbMessage.class.getResource("smbMessage.sh"); ! String[] envp = { ! "host=" + destHost, "from=" + srcHost, "message=" + message ! }; ! Process myProcess = Runtime.getRuntime() ! .exec(myUrl.getFile(), envp); ! BufferedReader in = new BufferedReader( ! new InputStreamReader( ! myProcess.getInputStream())); ! String returnValue = in.readLine(); ! ! if (returnValue.equals("0")) { retValue = true; } ! } catch (Exception ex) { ex.printStackTrace(); } + return retValue; } ! } \ No newline at end of file |
From: <ty...@us...> - 2003-12-09 15:57:03
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1:/tmp/cvs-serv20685 Modified Files: SizeCalculator.java Log Message: Index: SizeCalculator.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/SizeCalculator.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SizeCalculator.java 17 Nov 2003 19:39:59 -0000 1.1.1.1 --- SizeCalculator.java 9 Dec 2003 15:57:00 -0000 1.2 *************** *** 25,51 **** import java.math.*; - public class SizeCalculator{ public static final long KB = 1024; public static final long MB = 1048576; public static final long GB = 1073741824; - - public static String getNiceSize(long byteSize){ - String niceSize; - BigDecimal resultDecimal; - resultDecimal = new BigDecimal(byteSize); ! if ( byteSize > MB ) ! niceSize = "" + resultDecimal.divide(new BigDecimal(MB),2, ! BigDecimal.ROUND_UP). ! doubleValue() + " MB"; ! else if (byteSize > KB) niceSize = "" + ! resultDecimal.divide(new BigDecimal(KB),2, ! BigDecimal.ROUND_UP).doubleValue() + " KB"; ! ! else niceSize = "" + byteSize + " B"; ! ! return niceSize; ! } ! } --- 25,55 ---- import java.math.*; + public class SizeCalculator { public static final long KB = 1024; public static final long MB = 1048576; public static final long GB = 1073741824; ! public static String getNiceSize(long byteSize) { ! String niceSize; ! BigDecimal resultDecimal; ! resultDecimal = new BigDecimal(byteSize); ! if (byteSize > MB) { ! niceSize = "" ! + resultDecimal.divide(new BigDecimal(MB), 2, ! BigDecimal.ROUND_UP) ! .doubleValue() + " MB"; ! } else if (byteSize > KB) { ! niceSize = "" ! + resultDecimal.divide(new BigDecimal(KB), 2, ! BigDecimal.ROUND_UP) ! .doubleValue() + " KB"; ! } ! else { ! niceSize = "" + byteSize + " B"; ! } ! ! return niceSize; ! } ! } \ No newline at end of file |
From: <ty...@us...> - 2003-12-09 15:56:43
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1:/tmp/cvs-serv20623 Modified Files: SearchProperties.java Log Message: Index: SearchProperties.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/SearchProperties.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SearchProperties.java 17 Nov 2003 19:39:59 -0000 1.1.1.1 --- SearchProperties.java 9 Dec 2003 15:56:40 -0000 1.2 *************** *** 25,34 **** import java.util.*; /** Helper Bean for values from the search ActionForm * @author Uwe van Heesch (tyron_E at users dot sf dot net) * @version 0.01 */ ! public class SearchProperties implements java.io.Serializable{ ! private Boolean online; private Boolean newFiles; --- 25,34 ---- import java.util.*; + /** Helper Bean for values from the search ActionForm * @author Uwe van Heesch (tyron_E at users dot sf dot net) * @version 0.01 */ ! public class SearchProperties implements java.io.Serializable { private Boolean online; private Boolean newFiles; *************** *** 38,163 **** private String searchString; private String unit; ! private Collection hosts; // for future use ! private Integer newInterval; //for future use; ! ! /** empty constructor for SearchProperties */ ! public SearchProperties(){ online = Boolean.FALSE; newFiles = Boolean.FALSE; ! searchOptions=""; ! size=""; count = new Integer(100); ! searchString=""; ! unit=""; hosts = new ArrayList(); newInterval = new Integer(0); } ! /** Sets the online field to passed Value * @param online Boolean online ! */ ! public void setOnline(Boolean online){ ! if(online != null) this.online = online; ! else this.online = Boolean.FALSE; } ! /** Sets the newFiles field to the passed value * @param newFiles Boolean newFiles true if only new results are to be shown ! */ ! public void setNewFiles(Boolean newFiles){ ! if(newFiles != null) this.newFiles = newFiles; ! else this.newFiles = Boolean.FALSE; } ! /** Sets the searchOptions field to passed value * @param searchOptions String searchOptions passes ether music, videos, all aor pictures ! */ ! public void setSearchOptions(String searchOptions){ this.searchOptions = searchOptions; } ! /** Sets the size field to passed value * @param size String size. Possible values: 0-10, 10-100,100-1000 ! */ ! public void setSize(String size){ this.size = size; } ! /** Sets the count field to the passed value * @param count Integer count sets the number of desired Results ! */ ! public void setCount(Integer count){ this.count = count; } ! /** Sets the searchString field to the passed value * @param searchString String searchString the whitespace seperated list of search words * ! */ ! public void setSearchString(String searchString){ this.searchString = searchString; } ! /** Sets the unit field to the passed value * @param unit String unit Possible values: B, KB, MB ! */ ! public void setUnit(String unit){ this.unit = unit; ! } ! ! /** Returns the value of the online field * @return Boolean The value of the online field ! */ ! public Boolean getOnline(){ return online; } ! /** Returns the value of the field newFiles * @return Boolean : True if only new results are to be shown ! */ ! public Boolean getNewFiles(){ return newFiles; } ! /** Return the value of the field searchOptions * @return String The search options. Possible values: music, videos, images, all ! */ ! public String getSearchOptions(){ return searchOptions; } ! /** return the value of the field size * @return String : The wanted file size without unit * ! */ ! public String getSize(){ return size; } ! /** Return the value of the field count * @return Integer The number of wanted results per computer ! */ ! public Integer getCount(){ return count; } ! /** Return the value of the field searchString * @return String The searchstring ! */ ! public String getSearchString(){ return searchString; } ! /** Return the value of the field unit * @return String The unit of the file size. Possible values: B,KB,MB ! */ ! public String getUnit(){ return unit; ! } ! ! } ! --- 38,163 ---- private String searchString; private String unit; ! private Collection hosts; // for future use ! private Integer newInterval; //for future use; ! ! /** empty constructor for SearchProperties */ ! public SearchProperties() { online = Boolean.FALSE; newFiles = Boolean.FALSE; ! searchOptions = ""; ! size = ""; count = new Integer(100); ! searchString = ""; ! unit = ""; hosts = new ArrayList(); newInterval = new Integer(0); } ! /** Sets the online field to passed Value * @param online Boolean online ! */ ! public void setOnline(Boolean online) { ! if (online != null) { this.online = online; ! } else { ! this.online = Boolean.FALSE; ! } } ! /** Sets the newFiles field to the passed value * @param newFiles Boolean newFiles true if only new results are to be shown ! */ ! public void setNewFiles(Boolean newFiles) { ! if (newFiles != null) { this.newFiles = newFiles; ! } else { this.newFiles = Boolean.FALSE; + } } ! /** Sets the searchOptions field to passed value * @param searchOptions String searchOptions passes ether music, videos, all aor pictures ! */ ! public void setSearchOptions(String searchOptions) { this.searchOptions = searchOptions; } ! /** Sets the size field to passed value * @param size String size. Possible values: 0-10, 10-100,100-1000 ! */ ! public void setSize(String size) { this.size = size; } ! /** Sets the count field to the passed value * @param count Integer count sets the number of desired Results ! */ ! public void setCount(Integer count) { this.count = count; } ! /** Sets the searchString field to the passed value * @param searchString String searchString the whitespace seperated list of search words * ! */ ! public void setSearchString(String searchString) { this.searchString = searchString; } ! /** Sets the unit field to the passed value * @param unit String unit Possible values: B, KB, MB ! */ ! public void setUnit(String unit) { this.unit = unit; ! } ! /** Returns the value of the online field * @return Boolean The value of the online field ! */ ! public Boolean getOnline() { return online; } ! /** Returns the value of the field newFiles * @return Boolean : True if only new results are to be shown ! */ ! public Boolean getNewFiles() { return newFiles; } ! /** Return the value of the field searchOptions * @return String The search options. Possible values: music, videos, images, all ! */ ! public String getSearchOptions() { return searchOptions; } ! /** return the value of the field size * @return String : The wanted file size without unit * ! */ ! public String getSize() { return size; } ! /** Return the value of the field count * @return Integer The number of wanted results per computer ! */ ! public Integer getCount() { return count; } ! /** Return the value of the field searchString * @return String The searchstring ! */ ! public String getSearchString() { return searchString; } ! /** Return the value of the field unit * @return String The unit of the file size. Possible values: B,KB,MB ! */ ! public String getUnit() { return unit; ! } ! } \ No newline at end of file |
From: <ty...@us...> - 2003-12-09 15:56:20
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1:/tmp/cvs-serv20558 Modified Files: ResultProperties.java Log Message: Index: ResultProperties.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/ResultProperties.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ResultProperties.java 17 Nov 2003 19:39:59 -0000 1.1.1.1 --- ResultProperties.java 9 Dec 2003 15:56:17 -0000 1.2 *************** *** 23,68 **** package junk.util; ! public class ResultProperties{ ! private int anzComputer = 0; private int anzDateien = 0; private String linkPrefix = ""; private Long searchTime = null; ! ! public ResultProperties(){ } ! public void setAnzComputer(int anzComputer){ this.anzComputer = anzComputer; } ! ! public void setAnzDateien(int anzDateien){ this.anzDateien = anzDateien; } ! ! public int getAnzDateien(){ return this.anzDateien; } ! ! public int getAnzComputer(){ return this.anzComputer; } ! ! public String getLinkPrefix(){ return this.linkPrefix; } ! ! public void setLinkPrefix(String linkPrefix){ this.linkPrefix = linkPrefix; } ! ! public Long getSearchTime(){ return this.searchTime; } - - public void setSearchTime(Long searchTime){ - this.searchTime = searchTime; - } - } - --- 23,65 ---- package junk.util; ! public class ResultProperties { private int anzComputer = 0; private int anzDateien = 0; private String linkPrefix = ""; private Long searchTime = null; ! ! public ResultProperties() { } ! public void setAnzComputer(int anzComputer) { this.anzComputer = anzComputer; } ! ! public void setAnzDateien(int anzDateien) { this.anzDateien = anzDateien; } ! ! public int getAnzDateien() { return this.anzDateien; } ! ! public int getAnzComputer() { return this.anzComputer; } ! ! public String getLinkPrefix() { return this.linkPrefix; } ! ! public void setLinkPrefix(String linkPrefix) { this.linkPrefix = linkPrefix; } ! ! public Long getSearchTime() { return this.searchTime; } + public void setSearchTime(Long searchTime) { + this.searchTime = searchTime; + } + } \ No newline at end of file |
From: <ty...@us...> - 2003-12-09 15:55:58
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1:/tmp/cvs-serv20486 Modified Files: NetFile.java Log Message: Index: NetFile.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/NetFile.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** NetFile.java 17 Nov 2003 19:39:59 -0000 1.1.1.1 --- NetFile.java 9 Dec 2003 15:55:54 -0000 1.2 *************** *** 26,31 **** ! public class NetFile{ ! private String location; private ArrayList path; --- 26,30 ---- ! public class NetFile { private String location; private ArrayList path; *************** *** 36,50 **** private String createDate; private String lastOnline; // private String online; private Boolean online; // private String linkPrefix; ! ! ! public NetFile(String location){ this.location = location; path = new ArrayList(); } ! ! public NetFile(){ location = ""; ip = ""; --- 35,49 ---- private String createDate; private String lastOnline; + // private String online; private Boolean online; + // private String linkPrefix; ! public NetFile(String location) { this.location = location; path = new ArrayList(); } ! ! public NetFile() { location = ""; ip = ""; *************** *** 54,64 **** lastOnline = ""; fullname = ""; // linkPrefix = ""; path = new ArrayList(); online = Boolean.FALSE; } ! ! ! public void setLocation(String location){ int countTokens = 0; String aktToken = ""; --- 53,64 ---- lastOnline = ""; fullname = ""; + + // linkPrefix = ""; path = new ArrayList(); online = Boolean.FALSE; } ! ! public void setLocation(String location) { int countTokens = 0; String aktToken = ""; *************** *** 66,159 **** location = location.substring(6); this.location = location; ! ! StringTokenizer t = new StringTokenizer(location,"/"); countTokens = t.countTokens(); ! ! while(t.hasMoreTokens()){ ! if (countTokens == t.countTokens()){ ! this.ip = t.nextToken(); ! } ! else if (t.countTokens() == 1){ String tmpName = t.nextToken(); this.fullname = tmpName; ! if(tmpName.length() <= 43) this.name = tmpName; ! else this.name = tmpName.substring(0,20) + "..." + tmpName.substring(tmpName.length()-20); ! } ! else{ aktToken = t.nextToken(); ! fullPath += aktToken + "/"; ! path.add(new FileMap(aktToken,fullPath)); ! } ! } } ! public void setName(String name){ this.name = name; } ! ! public void setSize(String size){ ! this.size = size ; // String.valueOf(Long.parseLong(size)/1048576); } ! ! public void setCreateDate(String createDate){ this.createDate = createDate; } ! ! public void setLastOnline(String lastOnline){ this.lastOnline = lastOnline; } ! ! public void setIp(String ip){ this.ip = ip; } ! ! public String getIp(){ return this.ip; } ! ! public String getLocation(){ return this.location; } ! public String getName(){ return this.name; } ! ! public String getSize(){ return this.size; } ! ! public String getCreateDate(){ return this.createDate; } ! ! public String getLastOnline(){ return this.lastOnline; ! } ! ! public ArrayList getPath(){ return this.path; } ! ! public void setPath(ArrayList path){ this.path = path; ! } ! ! public void setFullname(String fullname){ this.fullname = fullname; } ! ! public String getFullname(){ return this.fullname; } ! ! public void setOnline(Boolean online){ this.online = online; } ! ! public Boolean getOnline(){ return this.online; } ! ! } ! --- 66,160 ---- location = location.substring(6); this.location = location; ! ! StringTokenizer t = new StringTokenizer(location, "/"); countTokens = t.countTokens(); ! ! while (t.hasMoreTokens()) { ! if (countTokens == t.countTokens()) { ! this.ip = t.nextToken(); ! } else if (t.countTokens() == 1) { String tmpName = t.nextToken(); this.fullname = tmpName; ! ! if (tmpName.length() <= 43) { ! this.name = tmpName; ! } else { ! this.name = tmpName.substring(0, 20) + "..." ! + tmpName.substring(tmpName.length() - 20); ! } ! } else { aktToken = t.nextToken(); ! fullPath += (aktToken + "/"); ! path.add(new FileMap(aktToken, fullPath)); ! } ! } } ! public void setName(String name) { this.name = name; } ! ! public void setSize(String size) { ! this.size = size; // String.valueOf(Long.parseLong(size)/1048576); } ! ! public void setCreateDate(String createDate) { this.createDate = createDate; } ! ! public void setLastOnline(String lastOnline) { this.lastOnline = lastOnline; } ! ! public void setIp(String ip) { this.ip = ip; } ! ! public String getIp() { return this.ip; } ! ! public String getLocation() { return this.location; } ! public String getName() { return this.name; } ! ! public String getSize() { return this.size; } ! ! public String getCreateDate() { return this.createDate; } ! ! public String getLastOnline() { return this.lastOnline; ! } ! ! public ArrayList getPath() { return this.path; } ! ! public void setPath(ArrayList path) { this.path = path; ! } ! ! public void setFullname(String fullname) { this.fullname = fullname; } ! ! public String getFullname() { return this.fullname; } ! ! public void setOnline(Boolean online) { this.online = online; } ! ! public Boolean getOnline() { return this.online; } ! } \ No newline at end of file |