package joos.lib; import java.util.*; import java.applet.Applet; public class WigApplet extends Applet { protected Vector returnPasswords; protected Vector returnValues; protected JoosURL url; protected String URLString; protected JoosIO f; public WigApplet() { super(); returnPasswords = new Vector(5,1); returnValues = new Vector(5,1); f = new JoosIO(); } public boolean openURL() { URLString = this.getParameter("cgi-url"); url = new JoosURL(null,URLString); if (url.openConnection()) { f.println("Opened <" + URLString + "> successfully."); return(true); } else { f.println("Could not open " + URLString); f.println(url.getErrorLog()); return(false); } } public void addResult(String name, String value) { // add the password for param returnPasswords.addElement(this.getParameter(name)); // add the value for param returnValues.addElement(value); } public boolean returnResults() { int i; String nextPassword, nextValue; if (url.openOutputStream()) { // number of results url.println(new Integer(returnPasswords.size()).toString()); f.println(new Integer(returnPasswords.size()).toString()); // for each result for (i=0; i