CSEE 4119: Computer Networks, Spring 2014

Similar documents
OCS Training Workshop LAB14. Setup

T-Square Training Workshop for TAs

IIS, FTP Server and Windows

Mobile Labs Plugin for IBM Urban Code Deploy

Tutorial: Using HortonWorks Sandbox 2.3 on Amazon Web Services

Project #4: MITM Attacks and Authentication

Sonian Getting Started Guide October 2008

Forming a P2P System In order to form a P2P system, the 'central-server' should be created by the following command.

Discovering passwords in the memory

Earth Science 102 Introduction to Physical Geology Fall 2015 Online

VoxStack GSM Gateway API. Version: Author: Joe.Yung

How To - Implement Clientless Single Sign On Authentication with Active Directory

Reporting works by connecting reporting tools directly to the database and retrieving stored information from the database.

Student User Guide. Introduction to the Module Management System (MMS) in Philosophy. Logging in; Submitting work; Logging out

How To - Implement Single Sign On Authentication with Active Directory

CS255 Programming Project 2

Product Manual. MDM On Premise Installation Version 8.1. Last Updated: 06/07/15

DVS-100 Installation Guide

Installation Instruction STATISTICA Enterprise Server

This sequence diagram was generated with EventStudio System Designer (

RemotelyAnywhere. Security Considerations

Department of Engineering Science. Understanding FTP

DSI File Server Client Documentation

WHMCS LUXCLOUD MODULE

CommandCenter Secure Gateway

GETTING STARTED WITH D2L

Advanced Computer Networks Project 2: File Transfer Application

Quick Start Guide. Cerberus FTP is distributed in Canada through C&C Software. Visit us today at

CS5331 Web Security - Assignment 0

1.00 Lecture 1. Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders

SharePoint Password Change & Expiration 3.0 User Guide

Basic Firewall Lab. Lab Objectives. Configuration

Remote Access: Citrix Client Setup

Ricardo Perdigao, Solutions Architect Edsel Garcia, Principal Software Engineer Jean Munro, Senior Systems Engineer Dan Mitchell, Principal Systems

a. StarToken controls the loss due to you losing your Internet banking username and password.

Rev 7 06-OCT Site Manager Installation Guide

Customer Tips. Basic Configuration and Troubleshooting. for the user. Overview. Basic Configuration. Xerox Multifunction Devices.

Secure Messaging Server Console... 2

Elluminate Live! Access Guide. Page 1 of 7

The FlexiSchools Online Order Management (FOOM) Installation Guide

Single Sign On: Volunteer Connection Support Tree for Administrators Release 2.0

Start Here. Installation Guide. Rosetta Stone Standalone License. This Guide Will Show You How To: Install the Student Management System...

Online Backup Client User Manual

PhoneCrypt Desktop. Phone Encryption Software. PhoneCrypt Manual Mobile phone encryption for Windows Platforms

COMP 112 Assignment 1: HTTP Servers

Enterprise Manager. Version 6.2. Installation Guide

freesshd SFTP Server on Windows

Active Directory Authentication Integration

Secure Global Desktop (SGD)

1. Open the preferences screen by opening the Mail menu and selecting Preferences...

Defining your local domains

Safewhere*Identify 3.4. Release Notes

Smartphone Pentest Framework v0.1. User Guide

Discovery Guide. Secret Server. Table of Contents

CIS 505: Software Systems

Adobe Connect LMS Integration for Blackboard Learn 9

EVault Software. Course 361 Protecting Linux and UNIX with EVault

Geography 676 Web Spatial Database Development and Programming

Author: Sumedt Jitpukdebodin. Organization: ACIS i-secure. ID: My Blog:

Practice Fusion API Client Installation Guide for Windows

Error and Event Log Messages

Cisco Unity Express 8.5 Voic System User s Guide for Advanced Features

Scan to Quick Setup Guide

IT Information Packet

ANGEL 7.4 MASTER Course Import Guide for MBA Online Instructors

MOBILE BANKING USER GUIDE

Quick Start Guide Students must wait until the first day of the semester to gain access to their online and hybrid course(s).

Aon Secure File Transfer EMEA

FREE computing using Amazon EC2

Project 3: Network Security

Case Closed Installation and Setup

RecoveryVault Express Client User Manual

New York University Computer Science Department Courant Institute of Mathematical Sciences

Machine Problem 3 (Option 1): Mobile Video Chat

Network DK2 DESkey Installation Guide

Soft Solutions, Inc. 4-Sight FAX 7.5. Getting Started. Soft Solutions, Inc.

Development Office for Information Technology (DOIT) Mapúa Institute of Technology Moodle 2.3 Managers Quick Guide. January 2013.

School of Communication and Information MLIS 17:610:558 Digital Library Technologies (online) Spring 2015 Course Syllabus

BF2CC Daemon Linux Installation Guide

EURECOM VPN SSL for students User s guide

Remote Authentication and Single Sign-on Support in Tk20

Lab 0 (Setting up your Development Environment) Week 1

F-SECURE MESSAGING SECURITY GATEWAY

The FlexiSchools Online Order Management System Installation Guide

CMSC 427 Computer Graphics Programming Assignment 1: Introduction to OpenGL and C++ Due Date: 11:59 PM, Sept. 15, 2015

EMR Link Server Interface Installation

Online Backup Linux Client User Manual

Using Microsoft Windows Authentication for Microsoft SQL Server Connections in Data Archive

Local Caching Servers (LCS) February 2015

Introduction. How does FTP work?

CafePilot has 3 components: the Client, Server and Service Request Monitor (or SRM for short).

Online Backup Client User Manual

If you are unable to set up your Linksys Router by using one of the above options, use the steps below to manually configure your router.

10605 BigML Assignment 4(a): Naive Bayes using Hadoop Streaming

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

Active Directory Integration

Transcription:

CSEE 4119: Computer Networks, Spring 2014 Programming Assignment 1: Socket Programming Due Tuesday, March 4 th 11:55 pm P. Prakash, W. An, P. Nirantar, R. Yu, X. Zhu (TAs), A. Chaintreau (instructor) Academic Honesty Policy You are permitted and encouraged to help each other through Piazza's web board. This only means that you can discuss and understand concepts learnt in class. However, you may NOT share source code or hardcopies of source code. Refrain from sharing any material that could cause your source code to APPEAR TO BE similar to another student's source code enrolled in this or previous years. Refrain from getting any code off the internet. Cheating will be dealt with severely. Cheaters will be penalized. Source code should be yours and yours only. Do not cheat. 1. Introduction In this assignment, starting from the simplest chat functionalities, you will develop more comprehensive servers for messaging applications, including elementary security features and current state of the chat-room. This will require that various processes in different machines are able to work with each other, and recuperate in case of asynchronous messaging and failure. This chat program is based on a client server model consisting of one chat server and multiple chat clients over TCP connections. The server is mainly used to authenticate the chat clients and direct the chat messages (online or offline) to one another. Besides, the server also has to support certain commands that the clients can use. Detailed specifications of the functionalities are given under Section 2. 2. Specifications a. You should write your program in one of the following languages C/C++ Java Python

b. You should write a server program and a client program. The server program will be run first followed by multiple instances of the client program (Each instance supports one client). They will be run from the terminals on the same and/or different hosts. c. Server program You should have a file user_pass.txt that contains the valid combination of usernames and passwords that it can use to authenticate the clients (or client programs). In each line, the first term in the username and the second term in the password. Use the following usernames-passwords to populate your file. Columbia 116bway SEAS winterbreakisover csee4119 lotsofexams foobar passpass windows withglass Google hasglasses facebook wastingtime wikipedia donation network seemsez The server program will be invoked as % Server <server_port_no> Ex: java Server 4119 python Server.py 4119 When starting up, server reads a list of username-password combinations from user_pass.txt and then listens on a given port (4119 in the above example) and waits for clients to connect. Authentication o When a new chat client requests for a connection, the server should prompt the client to input his username and password and should authenticate the user (using the username-password combinations from user_pass.txt ). o If the combination is correct, the chat client should be logged in and a welcome message may be displayed. o If the password is incorrect, the server should ask the user to try again until there are 3 consecutive failures. In this case, the server should drop this connection and block access only for this user from the failed attempt IP

address for 60 seconds. Please define 60 seconds using the variable BLOCK_TIME (we will be changing this value while testing your code!). Commands o After the client is logged in, the server should support the commands presented in Table 1. An example is presented in the Appendix. o If the server cannot recognize some command, an error message should be displayed. Table 1: Commands Command whoelse wholasthr broadcast <message> message <user> <message> block <user> unblock <user> logout Functionality Displays name of other connected users Displays name of only those users that connected within the last hour. Broadcasts <message> to all connected users Private <message> to a <user> Blocks the <user> from sending any messages. If <user> is self, display error. Unblocks the <user> who has been previously blocked. If <user> was not already blocked, display error. Log out this user. d. Client program The client program will be invoked as % Client <server_ip_address> <server_port_no> Ex: java Client 10.6.31.102 4119 python Client.py 10.6.31.102 4119 User should be able to connect to a given server and login themselves by entering a valid username and password.

For the sake of simplicity, prohibit concurrent duplicate users. Ex.: While the user Columbia is already logged in, make sure that Columbia cannot log in from another console. After logging in, users should be able to give any of the commands specified in Table 1 to the server. Your program should be able to display what the server responds at the terminal. o A client must be able to view other users who are currently online o A client must be able to view other users who were online in the past one hour. When defining this one hour, use the variable LAST_HOUR (we will be changing this value to less than an hour while testing your code!). o The client should be able to send and receive private messages with other clients VIA the SERVER. If the receiving user is not online, the server must store the message and deliver it to the receiver when the user comes online. This is the off-line chat functionality. o A client can broadcast a message to all logged in users at any time. (Offline chat function is not needed for broadcast messages.) o Since this is a simple chat program, all messages may be displayed in same console only. A separate console (or UI) for each private messaging is not compulsory. o A client can block a user from sending any further messages. o A client can also unblock a user that was earlier blocked. o When all work is done, user should be able to logout from the server. o Also, if a client is inactive (i.e. the client has not issued any command) for 30 minutes, the server should automatically log this user out. Please define 30 minutes using the variable TIME_OUT. e. Any innovative and useful features can be developed. This is your chance for earning some for extra credit! NOTE: All messages between clients MUST be sent VIA the SERVER. 3. Deliverables: Submission will be done on courseworks. Please post a single <UNI>_<Language>.zip (Ex. zz1111_java.zip) file to the Programming Assignment 1 folder. The file should include the following:

README.txt: This file should contain the following. a. A brief description of your code b. Details on development environment c. Instructions on how to run your code d. Sample commands to invoke your code e. Description of an additional functionalities and how they should be executed/tested. Makefile: The make file is used to build your application. Please try to keep this as simple as possible. If you don t know how to write a makefile, read this quick tutorial http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/. Source code and related files (like user_pass.txt). (Make sure your code is commented!) 4. Testing, Sample Run, and Grading Please make sure that your programs compile and run correctly. To grade your program, we will extract the received zip file, type make and run the programs using the same syntax given in Section 2. Please make sure that your submission successfully passes this simple procedure. TA's will compile and test the code you submit on CLIC machines. It is your responsibility to make sure your code is compliable and runnable on CLIC machines. The CLIC lab has following setup: Java 1.6, gcc version 4.6.3, python 2.7.3 Do not simply submit the entire eclipse/your favourite project folder. Submit only the relevant files. Although we mainly observe the functionality and correctness of your program, we might examine your source code a little. Too poorly structured code or humanunreadable code may result in a score penalty Here is a sample run showing how we will be testing your code: Terminal 1 >make >java server 4119 // You don t have to use Java, and 4119 here is just an // example. We may test on other unoccupied ports

Terminal 2 >java client 10.11.12.13 4119 >Username: network >Password: seemsez >Welcome to simple chat server! >Command: // 4119 is the port that server listens on // and 10.11.12.13 is the IP address of the server // program // After connecting to server, your program should // prompt "Username: " and wait for user to put in // his/her name. Here our user is "network" // again your program should prompt "Password: " and // wait for user to put in the password. Since this is a // introductory assignment, the password displayed as // plain text is acceptable // welcome message from the server acknowledging that // the user has logged in // from now on your server should respond to // commands specified in Table 1 5. Appendix: Example Consider the following scenario 3 clients - facebook, wikipedia and network are currently logged in. 1 client - windows was logged in, but logged out more than an hour back. 1 client - Google was logged in, but logged out half an hour back. The following should happen on entering the given commands on the terminal of facebook. whoelse Since whoelse should print all the other users currently logged in, the following should be displayed on the terminal of facebook. wikipedia network wholasthr Since wholasthr should print all the users who were logged in during the last one hour, the following should be displayed on the terminal of facebook

wikipedia network Google Note: windows is not displayed! broadcast hello world The following should be printed on all the terminals of all the users who are currently logged in, i.e., wikipedia and network. facebook: hello world message wikipedia hi The following should be printed on the terminal of wikipedia facebook: hi message foobar hi Note that foobar is currently not online. So, once foobar comes online, the following should be printed on the terminal of foobar facebook: hi This is support for offline chat function. block facebook An error message like the following should be printed on the terminal of facebook. Error! You cannot block yourself! block wikipedia The following message should be printed on the terminal of facebook. You have successfully blocked wikipedia from sending you messages. The following message should be printed on the terminal of wikipedia when it tries to send a message to facebook using message facebook hi. You cannot send any message to facebook. You have been blocked by the user. unblock wikipedia

The following message should be printed on the terminal of facebook. You have successfully unblocked wikipedia. logout facebook should be logged out and the client program supporting this user should terminate. Grading rubric Functionality Max Points awarded / deducted Basic client and server programs with following functionality as per the specifications: - successful log in - Multiple clients support (from multiple machines) - Implementation of whoelse - Implementation of logout 35 Correct implementation of wholasthr 5 Correct implementation of broadcast 10 Correct implementation of private messaging 10 Correct implementation of offline message 10 Correct implementation of user issued block and unblock 10 Blocking the user from a failed login terminal after 3 unsuccessful logins 5 Automatic logout of the client after 30 minutes of inactivity 5 Well documented README, makefile (if required) 5 Code quality 5 Extra feature: The feature should be useful and grading will be done on its innovation, utility and amount of effort. Max 10 points per extra feature. On TA discretion. Total max extra feature points 20