text: import java.io.*;
  import java.net.*;
  
  public class ExploitableServer {
  	public static void main(String[] args) {
  		try {
  			ServerSocket serverSocket = new ServerSocket(Integer.parseInt(args[0]));
  			System.out.println("Server started on port "+serverSocket.getLocalPort());
  			while(true) {
  				Socket socket=serverSocket.accept();
  				System.out.println("Connection received from "+socket.getInetAddress());				
  				ObjectInputStream objectInputStream = new ObjectInputStream(socket.getInputStream());
  				try {
  					Object object = objectInputStream.readObject();
  					System.out.println("Read object "+object);									
  				} catch(Exception e) {
  					System.out.println("Exception caught while reading object");									
  					e.printStackTrace();
  				}				
  			}
  		} catch(Exception e) {
  			e.printStackTrace();
  		}
  	}
  }
  