Coded this thing cause my dad asked, did it quick so there are probably better ways to do certain things...
This thing was already on my computer, that's why it's with 2 batch files as I first didn't have the intention to make it remotely accessible. You'll need to modify the batch files to make it working properly on your box.
You also need netcat which can be obtained here: http://www.atstake.com/research/tool...ork_utilities/
Someone might possibly learn *cough* something from this...

Code:
import java.io.*;
import java.util.Random;

public class Shell {
	
	public static void main(String[] args) {
		
		int c;
		StringBuffer buffer = new StringBuffer(128);
				
		System.out.println("\nRemoteShell 1.1b\n");
		System.out.println("Type help to view available commands\n");
		
		try {
			
		while (true) {
		   
		   while ((c = System.in.read()) != '\n')
			buffer.append((char)c);
			
			String string = buffer.toString().trim();
			
			if (string.equalsIgnoreCase("exit"))
			System.exit(0);	
			
			else if(string.equalsIgnoreCase("user"))
			System.out.println("a person (probably)");
			
			else if(string.equalsIgnoreCase("about")) {
			System.out.println("\nRemoteShell 1.1b\n");
			System.out.println("Running on some OS");
			}
			
		    else if (string.equalsIgnoreCase("help")) {
		    System.out.println("\nquiz - start quiz");
		    System.out.println("about - show shell/system information");
		    System.out.println("user - displays current user");
		    System.out.println("exit - exits RemoteShell\n");
		    }
		    
/*quiz*/    else if (string.equalsIgnoreCase("quiz")) {  
		     
		    	System.out.println("\n---------------------");
		    	System.out.println("RemoteShell Quiz 1.0a\n");
		    	System.out.println("Problem when you use telnet");
		    	System.out.println("Better use netcat");
		    	System.out.println("Type quit to exit");
		    	System.out.println("---------------------\n");
		    	
		    		String[] questions = new String[4];
		            questions[0] = "What is the first name of Bart Simpson's father?";
		            questions[1] = "What is the answer to this question?";
		            questions[2] = "What does TCP mean?";
		            questions[3] = "What caused the craters on the moon?";
		            
		            String[] answers = new String[4];
		            answers[0] = "Homer";
		            answers[1] = "How should I know";
		            answers[2] = "Transmission Control Protocol";
		            answers[3] = "meteorites";
		            
		            StringBuffer input_buffer = new StringBuffer(128);
		            Random random = new Random();
		            int d;
		            int num;
		            
		            while (true) {		            
		            
	                num = (int) (random.nextDouble()*4);
		            System.out.println(questions[num]);
		            	
		             while ((d = System.in.read()) != '\n')
		              input_buffer.append((char)d);
		             
		             String answer = input_buffer.toString().trim();
		             if (answer.equalsIgnoreCase(answers[num]))
		               System.out.println("Correct!\n");
		             else if(answer.equalsIgnoreCase("quit"))
		                return;
		             else System.out.println("Wrong, the correct answer is " + answers[num] + "\n");
		             
		             input_buffer.delete(0, 128);
		            }
/*end quiz*/}     
		            
		    buffer.delete(0, 128);
	    }
	    
	    } catch (IOException e) {
	    	System.err.println("Exception: " + e.toString());
	    	e.printStackTrace();
	      }
	} 
}
Shell.bat:
Code:
@echo off
cd \dev\java
java Shell
RemoteShell.bat:
Code:
@echo off
echo Remote Shell 1.1b Server
echo ------------------------
cd \dev\java
nc -L -p 23 -e Shell.bat -t -vv