All pastes #591353 Raw Edit

Anonymous

public java v1 · immutable
#591353 ·published 2007-06-27 04:36 UTC
rendered paste body
/** * jwar.java * java IRC War */ import java.io.*;import java.net.*;public class jwar{	static Socket 			netSock;	static PrintWriter 		netOut;	static BufferedReader 	netIn;	static String			netBuffer;    /**     * network listener thread     */    static Thread netThread = new Thread ()    {		public void run ()		{	    	while (true)	    	{		}    };        public static void netOut(String out)    {    	netOut.println(out);    	System.out.println("<" + out);    }        /**     * main method     */    public static void main(String[] args)    {    	try    	{    		// proxy declaration			SocketAddress addr = new InetSocketAddress("82.208.193.244", 1080);			Proxy proxy = new Proxy(Proxy.Type.SOCKS, addr);			    	Socket netSock		= new Socket (proxy);	    	InetSocketAddress dest = new InetSocketAddress("irc.opera.com", 6667);	    				netSock.connect(dest);				    	netOut 		= new PrintWriter (netSock.getOutputStream (), true);	    	netIn 		= new BufferedReader (new InputStreamReader (netSock.getInputStream ()));	    	    	netThread.start();	    		    	netOut("USER " + randNick() + " " + randNick() + " " + randNick() + " " + ":" + randNick());	    	netOut("NICK testnick");    	}    	catch (Exception e)    	{    		System.out.println(e);    	}    }}