All pastes #265087 Raw Edit

Someone

public java v1 · immutable
·published 2006-12-03 00:24 UTC
rendered paste body
/* * client.java * * Created on 03 December 2006, 00:18 * * @author RiPz */import java.net.*;import java.io.*;public class client {    public static void main(String args[]) throws IOException {        Socket s1;        InputStream s1In;        DataInputStream dis;        String info1;        String info2;        for (int lastOctet = 1; lastOctet < 256; lastOctet++) {            s1 = new Socket("192.168.0." + lastOctet, 5432);            s1In = s1.getInputStream();            dis = new DataInputStream(s1In);                        info1 = s1.getInetAddress().getHostName();            info2 = s1.getInetAddress().getCanonicalHostName();            String st = new String(dis.readUTF( ));            System.out.println(st);            System.out.println(info1);            System.out.println(info2);            dis.close(); s1In.close(); s1.close();        }    }}