0% found this document useful (0 votes)
107 views62 pages

Remote Desktop Administration Using Wanet ": Bachelor of Technology in Computer Science & Engineering

This document is a thesis submitted by three students - Suryansh Rastogi, Nitesh Kumar Singh, and Himanshu Sharma - to the department of computer science and engineering at ANA College of Engineering & Management Studies in partial fulfillment of the requirements for a Bachelor of Technology degree. The thesis proposes developing a "Remote Desktop Administrator" software using a wireless ad hoc network that allows remotely viewing and controlling the desktop of another machine running a compatible client application in real-time. The summary includes an introduction, system requirements specification, techniques used, system design, implementation, conclusions, and future enhancements.

Uploaded by

Shobhit Goswami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views62 pages

Remote Desktop Administration Using Wanet ": Bachelor of Technology in Computer Science & Engineering

This document is a thesis submitted by three students - Suryansh Rastogi, Nitesh Kumar Singh, and Himanshu Sharma - to the department of computer science and engineering at ANA College of Engineering & Management Studies in partial fulfillment of the requirements for a Bachelor of Technology degree. The thesis proposes developing a "Remote Desktop Administrator" software using a wireless ad hoc network that allows remotely viewing and controlling the desktop of another machine running a compatible client application in real-time. The summary includes an introduction, system requirements specification, techniques used, system design, implementation, conclusions, and future enhancements.

Uploaded by

Shobhit Goswami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 62

REMOTE

DESKTOP ADMINISTRATION
USING WANET (Wireless Ad Hoc Network)

Submitted to the department of Computer Science & Engineering


in partial fulfillment of the requirements
For the degree of

BACHELOR OF TECHNOLOGY
In
COMPUTER SCIENCE & ENGINEERING
Submitted By:
SuryanshRastogi (1248610046)
Nitesh Kumar Singh(1248610036)
Himanshu Sharma (1248610014)

ANA COLLEGE OF ENGINEERING & MANAGEMENT


STUDIES, BAREILLY
(Dr. APJ Abdul Kalam Technical University, Lucknow)
30thApril, 2016

CERTIFICATE
Certified that SuryanshRastogi(1248610046)

Nitesh Kumar Singh(1248610036) &

HImashu Shama(1248610014) has carried out theresearch work


thesis entitled
the

award

presented

in

this

REMOTE DESKTOP ADMINISTRATION USING WANET for

ofBACHELOR

OF

TECHNOLOGY

from

Dr

APJ

Abdul

KalamTechnical University, Lucknow under my supervision. The thesis embodies


results of original work, and studies are carried out by the student himself is and the
contents of the thesis do not form the basis for the award of any other degree to the
candidate or to anybody else from this or any other University/Institution.

Miss GeetaGangwar
Assistant Professor
Department of Computer Science
& Engineering

ABSTRACT
Today computers have become an integral part of everyones life. Use of computers is not only
restricted for corporate use but also for personal use and intercommunication purpose. For all
these different purposes networking or network has become the magic word. Today, lots of
information and resources are shared all over the world through the network. The buzzword or
the revolutionary term originated from this is global network i.e. Internet. But along with all the
advancements and developments, the danger of misusing the network has also increased. The
main objective behind development of Remote Desktop Administrator to build a server
application that allows to view or even control the desktop session on another machine that is
running a compatible client application, with the efficiency to provide the real time information
about the remote machine.
The current existing systems are potentially good systems, which do allow us to remotely
connect to the remote machines and access their respective desktops. But most of the existing
systems are quite difficult to use and implement for a layman.
The Remote desktop Administrator will allow the system administrator to use or to remotely
control the other systems through a simple application. This software intends to leverage existing
technologies and to utilize them in a new way. The proposed Remote desktop will exist in a
distributed computer environment such as the Internet but will also be accessible from with
in an intranet such as an office or in the home itself.
Remote desktop Administrator is a potentially huge growth area and several companies are
currently developing software that enables users to access remote systems from the office or
other remote locations by using even embedded system. By using platform independent
languages like JAVA, for development, gives freedom to use same application in heterogeneous
system.

Content
1. Introduction
2. System study
3. Software requirement specification
4. Techniques used
5. System design
6. Coding
7. Snapshots
8. Conclusion
9. Future enhancement
10.Reference

ACKNOWLEDGEMENT
It gives us a great sense of pleasure to present the report of the B. Tech Project undertaken during
B. Tech. Final Year.We owe special debt of gratitude to assistant professor Ms.GeetaGangwar,
Department of Computer Science & Engineering, ANA College of Engineering &
Management Studies, Bareilly for her constant support and guidance throughout the course of
our work. Her sincerity, thoroughness and perseverance have been a constant source of
inspiration for us. It is only her cognizant efforts that our endeavors have seen light of the day.
We also take the opportunity to acknowledge the contribution of MrNarendra Pal Singh, Head
of Department of Computer Science & Engineering, ANA College of Engineering &

Management Studies, Bareilly for his full support and assistance during the development of the
project.
We also do not like to miss the opportunity to acknowledge the contribution of all faculty
members of the department for their kind assistance and cooperation during the development of
our project. Last but not the least, we acknowledge our friends for their contribution in the
completion of the project.

SuryanshRastogi
(1248610046)
Nitesh Kumar Singh
(1248610036)
Himanshu Sharma
(1248610014)

Chapter
1:INTRODUCTION

SYSTEM STUDY
1.1 Existing System

In the present generation systems, there is a need for the administrator has to go all
around the network in order to terminate any system that is left non-terminated.

The administrator has to take all the trouble of going to a particular system to access a
file that is needed by him.

In order to get the system configuration details of any particular system, the administrator
has to take the trouble of going to that system for obtaining the information.

The processes that are running in a particular system can be viewed only in that system
itself by using the present generation softwares.

1.2 Problem Domain


This project deals with the functionalities of the terminal systems connected through a
network. This system implements Remote control at the application level.

1.3 Proposed System


The disadvantages present in the existing systems can be overcome using the proposal systems.

