All pastes #778109 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-17 08:49 UTC
rendered paste body
import java.net.*;
import java.io.*;

class Whois{

        public static void main(String args[]) throws Exception{
                int c;
                Socket s = new Socket("internic.net",43);
                InputStream in = s.getInputStream();
                OutputStream out = s.getOutputStream();
                String str = (args.length == 0 ? "osborne.com" : args[0]) + "\n";
                byte buff[] = str.getBytes();
                out.write(buff);
                while((c=in.read()) != -1){
                        System.out.print((char) c);
                }

                s.close();
        }
}
~                                                                                                                                                                               
~                                                                                                                                                                               
~