/** * * Nightrider * * by McCool at 25C3 */ import processing.net.*; import java.lang.Thread.*; import ddf.minim.*; Client c; String data; public String removeSpaces(String s) { StringTokenizer st = new StringTokenizer(s," ",false); String t=""; while (st.hasMoreElements()) t += st.nextElement(); return t; } void setup() { // IP,Port c = new Client(this, "81.163.18.230", 51279); // Connect to server // start of Login foo data = c.readString(); println(data); try { Thread.sleep(500); } catch (InterruptedException e){} data = c.readString(); println(data); try { Thread.sleep(100); } catch (InterruptedException e){} c.write("bl0rg\r\n"); // Login with Password "bl0rg" try { Thread.sleep(500); } catch (InterruptedException e){} c.write("\r\n"); try { Thread.sleep(500); } catch (InterruptedException e){} // end of Login foo for(int i = 0; i < 9999; i++) // set to something high for faked endless loop { data = c.readString(); println(data); String[] foobar = new String[14]; foobar[0] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 40 00 00 00 00 00 00\r\n"); foobar[1] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40 00 00 00 00 00\r\n"); foobar[2] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40 00 00 00 00\r\n"); foobar[3] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40 00 00 00\r\n"); foobar[4] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40 00 00\r\n"); foobar[5] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40 00\r\n"); foobar[6] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40\r\n"); foobar[7] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff\r\n"); foobar[8] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40\r\n"); foobar[9] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40 00\r\n"); foobar[10] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40 00 00\r\n"); foobar[11] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40 00 00 00\r\n"); foobar[12] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40 00 00 00 00\r\n"); foobar[13] = removeSpaces("s 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 ff 40 00 00 00 00 00\r\n"); data = c.readString(); println(data); for (i=0; i<14; i++){ c.write(foobar[i]); try { Thread.sleep(100); } catch (InterruptedException e){} } } }