Using the REMOTE DESKTOP ADMINISTRATOR software the administrator can


control the operations of the remote system from his system itself.

The administrator can get the configuration of the remote system from the server system
itself using this software.

In order to terminate the operations on the remote systems, the administrator can obtain
the current process details of the remote systems from the server itself. Running rmi
registry in the client systems performs all the above operations.

FEASIBILITY STUDYOF PROJECT

All projects are feasible, given unlimited resources and infinite time. But the
development of software is plagued by the scarcity of resources and difficult delivery

rates. It is prudent to evaluate the feasibility of the project at the earliest possible time.
Three key considerations are involved in feasibility analysis as:-

Technical Feasibility

The REMOTE VIRTUAL DESKTOP software is developed using the java environment.
The reason for using java, as the development platform is that, java is an Object Oriented
Language which handles most of the networking concepts. Since java is a platform
independent language, the class files can be executed on any operating system easily.

Economic Feasibility

This is the most frequently used method for evaluating the effectiveness of a system. It is
also called as a cost analysis. The Remote Virtual Desktop project, which is used to
control all the remote systems in a network, requires resources such as the software and
hardware components that support the Remote Control through java project effectively.
Since all the clients are usually connected to the server in any organization, it reduces the
cost factor. Hence there is no need of further physical connection to be established
between the server and the client.

Operational Feasibility

The Remote Virtual Desktop project is a user-friendly tool developed in order to make
the operations of the administrator much better. It will be easy for the administrator to
handle all the systems in the network from the server itself which helps in increasing the
operational efficiency of the administrator.

FUNCTIONS REQUIRED
The REMOTE DESKTOP ADMINISTRATOR software is divided in to five modules based
on their functionalities. These modules are as follows.
Remote Desktop
Retrieve
Control

Pen drive detection


File Transfer

Remote desktop
Using this module we can access the desktop of any remote system by giving the desired
systems IP address and port number we can get the desktop of that system. It is useful for the
administrator to monitor the activities of the employees of that organization.
The administrator can be able to get the desktop of that particular system and can warn the
employees if they are doing any illegal activities.
Retrieve
The purpose of the Retrieve using this module can determine the processes that are currently
running in a particular client system, present in a network. The administrator can know the
details of the processes by specifying the IP address of the remote system. This module has two
options like system information and process information. By using system information we can
determine the system name, RAM free space, OS, etc. By using the process information we
can determine the processes running at the client system at that time. By knowing these
information the server can know requirements for installing software remotely. This module is
similar to that of a task manager present in the windows operating system.

Control
The Control module handles the terminal operations such as shutdown, restart and logoff, by
specifying the IP address of the remote system. For this purpose we are using RMI (Remote
Method Invocation) and Java Runtime class.

This module asks the administrator to enter the system address on which he wants to perform the
terminal operations. It also asks the administrator to mention one of the above three terminal
operations to be performed on the remote system. Once the administrator has confirmed the
action, an echo message is sent to the remote system in order to ensure whether the user is using
the system or not. In case of the system being accessed by the user a response is sent to the
administrator. The administrator can either suspend or continue with his actions after receiving
the response. If the administrator knows that no one is using the system or no processes running
at that time then he can use these options like shutdown, restart or logoff.

File Transfer
Using this module we can transfer files between the client and the server based on the IP address.

Pen Drive Detection


This module defines the detection of the pen drive port. When the external device is added to the
client systems, then the server will get a message from that particular client system with IP
address. Then the server knows. This is used in any lab examinations. If any student will try for
copying by using pen drives then the server knows that client system and will take an action on
him.
.

Chapter
2:SOFTWARE
REQUIREMENT
SPECIFICATION

2.1 Role of SRS


The purpose of the software requirement specification is to reduce the communication gap
between the clients and the developers. Software Requirement Specification is the medium

through which the client and user needs are accurately specified. It forms the basis of software
development. A good SRS should satisfy all the parties involved in the system.

2.2 Purpose and scope


The SRS phase consists of two basic activities:

Problem/Requirement Analysis: The process is order and more nebulous of the two,
deals with understand the problem, the goal and constraints.

Requirement Specification: Here, the focus is on specifying what has been found giving
analysis such as representation, specification languages and tools, and checking the
specifications are addressed during this activity. The requirement phase terminates with
the production of the validate SRS document. Producing the SRS document is the basic
goal of this phase.

2.3 Software Requirement


OPERATING PLATFORM

Windows Xp, Vista

FRONT END

JAVA, RMI, Netbeans

2.4 Hardware Specifications


RAM

at least 256 MB

HARD DISK

at least 20 GB

VDU

Svga Color Monitor

KEY BOARD

104 Standards

NETWORK

Ad hoc wireless network

Chapter
3:TECHNOLOGIES
USED

3.1 Introduction to Java

In the early days of the web, a server could dynamically construct a page by creating a separate
process to handle each client request. The process would open connection to one or more
databases in order to obtain the necessary information. It communicated with the web server via
an interface known as the Common Gateway Interface (CGI) .CGI allowed the separate process
to read data from HTTP request and write data to the HTTP response. A variety of different
languages were used to build CGI programs including C, C++ and Perl.
The key that allows java to solve both the security and the portability problems just described is
that, the output of the java compiler is not an executable code. Rather, it is Byte Code. Byte Code
is a highly optimized set of instructions designed to be executed by virtual machine that the java
Run-time system emulates. However, the fact that a java program is interpreted helps solve the
major problems associated with downloading the program over the Internet.
Here is why java was designed to be interpreted language. Because java programs are
interpreted rather than compiled .It is easier to run them in wide variety of environments. Only
the java runtime system needs to be implemented for each platform. Once the runtime package
exists for a given system any java program can run on it. If java were a compiled language then
different versions of the same program will have to exist for each type of CPU connected to the
Internet. Thus interpretation is the easiest way to create truly portable programs. Although java
was designed to be interpreted, there is technically nothing about java that prevents on the fly
compilation of Byte Code into native code. However, even if dynamic compilation were applied
to Byte Code, the portability and safety would still apply, because the run time system would still
be in charge of the execution environment.

