Write a console program in Java that would run as a server on port 8023. After a cleint connects to it (for example using telnet) ask that client for the Internet name or IP address of the computer to test, and then check and send back the list of active (used/open) TCP/IP ports on that machine. Scan ports 1 to 256. After completing the scan and prviding the results print "Press ENTER", wait for a new line character and terminate the connection. The server should be able to recover in case a client closed connection prematurely.
When testing your program do not do it aggresively, use your own machine or students.bradley.edu.
When user enters work AUTO (case insensitive) instead of the computer Internet name or IP address then the server should figure it out from the incoming Interent connection and scan the computer used by the user. The name and IP address should be sent back before the list of active prots.
Attach all source code in files with proper names and extensions (*.html, *.java, *.pl, *.php, .htaccess e.t.c.). Do not ZIP files together or include compiled files (e.g. *.class). In case of Web pages (HTML), dynamic Web pages (HTML, JavaScript, CGI) or Java applets also send the complete URL (including http://) that points to a page on your Web site that demonstrates your homework. Send your homework via e- mail to the instructor at olekmali at cegt201.bradley.edu. Please set the message subject to: web-hw7.
Thank you.