Problems with Structured Programming


As programs grow ever larger and more complex, even the structured programming
approach begins to show signs of strain. You may have heard about the problems
involved in program development. The project is too complex, the schedule slips, more
programmers are added, complexity increases, costs skyrocket, the schedule slips further,
and disaster ensues. Analyzing the reasons for these failures reveals that there are
weaknesses in the procedural paradigm itself.

No matter how well the structured

programming approach is implemented, large programs become excessively complex.

The reasons for this failure of procedural languages are mainly because of the role played
by data.

Why Java?
Although the fundamentals that necessitated the invention of java are portability and security,
there are other factors that played an important role on molding the final form of the language.
The java in the following list of buzzwords summed up the key considerations:

Simple

Portable

Object-oriented

Robust

Multithreaded

Architectural-neutral

High performance

Distributed

Dynamic

Object Oriented Programming and Java


Object-oriented Programming was developed because of limitations found in earlier approaches
of programming. In order appreciate what OOP does, we need to understand the limitations
present in the traditional programming.

Procedural Languages
The procedural languages include Pascal, C, Basic, FORTRAN, and some other similar
languages. Each statement in these languages tells the computer to perform some operation. A
program in a procedural language is a list of instructions.
For very small programs no other organizing principle (often called a paradigm) is needed. The
programmer creates the list of instructions, and the computer carries them out.

Division into Functions

When programs become larger, a single list of instructions becomes unwieldy.

Few

programmers can comprehend a program of more than a few hundred statements unless it is
broken down into smaller units. For this reason the function was adopted as a way to make
programs more comprehensible to their human creators. (The term function is used in C++ and
C. In other languages the same concept may be referred to as a subroutine, a subprogram, or a
procedure.) A program is divided into functions, and (ideally, at least) each function has a
clearly defined purpose and a clearly defined interface to the other functions in the program.
The idea of breaking a program into functions can be further extended by grouping a number of
functions together into a larger entity called a module, but the principle is similar: grouping a
number of components that carry out specific tasks.
Dividing a program into functions and modules is one of the cornerstones of structured
programming, the somewhat loosely defined discipline that has influenced programming
organization for more than a decade.

Relationship to the Real World


Procedural programs are often difficult to design.

The problem is that their chief

components--functions and data structures--don't model the real world very well. For example,
suppose you are writing a program to create the elements of a graphics user interface: menus,
windows, and so on. Quick now, what functions will you need? What data structures? The
answers are not obvious, to say the least. It would be better if windows and menus corresponded
more closely to actual program elements.

New Data Types


There are other problems with traditional languages. One is the difficulty of creating new
data types. Computer languages typically have several built-in data types: integers, floatingpoint numbers, characters, and so on. What if you want to invent your own data type? Perhaps
you want to work with complex numbers, or two dimensional coordinates, or datesquantities
the built-in data types dont handle easily. Being able to create your own types is called

extensibility; you can extend the capabilities of the language. Traditional languages are not
usually extensible. Without unnatural convolutions, you cant bundle together both X and Y
coordinates into a single variable called Point, and then add and subtract values of this type. The
result is that traditional programs are more complex to write and maintain.

The object oriented approach


The fundamental idea behind object-oriented languages is to combine into a single unit both data
and the functions that operate on that data. Such a unit is called an object.
An objects functions, called member methods in Java, typically provide the only way to access
its data. If you want to read the item and return the value to you, you call a member function in
the object. It will read the item and return the value to you. You cant access the data directly.
The data is hidden, so it is safe from accidental modification. Data and its functions are said to
be encapsulated into a single entity. Data encapsulation and data hiding are key terms in the
description of object oriented languages.
Classes
In OOP we say that objects are members of classes. What does this mean? Lets look at an
analogy. Almost all computer languages have built-in data types. For instance, a data type int,
meaning integer is pre-defined in Java
Abstraction
An essential element of object-oriented programming is abstraction.

Humans manage

complexity through abstraction. For example, people do not think of a car as a set of tens of
thousands of individual parts. They think of it as a well-defined object with its own unique
behavior. This abstraction allows people to use a car to drive to the grocery store without being
overwhelmed by the complexity of the parts that form the car. They can ignore the details of
how the engine, transmission, and braking systems work. Instead they are free to utilize the
object as a whole.
Encapsulation

Encapsulation is the process of binding the code and the data, thus providing security from the
outside interface. The other way of defining encapsulation is by providing the code and data
with a protective wrapper, thus preventing them from being accessed by the code present outside
the wrapper. Access to the code and data inside the wrapper is tightly controlled through a well
defined interface. In Java the basis of encapsulation is the class. A class defines the structure
and behavior (data and code) that will be shared by a set of objects. Each object of a given class
contains the structure and behavior defined by the class. For this reason, objects are sometimes
referred to as instances of a class. Thus, a class is a logical construct; an object has physical
reality.

Inheritance

Inheritance is the process by which one object acquires the properties of another object. This is
important because it supports the concept of hierarchical classification. As mentioned earlier,
most knowledge is made manageable by hierarchical (that is, top-down) classifications. For
example, a Golden Retriever is part of the classification dog, which in turn is part of the mammal
class, which is under the larger class animal. Without the use of hierarchies, each object would
need to define all of its characteristics explicitly. However, by use of inheritance, an object need
only define those qualities that make it unique within its class. It can inherit its general attributes
from its parent. Thus, it is the inheritance mechanism that makes it possible for one object to be
a specific instance of a more general case.

Polymorphism

Polymorphism (from the Greek, meaning many forms) is a feature that allows one interface to
be used for a general class of actions. The specific action is determined by the exact nature of
the situation. Consider a stack (which is a last-in, first-out list). You might have a program that
requires three types of stack. One stack is used for integer values, one for floating-point values,
and one for characters. The algorithm that implements each stack is the same, even though the
data being stored differs. In a non-object-oriented language, you would be required to create
three difference sets of stack routines, with each set using different names. However, because of
polymorphism, in Java you can specify a general set of stack routines that all share the same
names.

3.2 INTRODUCTION TO RMI


Remote Method Invocation (RMI) facilitates object function calls between Java Virtual
Machines (JVMs). JVMs can be located on separate computers - yet one JVM can invoke
methods belonging to an object stored in another JVM. Methods can even pass objects that a
foreign virtual machine has never encountered before, allowing dynamic loading of new classes
as required. Remote method invocation allows applications to call object methods located
remotely, sharing resources and processing load across systems. Unlike other systems for remote
execution which require that only simple data types or defined structures be passed to and from
methods, RMI allows any Java object type to be used - even if the client or server has never
encountered it before. Any object that can be invoked this way must implement the Remote
interface. When such an object is invoked, its arguments are marshaled and sent from the local
virtual machine to the remote one, where the arguments are unmarshaled. When the method
terminates, the results are marshaled from the remote machine and sent to the caller's virtual
machine. If the method invocation results in an exception being thrown, the exception is
indicated to caller.

Fig3.2.1: RMI architecture

3.2.1 Advantages of RMI

Defining the remote interfaces

Implementing the remote objects

Implementing the clients

3.2.2 Working of an RMI applications


The working of RMI applications is based on accessing the remote object. A remote object can
be defined as an object associated with methods hat can be called from another java virtual
machine. In this mechanism the application that access to the remote object is treated as client
application and the application that implements that object is treated as a server application.
Thus an RMI application can be satirized into two parts.
1. Server side application
2. Client side application

Server side application

The first file is an interface that declares the methods, which are accessed remotely. The purpose
of making an interface is to enable the client to access the methods of an interface with the help
of its reference. The second file creates a class and the binds that object in RMI registry. An RMI
registry is the naming server, which allows the remote request to be redirected to an object,
which is bind inside it.

Client side application

On a client side, a file is created that creates a class access that remote object through RMI
registry and invokes the remote methods.

Creating RMI server

The first side to create an RMI application is to create server side application. For server side
application, the first thing to create is an interface that defines the methods, which are accessed
by the remote clients. The code for defining an interface is given below which is the first step
towards creating server application.

Step 1:- Defining a Remote Interface

To call the methods of an object remotely, you have to create a remote interface that should
extend the java.rmi.Remote interface. This is the first steps in creating an RMI application,
which extends the Remote interface. All the method declares in this interface can be called
remotely. Each and every methods declares in the remote interface must have the
java.rmi.RemoteException in the throws clause as they throw this exception whenever there is
an error in sending or receiving information.
Remote Interface

importjava.rmi.*;
importjava.rmi.server.*;
Public interface int extends remote
{
publicint add(inta,int b)throws RemoteException;
publicint sub(int a1,int b1) throws RemoteException;
}

Step 2:- Implementation of an interface

In this step the interface created in step 1 is implemented. The class, which implements the
interface, must extend java.rmi.server.unicastRemoteObject. The purpose of an extending the
UnicasRemoteObject class is to provide the functionality to import an object from a remote
machines. The code for implementation of an interface is given below
importjava.rmi.*;
importjava.rmi.server.*;

Public class serverIMPL extends UnicastRemoteObject implements intf


{
publicserverIMPL() throws RemoteException
{
}
publicint ass(inta,int b) throws RemoteException
{
return(a+b);
}
publicint sub(int a1,int b1) throws RemoteException
{
return(a1-b1);
}
}

Step 3:-Creating Server Classes

This step contains the main program for the server machine by registering the object of the class,
which implements the interface. This is done through bind() and rebind() method found in
java.rmi.Naming class Bind() and rebind() are static methods found in the naming class In the
code given code given below the method rebind() has been used
importjava.rmi.*;
importjava.rmi.server.*;
public class server
{
public static void main (String s[]) THROWS Exception
{
serverimplimpl=new serverIMPL()

System.out.printl(initializing server.);
Naming.rebind(ram, impl);
System.out.println(registered);
}
}

Creating RMI client


The next step is creating an RMI application is to create a client that will actually invoke the
remoter methods. In this program, you will request a reference of that object which is present in
the registry. This is done through the method lookup() which is present inside the class
java.rmi.Naming. The method lookup() is a static method, which takes the RMI URL that points
to the registry as a parameter and ,if it finds the object, will return a reference to it. The code for
creating the clients is given below:Import java.rmi.*;
Import java.rmi.server.*;
Public class client
{
public static void main (String s[]) throws Exception
{
String url=rmi://127.0.0.1/ram;
Intf intf1=(intf)Naming.llokup(url);
Int a =intf1.add(10,20);
Int b=intf1.sub(30,10);
System.out.println(a);
System.out.println(b);
}

Configuring and executing client and server


To execute the codes written while creating server and client, you have to follow certain steps
Note before following the steps given below you have to set the classpath to current working
directory.

Step1:

Compileall the four source file i.e intf.java, serversimple.java, sever.java and client.java

Step 2:

The next step is to create the stub and skeleton of the serveIMPL for the creation of the RMOI
server. For this purpose you have to use the rmic compiler rmicserverIMPL
The rmic command will create the following 2 files:1. ServerIMPL_Skel.class

2. SeverIMPL_stub.class

Step 3:
Start the rmiregistry by typing command rmiregistry in the command prompt of the server
machine:c:\rmiexample>rmiregistry

Chapter 4:
SYSTEM DESIGN

SYSTEM DESIGN
4.1 Design Methodology
In the system design the focus on the deciding which functions are needed for the system, the
specification of these modules and how these modules should be interconnected.

4.1.1 Detailed Design


In detailed design the interconnection of the modules or how the specification of the modules
can be satisfied is decided. Some properties for a software system design are
1

Verifiability

Completeness

Consistency

Traceability

Simplicity / Understandability

4.2 DATA FLOW DIAGRAM


Data Flow Diagrams refers to the diagrams which shows the flow of data or information in the
system being developed by the developer and are always used to analysis the working of the
system.
Data Flow Diagrams in any system are proved very helpful to identify the design requirements of
the system and also to identify the resource requirement estimation for the system.
Normally there are Two types of data flow diagrams on the basis of level of abstraction or the
computation:o Top Level DFD
o Low Level DFD

Top Level DFD


Traditional methodology to understand the interaction of application with the user and final
output is generated the two parts of the Top level DFD are:

Fig 4.2.1 Top Level DFD

Low Level DFD

4.3 UML DIAGRAM

Fig 4.2.2 Low Level DFD

Unified Modeling Language


This mapping permits forward engineering: The generation of code from a UML model
into a programming language. The reverse is also possible: You can reconstruct a model
from an implementation back into the UML. Reverse engineering is not magic. Unless
you encode that information in the implementation, information is lost when moving
forward from models to code. Reverse engineering thus requires tool support with
human intervention. Combining these two paths of forward code generation and reverse
engineering yields round-trip engineering,meaning the ability to work in either a
graphical or a textual view, while tools keep the two views consistent.

Class Diagram:
Class is nothing but a structure that contains both variables and methods. The Class
Diagram shows a set of classes, interfaces, and collaborations and their relating ships.
There is most common diagram in modeling the object oriented systems and are used to
give the static view of a system.

Fig 4.3.1: Class diagram for Remote Desktop Administration

Use Case Diagrams

A Use case is a description of set of sequence of actions. Graphically it is rendered as an ellipse


with solid line including only its name. Use case diagram is a behavioral diagram that shows a
set of use cases and actors and their relationship.

Fig 4.3.2:Use Case diagram for Remote Desktop Administration

shutdown
<<extend>>
<<extend>>

Administrator

remote terminal operations

IP address

restart
<<extend>>

system configuration

configuration details
<<extend>>
logoff

Administrator

Fig 4.3.3: Use Case diagram for Control

IP address

<<extend>>

process management

process details

Fig4.3.4: Use Case diagram for Retrive

Interaction Diagrams

An Interaction Diagram shows an interaction consisting of a set of objects and their


relationships, including the messages that may be dispatched among them.

Sequence Diagram

A sequence diagram is an interaction diagram that emphasizes the time ordering of the messages.
Graphically, a sequence diagram is a table that shows objects arranged along the X-axis and
messages, ordered in increasing time, along the Y-axis.
Sequence diagrams have two interesting features:
1. There is the object lifeline. An object lifeline is the vertical dashed line that represents the
existence of an object over a period of time. Most objects that appear in the interaction
diagrams will be in existence for the duration of the interaction, so these objects are all
aligned at the top of the diagram, with their lifelines drawn from the top of the diagram
to the bottom.
2. There is a focus of the control. The focus of control is tall, thin rectangle that shows the
period of time during which an object is performing an action, either directly or through

the subordinate procedure. The top of the rectangle is aligns with the action; the bottom is
aligned with its completion.
Sequence diagram for REMOTE DESKTOP ADMINISTRATOR is shown as below:-

Fig 4.3.5:Sequence diagram for RETRIEVE MODULE

Collaboration Diagram

A collaboration diagram is an introduction diagram that emphasizes the structural organization


of the objects that send and receive messages. Graphically a collaboration diagram is a collection
of vertices and arcs.

Fig 4.3.6: Collaboration diagram For Remote Desktop Administrator

Activity Diagram

An activity diagram shows the flow from an activity to activity. An activity is an ongoing
nonatomic execution with in a state machine. Activities ultimately result in some action which is
made up of executable atomic computation that result in a change in state of the system or the
return of a value. Action encompasses calling another operation, sending a signal, creating or
destroying an object or some pure computation, such as evaluating an expression.Graphicallyan
activity diagram is a collection of vertices and arcs.
In Remote Desktop Administrator system, an activity Diagram shows the flow of control during
access of client system by the server system. Administrator i.e. remote server can perform
various tasks such as multimedia access, file retrieve, file transfer and many more functions
using the interface network which is Wireless Ad Hoc Network (WANET) in proposed system.

Fig 4.3.7: Activity diagram for Remote Desktop Administrator

Deployment Diagram

Deployment Diagrams are one of the two kinds of diagrams used in modeling the aspects of an
Object Oriented System. A Deployment Diagram shows the configuration of Runtime Processing
Nodes and the Components that live on them.

Fig 4.3.8:Deployment Diagram For Remote Desktop Administrator

Chapter 5:
CODING

REMOTE SERVER
ServerInitiator.java
packageremoteserver;
importjava.awt.BorderLayout;
importjava.io.IOException;
importjava.net.ServerSocket;
importjava.net.Socket;
importjavax.swing.JDesktopPane;
importjavax.swing.JFrame;
importjavax.swing.JOptionPane;
/**
* This is the entry class of the server
*/
public class ServerInitiator {
//Main server frame

privateJFrame frame = new JFrame();


//JDesktopPane represents the main container that will contain all
//connected clients' screens
privateJDesktopPane desktop = new JDesktopPane();
public static void main(String args[]){
String port = JOptionPane.showInputDialog("Please enter listening port");
newServerInitiator().initialize(Integer.parseInt(port));
}
public void initialize(int port){
try {
ServerSocketsc = new ServerSocket(port);
//Show Server GUI
drawGUI();
//Listen to server port and accept clients connections
while(true){
Socket client = sc.accept();
System.out.println("New client Connected to the server");
//Per each client create a ClientHandler
newClientHandler(client,desktop);
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
/*
* Draws the main server GUI
*/
public void drawGUI(){
frame.add(desktop,BorderLayout.CENTER);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Show the frame in a maximized state
frame.setExtendedState(frame.getExtendedState()|JFrame.MAXIMIZED_BOTH);
frame.setVisible(true);
}
}

ClientHandler.java
packageremoteserver;
importjava.awt.BorderLayout;

importjava.awt.Rectangle;
importjava.beans.PropertyVetoException;
importjava.io.IOException;
importjava.io.ObjectInputStream;
importjava.net.Socket;
importjavax.swing.JDesktopPane;
importjavax.swing.JInternalFrame;
importjavax.swing.JPanel;
classClientHandler extends Thread {
privateJDesktopPane desktop = null;
private Socket cSocket = null;
privateJInternalFrameinterFrame = new JInternalFrame("Client Screen",true, true, true);
privateJPanelcPanel = new JPanel();
publicClientHandler(Socket cSocket, JDesktopPane desktop) {
this.cSocket = cSocket;
this.desktop = desktop;
start();
}
/* Draw GUI per each connected client
*/
public void drawGUI(){
interFrame.setLayout(new BorderLayout());
interFrame.getContentPane().add(cPanel,BorderLayout.CENTER);
interFrame.setSize(100,100);
desktop.add(interFrame);
try {
//Initially show the internal frame maximized
interFrame.setMaximum(true);
} catch (PropertyVetoException ex) {
ex.printStackTrace();
}
//this allows to handle KeyListener events
cPanel.setFocusable(true);
interFrame.setVisible(true);
}
public void run(){

//used to represent client screen size


Rectangle clientScreenDim = null;
//Used to read screenshots and client screen dimension
ObjectInputStreamois = null;
//start drawing GUI
drawGUI();
try{
//Read client screen dimension
ois = new ObjectInputStream(cSocket.getInputStream());
clientScreenDim =(Rectangle) ois.readObject();
}catch(IOException ex){
ex.printStackTrace();
}catch(ClassNotFoundException ex){
ex.printStackTrace();
}
//Start recieveing screenshots
newClientScreenReciever(ois,cPanel);
//Start sending events to the client
newClientCommandsSender(cSocket,cPanel,clientScreenDim);
}
}

ClientScreenReciever.java
packageremoteserver;
importjava.awt.Graphics;
importjava.awt.Image;
importjava.io.IOException;
importjava.io.ObjectInputStream;
importjavax.swing.ImageIcon;
importjavax.swing.JPanel;
classClientScreenReciever extends Thread {
privateObjectInputStreamcObjectInputStream = null;
privateJPanelcPanel = null;
privatebooleancontinueLoop = true;
publicClientScreenReciever(ObjectInputStreamois, JPanel p) {
cObjectInputStream = ois;
cPanel = p;

//start the thread and thus call the run method


start();
}
public void run(){
try {
//Read screenshots of the client then draw them
while(continueLoop){
//Recieve client screenshot and resize it to the current panel size
ImageIconimageIcon = (ImageIcon) cObjectInputStream.readObject();
System.out.println("New image recieved");
Image image = imageIcon.getImage();
image = image.getScaledInstance(cPanel.getWidth(),cPanel.getHeight()
,Image.SCALE_FAST);
//Draw the recieved screenshot
Graphics graphics = cPanel.getGraphics();
graphics.drawImage(image, 0, 0, cPanel.getWidth(),cPanel.getHeight(),cPanel);
}
} catch (IOException ex) {
ex.printStackTrace();
} catch(ClassNotFoundException ex){
ex.printStackTrace();
}
}
}

REMOTE CLIENT
RemoteInitiator.java
packageremoteclient;
importjava.awt.AWTException;
importjava.awt.Dimension;
importjava.awt.GraphicsDevice;
importjava.awt.GraphicsEnvironment;
importjava.awt.Rectangle;
importjava.awt.Robot;

importjava.awt.Toolkit;
importjava.awt.event.ActionEvent;
importjava.awt.event.ActionListener;
importjava.io.IOException;
importjava.net.Socket;
importjava.net.UnknownHostException;
importjavax.swing.JButton;
importjavax.swing.JFrame;
importjavax.swing.JOptionPane;
/**
*
* This class is responsible for connecting to the server
* and starting ScreenSpyer and ServerDelegate classes
*/
public class ClientInitiator {
Socket socket = null;
public static void main(String[] args){
String ip = JOptionPane.showInputDialog("Please enter server IP");
String port = JOptionPane.showInputDialog("Please enter server port");
newClientInitiator().initialize(ip, Integer.parseInt(port));
}
public void initialize(String ip, int port ){
Robot robot = null; //Used to capture the screen
Rectangle rectangle = null; //Used to represent screen dimensions
try {
System.out.println("Connecting to server ..........");
socket = new Socket(ip, port);
System.out.println("Connection Established.");
//Get default screen device
GraphicsEnvironmentgEnv=GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevicegDev=gEnv.getDefaultScreenDevice();
//Get screen dimensions
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();

rectangle = new Rectangle(dim);


//Prepare Robot object
robot = new Robot(gDev);
//draw client gui
drawGUI();
//ScreenSpyer sends screenshots of the client screen
newScreenSpyer(socket,robot,rectangle);
//ServerDelegaterecieves server commands and execute them
newServerDelegate(socket,robot);
} catch (UnknownHostException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
} catch (AWTException ex) {
ex.printStackTrace();
}
}
private void drawGUI() {
JFrame frame = new JFrame("Remote Admin");
JButton button= new JButton("Terminate");
frame.setBounds(100,100,150,150);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(button);
button.addActionListener( new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
}
);
frame.setVisible(true);
}
}

ServerDelegate.java
packageremoteclient;

importjava.awt.Robot;
importjava.io.IOException;
importjava.net.Socket;
importjava.util.Scanner;
/*
* Used to recieve server commands then execute them at the client side
*/
classServerDelegate extends Thread {
Socket socket = null;
Robot robot = null;
booleancontinueLoop = true;
publicServerDelegate(Socket socket, Robot robot) {
this.socket = socket;
this.robot = robot;
start(); //Start the thread and hence calling run method
}
public void run(){
Scanner scanner = null;
try {
//prepare Scanner object
System.out.println("Preparing InputStream");
scanner = new Scanner(socket.getInputStream());
while(continueLoop){
//recieve commands and respond accordingly
System.out.println("Waiting for command");
int command = scanner.nextInt();
System.out.println("New command: " + command);
switch(command){
case -1:
robot.mousePress(scanner.nextInt());
break;
case -2:
robot.mouseRelease(scanner.nextInt());
break;
case -3:

robot.keyPress(scanner.nextInt());
break;
case -4:
robot.keyRelease(scanner.nextInt());
break;
case -5:
robot.mouseMove(scanner.nextInt(), scanner.nextInt());
break;
}
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
}

ScreenSpyer.java
packageremoteclient;
importjava.awt.Rectangle;
importjava.awt.Robot;
importjava.awt.image.BufferedImage;
importjava.io.IOException;
importjava.io.ObjectOutputStream;
importjava.net.Socket;
importjavax.swing.ImageIcon;
/**
* This class is responisble for sending sreenshot every predefined duration
*/
classScreenSpyer extends Thread {
Socket socket = null;
Robot robot = null; // Used to capture screen
Rectangle rectangle = null; //Used to represent screen dimensions
booleancontinueLoop = true; //Used to exit the program

publicScreenSpyer(Socket socket, Robot robot,Rectanglerect) {


this.socket = socket;
this.robot = robot;
rectangle = rect;
start();
}
public void run(){
ObjectOutputStreamoos = null; //Used to write an object to the streem

try{
//Prepare ObjectOutputStream
oos = new ObjectOutputStream(socket.getOutputStream());
/*
* Send screen size to the server in order to calculate correct mouse
* location on the server's panel
*/
oos.writeObject(rectangle);
}catch(IOException ex){
ex.printStackTrace();
}
while(continueLoop){
//Capture screen
BufferedImage image = robot.createScreenCapture(rectangle);
/* I have to wrap BufferedImage with ImageIcon because BufferedImage class
* does not implement Serializable interface
*/
ImageIconimageIcon = new ImageIcon(image);
//Send captured screen to the server
try {
System.out.println("before sending image");
oos.writeObject(imageIcon);
oos.reset(); //Clear ObjectOutputStream cache
System.out.println("New screenshot sent");
} catch (IOException ex) {
ex.printStackTrace();
}

//wait for 100ms to reduce network traffic


try{
Thread.sleep(100);
}catch(InterruptedException e){
e.printStackTrace();
}
}
}
}

Chapter 6:

SCREENSHOTS

Fig 6.1: Entering Server IP at client end

Fig 6.1: Entering Server port address at client end

Fig 6.3:Entering listening port address at server end

Fig 6.4: multimedia access through remote server

Fig 6.5: document access through remote server

Fig 6.6: control through remote server

Chapter 7:
TESTING

6.1 Testing

Plan

Software testing is a critical element of software quality assurance and represents the ultimate
review of specification, design and coding. Testing presents an interesting anomaly for the
software engineer.
6.1.1 Testing Objective includes
Testing is a process of executing a program with the intent of finding an error. A good test case is
one that has a probability of finding an as yet undiscovered error. A successful test is one that
uncovers an undiscovered error.
6.1.2 Testing Principles

All tests should be traceable to end user requirements


Tests should be planned long before testing begins
Testing should begin on a small scale and progress towards testing in large.
Exhaustive testing is not possible
To be most effective testing should be conducted by a independent third party

6.2 Testing

Strategies

6.2.1 Integration Test Cases


After the unit testing we have to perform integration testing. The goal here is to see if modules
can be integrated properly, the emphasis being on testing interfaces between modules. This
testing activity can be considered as testing the design and hence the emphasis on testing module
interactions
In this project the main system is formed by integrating all the modules. When integrating all the
modules I have checked whether the integration effects working of any of the services by giving
different combinations of inputs with which the two services run perfectly before Integration.
It detects faults that have not been detected during unit testing, by focusing on small groups of
components.

Integration testing strategies

Bottom-up testing

Top-down testing

Sandwich testing

The bottom-up testing strategy first individually tests each component of the bottom layer and
then integrates them with components of the next layer up. The advantage of bottom-up testing is
that interface faults can be more easily found. The disadvantage faults found on top layer may
often leads to changes in the subsystemdecomposition.
The top-down testing strategy unit tests the components of the top layer first and then integrates
the components of the next layer down. The advantage of top-down testing is that it starts with
user interface components.
The same set of tests, derived from the requirements, can be used in testing the increasingly more
complex set of subsystems.
The sandwich testing strategy combines the top-down and bottom-up strategies, attempting to
make use of the best of both strategies.

Chapter 8:
CONCLUSION

In the present generation systems, there is a need for the administrator has to go all around the
network in order to terminate any system that is left non-terminated. The administrator has to

take all the trouble of going to a particular system to access a file that is needed by him. In order
to get the system configuration details of any particular system, the administrator has to take the
trouble of going to that system for obtaining the information. The processes that are running in a
particular system can be viewed only in that system itself by using the present generation
softwares.
So, by using this project we can avoid all the above problems. This project is very useful in the
corporate field for monitoring the employees activities.
The current existing systems are potentially good systems, which do allow us to remotely
connect to the remote machines and access their respective desktops. But most of the existing
systems are quite difficult to use and implement for a layman.
The Remote desktop Administrator will allow the system administrator to use or to remotely
control the other systems through a simple application. This software intends to leverage existing
technologies and to utilize them in a new way. The proposed Remote desktop will exist in a
distributed computer environment such as the Internet but will also be accessible from with
in an intranet such as an office or in the home itself.
By using platform independent languages like JAVA, for development, gives freedom to use
same application in heterogeneous system.
Thus this system may be proved very helpful in removing the existence of difficulties arising due
to the changing of location of server and client within the organizations to improve geographical
situation of the architecture.
If this system will be used in a large organization by using an ADSL router the working by
establishing the communication between employees of the organization will be more effective
and more convenient. Transfer of the information from one employee to another will not require
the actual movement of the employee within the organization.
The administrator can get the configuration of the remote system from the server system itself
using this software.
In order to terminate the operations on the remote systems, the administrator can obtain the
current process details of the remote systems from the server itself. Running rmi registry in the
client systems performs all the above operations

Chapter 9:
FUTURE
ENHANCEMENTS

In this project it is unable to scan any malware and virus in client system and notify it to the
server system. Further we want to implement this concept that if any malware or virus found in
client systems then a message will be sent to the server system as a notification along with brief
details.
Also we want to introduce a concept that, if any pen drive is inserted into client system illegally
then automatically it should be formatted and system should shutdown.
Future enhancement for this project may be that a big source of bandwidth such as an ADSL
router is introduced between server and client so that the transfer of response of client to server
will be faster and the working on server will be easier and more effective and the administrator
will take more interest in working with this system.
A new concept may be that an antivirus system is installed on server and as soon as the client
handover the control to the server, the server will scan the client system before accessing the
client and if there is a malware is found then it will remove the suspected ones and then will
access the client system. In this way the client system will behave as the removable device such
as pen drive or any other type of removable device.
As this system is developed in JAVA so the system may be used on any of device supporting
JAVA. Due to the platform independency of the language, server and client may be changed if
the ip address of both the systems is known. It will reduce the dependency of single location of
the server or difficulties faced in changing the location of the server will be overcome.
If this system will be used in a large organization by using an ADSL router, the working by
establishing the communication between employees of the organization will be more effective
and more convenient. Transfer of the information from one employee to another will not require
the actual movement of the employee within the organization.
Thus it is clear that it may be the best option for creating LAN within the organizations as it
doesnt require the internet connection as the compulsory one and it is platform independent so it
will not require the fixed position of server and client like internet connection.

Chapter 10:
REFERENCES

[1] Sun Yu, Context aware applications for a Pocket PC. Master of Science thesis,
School of Microelectronics and Information Technology, Royal Institute of
Technology (KTH), Stockholm, Sweden, COS/CCS 2007-28, 17 December

2007. Available from: http://web.it.kth.se/~maguire/DEGREE-PROJECTREPORTS/


071220-Sun_Yu-with-cover.pdf
[2] The Official Bluetooth Technology Info Site. Get Technical. Available at:
http://www.bluetooth.com/Bluetooth/Technology/
[3] Osmosis Latina. Sistemas de Informacin con enfoque de software libre y de
cdigoabierto. LANs Inhalmbricas y Bluetooth. Available at:
http://www.osmosislatina.com/conectividad/bluetooth.htm
[4] Webopedia. What is Bluetooth? Available at:
http://www.webopedia.com/TERM/b/bluetooth.html
[5] Wikipedia. Bluetooth. Available at: http://en.wikipedia.org/wiki/Bluetooth
[6] Kioskea.net. Knowledge kiosk. Cmofunciona Bluetooth. Available at:
http://es.kioskea.net/bluetooth/bluetooth-fonctionnement.php3
[7] Wikipedia. Bluetooth. Personal Area Network. Available at:
http://en.wikipedia.org/wiki/Personal_area_network
[8] The Official Bluetooth Technology Info Site. Communication Topology.
Available at:
http://www.bluetooth.com/Bluetooth/Technology/Works/Communications_
Topology.htm
[9] The Official Bluetooth Technology Info Site. Bluetooth Wireless Technology
Profiles. Available at:
http://www.bluetooth.com/Bluetooth/Technology/Works/Profiles_Overview.
Htm
[10] Allan Beaufour Larsen, Secure Access Control Using Mobile Bluetooth
Devices, Master of Science Thesis, University of Copenhagen, July 2003.
Available at:
http://www.diku.dk/forskning/distlab/Publication/Master's_Theses/2003/bea
ufour03secure.pdf
[11] The Official Bluetooth Technology Info Site. Security. Available at:
http://www.bluetooth.com/Bluetooth/Technology/Works/Security/
[12] Manoj Nair, A Paper In Security Concerns In Bluetooth Technology.
Available at: http://www.datastronghold.com/security-articles/generalsecurityarticles/a-paper-on-security-concerns-in-bluetooth-technology.html
[13] Wi-Fi. Knowledge Center. Glossary. Available at:
http://www.wi-fi.com/knowledge_center_overview.php?type=3 3802

[14] Wi-Fi. Wireless Technology. Wireless Fidelity. Wi-Fi, What is Wi-Fi?


Available at: http://www.wifinotes.com/what-is-wifi.html
[15] Wi-Fi. Knowledge Center. The How and Why of Wi-Fi. Available at:
http://www.wi-fi.org/knowledge_center/kc-howandwhyofwi-fi
[16] Harold Davis, Anywhere computing with laptops. Making mobile easier,
September 2005
[17] H: Schulzrinne, S. Casner, V. Jacobson, R. Frederick , RTP: A transport
Protocol for Real-Time Applications. IETF. RFC 3550. July 2003. Available
at: http://www.ietf.org/rfc/rfc3550.txt
[18] Wikipedia. MAC Address. Availabe at:
http://en.wikipedia.org/wiki/MAC_address
[19] Wikipedia. Transport layer security. Available at:
http://en.wikipedia.org/wiki/Secure_Sockets_Layer
[20] Wikipedia. Remote desktop software. Available at:
http://en.wikipedia.org/wiki/Remote_desktop_software
[21] Real VNC. Applications of VNC. Available at:
http://www.realvnc.com/vnc/how.html
[22] Tristan Richardson, The RFB Protocol, RealVNC Ltd., Version 3. 8,
28 August 2008. Available at: http://www.realvnc.com/docs/rfbproto.pdf
[23] Real VNC. The original open source cross-platform remote control solution.
Available at: http://www.realvnc.com/vnc/why.html
[24] Wikipedia. Terminal Services. Availabe at:
http://en.wikipedia.org/wiki/Terminal_Services
[25] Microsoft Developer Network. Remote Desktop Protocol (Windows).
Available at: http://msdn.microsoft.com/en-us/library/aa383015.aspx
[26] Microsoft Help and Support. Understanding the Remote Desktop Protocol
(RDP). Available at:http://support.microsoft.com/default.aspx?scid=kb;EN-US;q186607

You might also like