You are on page 1of 61

INTRODUCTION

Desktop Spy is used to lock remote desktop so that it prevents unauthorized users
accessing the information. Once system acts as a client and other system acts as server.
This is similar to data transfer. From server the commands are sent to lock client system.
Once the command is received locking operation is performed on client desktop. Client
window is deactivated. No action can be performed this side. Server need to send
command to unlock the remote system. Once the data is received client desktop is
released and task is performed. And application is used to remote desktop shutdown and
opens the internet explorer. This project is deals managing in controlling network client
system.
1.1ABSTRACT

Multicast Server, included with Windows XP Professional, enables you to connect to


your computer across the Internet from virtually any computer. Once connected,
Multicast Server gives you mouse and keyboard control over your computer while
showing you everything that's happening on the screen. With Multicast Server, you can
leave your computer at the office without losing access to your files, applications, and e-
mail.

With Multicast Server, you can connect to your work computer from home and access all
of your programs, files, and network resources as though you were actually sitting in
front of your computer at work.

Multicast Server Connection, available for most 32-bit versions of Windows including
Windows Mobile and Apple's Mac OS X, that allows a user to connect to a server
running Terminal Services. On Windows, both Terminal Services client and Multicast
Server Protocol use TCP port 3389 by default. It also includes a control to embed the
functionality in other applications or even a web page. Server versions of Windows OSs
also include the Multicast Server for Administration client (a special mode of the
Multicast Server Connection client), which allows remote connection to the console of
the server, where all command line applications can be run. The server functionality is
provided by the Terminal component, which is able to handle Remote Assistance,
Multicast Server as well as the Remote Administration clients.
INTRODUCTION

LANGUAGE INTRODUCTION

SOFTWARE FEATURES

VISUAL BASIC.NET
Visual Baic.Net has revolutionized windows programming windows programming and
with an object based, event driven approach to software designs. Visual basic.Net
applications act as a front end to the database. Visual basic.Net application provides the
interface between the user and the database. Sophisticated features that make the
language truly object oriented and interfaces it with the latest in the database technology.

.NET provides a new, object-oriented API as a set of classes that will be accessible
from any programming language. This book describes this framework of classes and
provides a reference to what is available and how you can use this framework to write
Windows applications in the brave new world of .NET.

Microsoft .NET Framework is a computing platform for developing distributed


applications for the Internet. Following are the design goals of Microsoft .NET
Framework:

1. To provide a very high degree of language interoperability


2. To provide a runtime environment that completely manages code execution
3. To provide a very simple software deployment and versioning model
4. To provide high-level code security through code access security and strong type
checking
5. To provide a consistent object-oriented programming model
6. To facilitate application communication by using industry standards such as
SOAP and XML.
7. To simplify Web application development
Visual basic.net lets the user to add menus, text boxes, command buttons, option
buttons, check boxes, list boxes, scroll bars, and file directory boxes to blank windows.
Visual basic.net has many different tools.

The Common Language Runtime


The CLR is the mechanism through which .NET code is executed. It is built upon a
single, common language—IL—into which source languages are compiled and includes
mechanisms for executing the compiled code. This includes code verification and just-in-
time (JIT) compilation, garbage collection and enforcement of security policies, and the
provision of profiling and debugging services.

The CLR provides a lot of added value to the programs it supports. Because it controls
how a .NET program executes and sits between the program and the operating system, it
can implement security, versioning support, automatic memory management through
garbage collection, and provide transparent access to system services

IMPORTANT FEATURES:
• The application is a graphical user interface.
• Client-Server architecture benefits picture and image box can be
easily handled using bit mapped files and icons.
• Bit mapped files and icons are used as simple debugging tools.
• With the advent of .NET, Microsoft has introduced many new
technologies that make writing component-based distributed
systems easier, more flexible, and more powerful than ever before.
• It is now easier than it has ever been to write components in any
programming language that can interoperate with components on
other machines, which may not be Windows-based at all.

.
Software description:
Hardware requirements:

Processor : Pentium-IV 2.6GHz


Hard Memory : 40GB
Monitor : Samsung 15 color
Keyboard : 118 keys
Mouse : Logitech
Ram : 1GB

Software Requirements

Front end : VB.Net

Back end : SQL SERVER

Operating System : Windows/Xp/Nt

Existing System:

 In existing system accessing the remote system is very slow


 All works are done manually
 Manual process takes long period of time and it is cost consuming too.

Proposed system:

 Proposed system overcomes the disadvantages of existing system.


 It is can access the remote system at high speed
 It is less expensive and time saving process.
Modules:
 Remote desktop
 File and data transfer
 Applications

Remote desktop:

This module helps in capturing the remote desktop at runtime. This module helps
in monitoring the remote system.

File and Data Transfer

File transfer
This module helps in transferring file to remote desktop by sending current ip address of
the system. File need to be send will have to give ip and files are send from server to
client system

Data transfer:
This is similar to above process except data’s are send to the remote system.

Applications

This module helps in performing applications like logging of the remote


system, restarting the remote system, accessing applications like notepad, paint,
calculator, internet facilities.
DATA FLOW DIAGRAM
SERVER

DATA
TRANSFER
CLIENT

FILE
TRANSFER

NETWORK
LOCK

NETWORK
LOCK
SAMPLE CODING

LOGIN CODE:
Public Class login
Dim fcap, fcap1 As Integer

Private Sub Panel1_Paint(ByVal sender As System.Object,


ByVal e As System.Windows.Forms.PaintEventArgs) Handles
Panel1.Paint

End Sub

Private Sub Label3_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Label3.Click

End Sub

Private Sub Button1_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
If TextBox1.Text = "admin" And TextBox2.Text =
"admin" Then
Dim f As New server()
f.Show()
Me.Hide()
Else
MessageBox.Show("invalid user")
End If
End Sub
End Class
MAIN FORM CODE:

Imports System
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Imports System.Threading
Imports System.Drawing
Imports System.IO
Public Class server
Dim handler As Socket
Public th As Thread
Public th1 As Thread
Public Data As String
Public fname As String
Public ext As String
Dim i As Integer
Public msg As Byte()
Dim apppath As String
Dim cap As Integer
Public f As Integer
Public _crypto As CryptoLib.Crypto
Delegate Sub SetDisplay(ByVal [Text] As String)
Public Sub Connect()
Try
ipHostinfo = Dns.Resolve(Dns.GetHostName())
ipAdd = ipHostinfo.AddressList(0)
localEndPoint = New IPEndPoint(ipAdd, 11000)
listner.Bind(localEndPoint)
listner.Listen(10)
th = New System.Threading.Thread(AddressOf
Acceptstart)
th.Start()
i = 1
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

End Sub

Private Sub Form1_FormClosed(ByVal sender As Object,


ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles
Me.FormClosed
If i = 1 Then
th.Abort()
End If
If i = 2 Then
th.Abort()
th1.Abort()
End If
If handler IsNot Nothing Then
handler.Shutdown(SocketShutdown.Both)
handler.Close()
End If
Dim p1 As Process = Process.GetCurrentProcess()
p1.Kill()
End Sub

Private Sub Form1_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load
List1.Items.Add("Waiting For Connection")
Me.listner = New
System.Net.Sockets.Socket(Net.Sockets.AddressFamily.InterNe
twork, Net.Sockets.SocketType.Stream,
Net.Sockets.ProtocolType.Tcp)
apppath =
System.Windows.Forms.Application.StartupPath.ToString()
RText.Text = apppath
f = 2
End Sub

Private Sub Button1_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Connect()
End Sub
Public Sub Acceptstart()
handler = listner.Accept()
th1 = New System.Threading.Thread(AddressOf Receive)
th1.Start()
i = 2
MessageBox.Show("Connected")
End Sub
Public Sub Proccessdata(ByVal str As String)
If Me.List.InvokeRequired Then
Dim d As New SetDisplay(AddressOf Proccessdata)
Me.Invoke(d, New Object() {str})
Else
Me.List.Items.Add(str)
If (cap = 0) Then
Button4.Enabled = True
End If
If str = "ok" Then
Me.Button1.Visible = True
Label1.Visible = True
List1.Visible = True
Label4.Visible = False
Button3.Visible = False
RText.Visible = False
RText.Text = apppath
Me.Size = New System.Drawing.Size(919, 489)
End If
If f = 0 Then
Button1.Visible = True
Label1.Visible = True
List1.Visible = True
Label4.Visible = False
Button3.Visible = False
RText.Visible = False
RText.Text = apppath
Me.Size = New System.Drawing.Size(919, 489)
End If
If str.Length > 12 Then
If str.Substring(0, 12).ToString() =
"FileTransfer" Then

Dim i As Integer
Dim j As Integer
j = str.IndexOf(".") + 1
i = str.IndexOf(":") + 1
ext = str.Substring(j, str.Length - j)
fname = str.Substring(i, str.Length - i)

If (MessageBox.Show("Select Path For


Receiving File-->" + fname + " Format", "File Received
Alert", MessageBoxButtons.OK, MessageBoxIcon.Warning) =
Windows.Forms.DialogResult.OK) Then
Me.Button1.Visible = False
Label1.Visible = False
List1.Visible = False
Label4.Visible = True
Button3.Visible = True
RText.Visible = True
RText.Text = RText.Text + "\" +
fname
Me.Size = New
System.Drawing.Size(410, 138)
End If
End If
End If
End If
End Sub
Public Sub Receive()
Try
Dim bytes(100000) As Byte
Dim bytesRec As Integer
bytes = New Byte(100000) {}
A: While True
bytesRec = handler.Receive(bytes)
If bytesRec > 0 Then
Data = Encoding.ASCII.GetString(bytes,
0, bytesRec)
Exit While
End If
End While
If cap = 1 Then
cap = 0
Try
Dim path As String
path =
System.Windows.Forms.Application.StartupPath.ToString() +
"\T1.Bmp"
Dim fli As New FileStream(path,
FileMode.OpenOrCreate, FileAccess.Write)
fli.Write(bytes, 0, bytesRec)
fli.Close()
Dim s As New FileStream(path,
FileMode.Open, FileAccess.Read)
Picture.Image = Image.FromStream(s)
s.Close()
Catch ex As Exception
msg = Encoding.ASCII.GetBytes("stop")
cap = 0
handler.Send(msg)
GoTo C
End Try
End If
If f = 1 Then
Dim fl As New FileStream(RText.Text,
FileMode.Create, FileAccess.Write)
fl.Write(bytes, 0, bytesRec)
fl.Close()
Try
msg = Encoding.ASCII.GetBytes("Done")
handler.Send(msg)
f = 0
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
C: Proccessdata(Data)
'Proccessdata(bytesRec.ToString())
ActionData(Data)
GoTo A
Catch ex As Exception
MessageBox.Show("Server Problem:" +
ex.Message.ToString())
End Try

End Sub
Public Sub ActionData(ByVal str As String)
Select Case str
Case "Notepad"
Process.Start("Notepad.exe")
Case "Mspaint"
Process.Start("Mspaint.exe")
Case "Calc"
Process.Start("calc.exe")
Case "Word"
Process.Start("C:\Program Files\Microsoft
Office\OFFICE11\WINWORD.EXE")
Case "CDOPEN"
mciSendString("set CDAudio door open", "",
0, 0)
Case "CDCLOSE"
mciSendString("set CDAudio door closed",
"", 0, 0)

End Select
End Sub

Private Sub Button2_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
Try
msg = Encoding.ASCII.GetBytes(Txtmsg.Text)
handler.Send(msg)
Txtmsg.Text = ""
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private Sub Button3_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Button3.Click
If RText.Text = "" Then
MessageBox.Show("Fill Receive Path")
Else
Dim i As Integer
i = RText.Text.IndexOf(".") + 1
If RText.Text.Substring(i, RText.Text.Length -
i) <> ext Then
MessageBox.Show("Invalid File
Extension,Receive File in " + ext)
Else
Try
msg = Encoding.ASCII.GetBytes("Ack")
f = 1
handler.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
End If
End Sub

Private Sub Button4_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button4.Click
Try
msg = Encoding.ASCII.GetBytes("ICapturing")
handler.Send(msg)
cap = 1
Button4.Enabled = False
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button5_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button5.Click
Try
msg = Encoding.ASCII.GetBytes("LogOff")
handler.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button6_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button6.Click
Try
msg = Encoding.ASCII.GetBytes("ShutDown")
handler.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button7_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button7.Click
Try
msg = Encoding.ASCII.GetBytes("Restart")
handler.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button8_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button8.Click
Try
msg = Encoding.ASCII.GetBytes("Mlock")
handler.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button9_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button9.Click
Try
msg = Encoding.ASCII.GetBytes("MRel")
handler.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private Sub Button10_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Button10.Click
Dim fileName As String
Dim ofd As OpenFileDialog
Try
ofd = New OpenFileDialog

With ofd
.Filter = "xxx Files (*.xxx)|*.xxx"
.Multiselect = False
.Title = "Select a file to decrypt:"
If .ShowDialog = DialogResult.OK Then
fileName = .FileName
Else
Return
End If
End With

_crypto = New CryptoLib.Crypto


_crypto.DecryptFile(fileName,
fileName.Substring(0, fileName.Length - 4), "hitesh")
Catch ex As Exception
MessageBox.Show(ex.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
If Not ofd Is Nothing Then ofd.Dispose()
If Not _crypto Is Nothing Then _crypto.Dispose()
End Try
End Sub

Private Sub List_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
List.SelectedIndexChanged

End Sub

Private Sub Label6_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Label6.Click

End Sub
End Class

Designer Page:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGene
rated()> _
Partial Class server
Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.


<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the


Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.Pmsg = New System.Windows.Forms.Panel
Me.List = New System.Windows.Forms.ListBox
Me.Label3 = New System.Windows.Forms.Label
Me.Button2 = New System.Windows.Forms.Button
Me.Label2 = New System.Windows.Forms.Label
Me.Txtmsg = New System.Windows.Forms.TextBox
Me.Panel1 = New System.Windows.Forms.Panel
Me.Button3 = New System.Windows.Forms.Button
Me.RText = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.Button1 = New System.Windows.Forms.Button
Me.List1 = New System.Windows.Forms.ListBox
Me.Label1 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.Button4 = New System.Windows.Forms.Button
Me.T1 = New
System.Windows.Forms.Timer(Me.components)
Me.Panel2 = New System.Windows.Forms.Panel
Me.Button10 = New System.Windows.Forms.Button
Me.Button7 = New System.Windows.Forms.Button
Me.Button9 = New System.Windows.Forms.Button
Me.Button8 = New System.Windows.Forms.Button
Me.Button6 = New System.Windows.Forms.Button
Me.Button5 = New System.Windows.Forms.Button
Me.Label5 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.PictureBox2 = New System.Windows.Forms.PictureBox
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.Picture = New System.Windows.Forms.PictureBox
Me.Pmsg.SuspendLayout()
Me.Panel1.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.Panel2.SuspendLayout()
CType(Me.PictureBox2,
System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox1,
System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Picture,
System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Pmsg
'
Me.Pmsg.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Pmsg.Controls.Add(Me.List)
Me.Pmsg.Controls.Add(Me.Label3)
Me.Pmsg.Controls.Add(Me.Button2)
Me.Pmsg.Controls.Add(Me.Label2)
Me.Pmsg.Controls.Add(Me.Txtmsg)
Me.Pmsg.Location = New System.Drawing.Point(15, 143)
Me.Pmsg.Name = "Pmsg"
Me.Pmsg.Size = New System.Drawing.Size(460, 134)
Me.Pmsg.TabIndex = 5
'
'List
'
Me.List.FormattingEnabled = True
Me.List.Location = New System.Drawing.Point(100, 10)
Me.List.Name = "List"
Me.List.Size = New System.Drawing.Size(154, 69)
Me.List.TabIndex = 4
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(3, 10)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(81, 13)
Me.Label3.TabIndex = 3
Me.Label3.Text = "Rcvd Msges:"
'
'Button2
'
Me.Button2.BackColor =
System.Drawing.SystemColors.InactiveCaptionText
Me.Button2.Font = New
System.Drawing.Font("Microsoft Sans Serif", 8.25!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button2.Location = New System.Drawing.Point(260,
86)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(75, 27)
Me.Button2.TabIndex = 2
Me.Button2.Text = "Send"
Me.Button2.UseVisualStyleBackColor = False
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.Location = New System.Drawing.Point(3, 95)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(91, 13)
Me.Label2.TabIndex = 0
Me.Label2.Text = "Your Message:"
'
'Txtmsg
'
Me.Txtmsg.Location = New System.Drawing.Point(100,
86)
Me.Txtmsg.Multiline = True
Me.Txtmsg.Name = "Txtmsg"
Me.Txtmsg.Size = New System.Drawing.Size(154, 32)
Me.Txtmsg.TabIndex = 1
'
'Panel1
'
Me.Panel1.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Panel1.Controls.Add(Me.Button3)
Me.Panel1.Controls.Add(Me.RText)
Me.Panel1.Controls.Add(Me.Label4)
Me.Panel1.Controls.Add(Me.Button1)
Me.Panel1.Controls.Add(Me.List1)
Me.Panel1.Controls.Add(Me.Label1)
Me.Panel1.Location = New System.Drawing.Point(15,
19)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(460, 118)
Me.Panel1.TabIndex = 6
'
'Button3
'
Me.Button3.BackColor =
System.Drawing.SystemColors.InactiveCaptionText
Me.Button3.Font = New
System.Drawing.Font("Microsoft Sans Serif", 8.25!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button3.Location = New System.Drawing.Point(162,
85)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(75, 23)
Me.Button3.TabIndex = 7
Me.Button3.Text = "Receive"
Me.Button3.UseVisualStyleBackColor = False
Me.Button3.Visible = False
'
'RText
'
Me.RText.Location = New System.Drawing.Point(100,
26)
Me.RText.Multiline = True
Me.RText.Name = "RText"
Me.RText.Size = New System.Drawing.Size(347, 36)
Me.RText.TabIndex = 5
Me.RText.Visible = False
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.Location = New System.Drawing.Point(3, 31)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(60, 13)
Me.Label4.TabIndex = 9
Me.Label4.Text = "File path:"
Me.Label4.Visible = False
'
'Button1
'
Me.Button1.BackColor =
System.Drawing.SystemColors.Control
Me.Button1.Location = New System.Drawing.Point(4,
26)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.TabIndex = 1
Me.Button1.Text = "start"
Me.Button1.UseVisualStyleBackColor = False
'
'List1
'
Me.List1.FormattingEnabled = True
Me.List1.Location = New System.Drawing.Point(85, 10)
Me.List1.Name = "List1"
Me.List1.Size = New System.Drawing.Size(337, 69)
Me.List1.TabIndex = 4
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(3, 10)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(76, 13)
Me.Label1.TabIndex = 3
Me.Label1.Text = "Server state"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.Pmsg)
Me.GroupBox1.Controls.Add(Me.Panel1)
Me.GroupBox1.Location = New System.Drawing.Point(3,
250)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(491,
309)
Me.GroupBox1.TabIndex = 7
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "GroupBox1"
'
'Button4
'
Me.Button4.BackColor =
System.Drawing.SystemColors.InactiveCaptionText
Me.Button4.Font = New
System.Drawing.Font("Microsoft Sans Serif", 15.0!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button4.Location = New System.Drawing.Point(896,
648)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(176, 54)
Me.Button4.TabIndex = 3
Me.Button4.Text = "Start Capturing"
Me.Button4.UseVisualStyleBackColor = False
'
'T1
'
Me.T1.Interval = 1000
'
'Panel2
'
Me.Panel2.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Panel2.Controls.Add(Me.Button10)
Me.Panel2.Controls.Add(Me.Button7)
Me.Panel2.Controls.Add(Me.Button9)
Me.Panel2.Controls.Add(Me.Button8)
Me.Panel2.Controls.Add(Me.Button6)
Me.Panel2.Controls.Add(Me.Button5)
Me.Panel2.Controls.Add(Me.Label5)
Me.Panel2.Location = New System.Drawing.Point(10,
616)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(484, 104)
Me.Panel2.TabIndex = 10
'
'Button10
'
Me.Button10.BackColor =
System.Drawing.SystemColors.InactiveCaptionText
Me.Button10.Font = New
System.Drawing.Font("Microsoft Sans Serif", 8.25!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button10.Location = New
System.Drawing.Point(181, 68)
Me.Button10.Name = "Button10"
Me.Button10.Size = New System.Drawing.Size(81, 31)
Me.Button10.TabIndex = 8
Me.Button10.Text = "Decrypt File"
Me.Button10.UseVisualStyleBackColor = False
'
'Button7
'
Me.Button7.BackColor =
System.Drawing.SystemColors.InactiveCaptionText
Me.Button7.Font = New
System.Drawing.Font("Microsoft Sans Serif", 8.25!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button7.Location = New System.Drawing.Point(62,
26)
Me.Button7.Name = "Button7"
Me.Button7.Size = New System.Drawing.Size(69, 31)
Me.Button7.TabIndex = 6
Me.Button7.Text = "Restart"
Me.Button7.UseVisualStyleBackColor = False
'
'Button9
'
Me.Button9.BackColor =
System.Drawing.SystemColors.InactiveCaptionText
Me.Button9.Font = New
System.Drawing.Font("Microsoft Sans Serif", 8.25!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button9.Location = New System.Drawing.Point(240,
26)
Me.Button9.Name = "Button9"
Me.Button9.Size = New System.Drawing.Size(121, 31)
Me.Button9.TabIndex = 7
Me.Button9.Text = "Mouse Release"
Me.Button9.UseVisualStyleBackColor = False
'
'Button8
'
Me.Button8.BackColor =
System.Drawing.SystemColors.InactiveCaptionText
Me.Button8.Font = New
System.Drawing.Font("Microsoft Sans Serif", 8.25!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button8.Location = New System.Drawing.Point(367,
26)
Me.Button8.Name = "Button8"
Me.Button8.Size = New System.Drawing.Size(100, 31)
Me.Button8.TabIndex = 6
Me.Button8.Text = "MouseLock"
Me.Button8.UseVisualStyleBackColor = False
'
'Button6
'
Me.Button6.BackColor =
System.Drawing.SystemColors.InactiveCaptionText
Me.Button6.Font = New
System.Drawing.Font("Microsoft Sans Serif", 8.25!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button6.Location = New System.Drawing.Point(137,
26)
Me.Button6.Name = "Button6"
Me.Button6.Size = New System.Drawing.Size(97, 31)
Me.Button6.TabIndex = 5
Me.Button6.Text = "ShutDown"
Me.Button6.UseVisualStyleBackColor = False
'
'Button5
'
Me.Button5.BackColor =
System.Drawing.SystemColors.InactiveCaptionText
Me.Button5.Font = New
System.Drawing.Font("Microsoft Sans Serif", 8.25!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button5.Location = New System.Drawing.Point(6,
26)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(50, 31)
Me.Button5.TabIndex = 4
Me.Button5.Text = "Log Off"
Me.Button5.UseVisualStyleBackColor = False
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label5.Location = New System.Drawing.Point(3, 9)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(100, 13)
Me.Label5.TabIndex = 4
Me.Label5.Text = "System Process:"
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Font = New System.Drawing.Font("Monotype
Corsiva", 25.0!, CType((System.Drawing.FontStyle.Bold Or
System.Drawing.FontStyle.Italic),
System.Drawing.FontStyle),
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label6.Location = New System.Drawing.Point(174,
41)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(216, 41)
Me.Label6.TabIndex = 12
Me.Label6.Text = "Server Desktop"
'
'PictureBox2
'
Me.PictureBox2.Image =
Global.ServerForm.My.Resources.Resources.images_47_
Me.PictureBox2.Location = New
System.Drawing.Point(398, 12)
Me.PictureBox2.Name = "PictureBox2"
Me.PictureBox2.Size = New System.Drawing.Size(80,
84)
Me.PictureBox2.TabIndex = 13
Me.PictureBox2.TabStop = False
'
'PictureBox1
'
Me.PictureBox1.BackgroundImage =
Global.ServerForm.My.Resources.Resources.images_31_1
Me.PictureBox1.Location = New
System.Drawing.Point(0, 96)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(542,
129)
Me.PictureBox1.TabIndex = 11
Me.PictureBox1.TabStop = False
'
'Picture
'
Me.Picture.BackColor = System.Drawing.Color.Black
Me.Picture.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Picture.Location = New System.Drawing.Point(548,
12)
Me.Picture.Name = "Picture"
Me.Picture.Size = New System.Drawing.Size(797, 630)
Me.Picture.SizeMode =
System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.Picture.TabIndex = 8
Me.Picture.TabStop = False
'
'server
'
Me.AutoScaleDimensions = New
System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode =
System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.LightSkyBlue
Me.ClientSize = New System.Drawing.Size(1370, 746)
Me.Controls.Add(Me.PictureBox2)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.Panel2)
Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Picture)
Me.Controls.Add(Me.GroupBox1)
Me.Name = "server"
Me.Text = "Server Testing Form "
Me.Pmsg.ResumeLayout(False)
Me.Pmsg.PerformLayout()
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
Me.GroupBox1.ResumeLayout(False)
Me.Panel2.ResumeLayout(False)
Me.Panel2.PerformLayout()
CType(Me.PictureBox2,
System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox1,
System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Picture,
System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Pmsg As System.Windows.Forms.Panel
Friend WithEvents List As System.Windows.Forms.ListBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Txtmsg As System.Windows.Forms.TextBox
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents List1 As System.Windows.Forms.ListBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend listner As System.Net.Sockets.Socket
Friend ipHostinfo As System.Net.IPHostEntry
Friend ipAdd As System.Net.IPAddress
Friend localEndPoint As System.Net.IPEndPoint
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents RText As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents GroupBox1 As
System.Windows.Forms.GroupBox
Friend WithEvents Picture As
System.Windows.Forms.PictureBox
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents T1 As System.Windows.Forms.Timer
Friend WithEvents Panel2 As System.Windows.Forms.Panel
Friend WithEvents Button6 As System.Windows.Forms.Button
Friend WithEvents Button5 As System.Windows.Forms.Button
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Button7 As System.Windows.Forms.Button
Friend WithEvents Button9 As System.Windows.Forms.Button
Friend WithEvents Button8 As System.Windows.Forms.Button
Friend WithEvents Button10 As
System.Windows.Forms.Button
Friend WithEvents PictureBox1 As
System.Windows.Forms.PictureBox
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents PictureBox2 As
System.Windows.Forms.PictureBox

End Class

CLIENT SIDE:

Imports System
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Imports System.Threading
Imports System.Drawing
Imports System.IO
Imports System.Runtime.InteropServices
Imports System.Text.Encoder

Public Class Conn


Public msg As Byte()
Public th As Thread
Public cap As Thread
Public Data As String
Dim i As Integer

Delegate Sub SetDisplay(ByVal [Text] As String)

Private Declare Function CreateDC Lib "gdi32" Alias


"CreateDCA" (ByVal lpDriverName As String, ByVal
lpDeviceName As String, ByVal lpOutput As String, ByVal
lpInitData As String) As Integer

Private Declare Function CreateCompatibleDC Lib "GDI32"


(ByVal hDC As Integer) As Integer

Private Declare Function CreateCompatibleBitmap Lib


"GDI32" (ByVal hDC As Integer, ByVal nWidth As Integer,
ByVal nHeight As Integer) As Integer

Private Declare Function GetDeviceCaps Lib "gdi32" Alias


"GetDeviceCaps" (ByVal hdc As Integer, ByVal nIndex As
Integer) As Integer

Private Declare Function SelectObject Lib "GDI32" (ByVal


hDC As Integer, ByVal hObject As Integer) As Integer

Private Declare Function BitBlt Lib "GDI32" (ByVal


srchDC As Integer, ByVal srcX As Integer, ByVal srcY As
Integer, ByVal srcW As Integer, ByVal srcH As Integer, ByVal
desthDC As Integer, ByVal destX As Integer, ByVal destY As
Integer, ByVal op As Integer) As Integer

Private Declare Function DeleteDC Lib "GDI32" (ByVal


hDC As Integer) As Integer
Private Declare Function DeleteObject Lib "GDI32" (ByVal
hObj As Integer) As Integer
Declare Function BlockInput Lib "User32" _
(ByVal fBlockIt As Boolean) As Boolean
Const SRCCOPY As Integer = &HCC0020

Private oBackground As Bitmap


Public _crypto As CryptoLib.Crypto
Private FW, FH As Integer

Public Sub CaptureScreen()


Dim hSDC, hMDC As Integer
Dim hBMP, hBMPOld As Integer
Dim r As Integer
hSDC = CreateDC("DISPLAY", "", "", "")
hMDC = CreateCompatibleDC(hSDC)
FW = GetDeviceCaps(hSDC, 8)
FH = GetDeviceCaps(hSDC, 10)
hBMP = CreateCompatibleBitmap(hSDC, FW, FH)
hBMPOld = SelectObject(hMDC, hBMP)
r = BitBlt(hMDC, 0, 0, FW, FH, hSDC, 0, 0, 13369376)
hBMP = SelectObject(hMDC, hBMPOld)
r = DeleteDC(hSDC)
r = DeleteDC(hMDC)
oBackground = Image.FromHbitmap(New IntPtr(hBMP))
DeleteObject(hBMP)
End Sub
Public Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Try
Connect()
If i = 1 Then
Pmsg.Visible = True
Tab.Visible = True
Me.Size = New System.Drawing.Size(586, 304)
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Public Sub Button2_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Button2.Click
Try
msg = Encoding.ASCII.GetBytes(Txtmsg.Text)
Me.sender.Send(msg)
Txtmsg.Text = ""
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
''If (OFD.ShowDialog() =
Windows.Forms.DialogResult.OK) Then
'' Me.sender.SendFile(OFD.FileName.ToString())
''End If
End Sub
Public Sub Connect()
Try
ipHostinfo = Dns.Resolve(Txtserver.Text)
ipAdd = ipHostinfo.AddressList(0)
remoteEP = New IPEndPoint(ipAdd, 11000)
sender.Connect(remoteEP)
th = New System.Threading.Thread(AddressOf
Receive)
th.Start()
i = 1
MessageBox.Show("Client Connected With Server->"
+ Txtserver.Text)
Catch ex As Exception
MessageBox.Show(ex.Message)

End Try

End Sub
Public Sub Proccessdata(ByVal str As String)
If Me.List.InvokeRequired Then
Dim d As New SetDisplay(AddressOf Proccessdata)
Me.Invoke(d, New Object() {str})
Else
Me.List.Items.Add(str)
If (str = "Ack") Then
Me.Button2.Enabled = False
Me.Button10.Enabled = True
End If
If (str = "ICapturing") Then
startcap()
End If
If (str = "stop") Then
T1.Enabled = False
End If
If (str = "Done") Then
Me.Button2.Enabled = True
Me.Button10.Enabled = False
Try
msg = Encoding.ASCII.GetBytes("ok")
Me.sender.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End If
End If
End Sub
Public Sub startcap()
T1.Enabled = True
End Sub

Public Sub Receive()


Dim bytes(100000) As Byte
Dim bytesRec As Integer
A: While True
bytes = New Byte(100000) {}
bytesRec = sender.Receive(bytes)
If bytesRec > 0 Then
Data = Encoding.ASCII.GetString(bytes, 0,
bytesRec)
Exit While
End If
End While
'List.Items.Add(Data)
'MessageBox.Show(Data)
Proccessdata(Data)
ActionData(Data)
GoTo A
End Sub

Private Sub Conn_FormClosed(ByVal sender As Object,


ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles
Me.FormClosed
If i = 1 Then
th.Abort()
Me.sender.Shutdown(SocketShutdown.Both)
Me.sender.Close()
End If
Dim p1 As Process
Dim p As Process() =
Process.GetProcessesByName("client.exe")
For Each p1 In p
p1.Kill()
Next
End Sub
Private Sub Conn_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
Me.Size = New System.Drawing.Size(298, 162)
Me.sender = New
System.Net.Sockets.Socket(Net.Sockets.AddressFamily.InterNe
twork, Net.Sockets.SocketType.Stream,
Net.Sockets.ProtocolType.Tcp)
End Sub

Private Sub Button3_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button3.Click
Try
msg = Encoding.ASCII.GetBytes("Notepad")
Me.sender.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button4_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button4.Click
Try
msg = Encoding.ASCII.GetBytes("Mspaint")
Me.sender.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button5_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button5.Click
Try
msg = Encoding.ASCII.GetBytes("Calc")
Me.sender.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button6_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button6.Click
Try
msg = Encoding.ASCII.GetBytes("CDOPEN")
Me.sender.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button7_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button7.Click
Try
msg = Encoding.ASCII.GetBytes("CDCLOSE")
Me.sender.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button8_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button8.Click
If (OFD.ShowDialog() =
Windows.Forms.DialogResult.OK) Then
FileT.Text = OFD.FileName.ToString()
End If
End Sub

Private Sub Button9_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button9.Click
Try
Dim str As String
Dim i As Integer
Dim j As Integer
i = OFD.FileName.LastIndexOf(("\")) + 1
j = OFD.FileName.LastIndexOf((".")) + 1

If Ch1.Checked = True Then


str = "FileTransfer:" +
OFD.FileName.Substring(i, j - i - 1).ToString() + ".XXX"
Else
str = "FileTransfer:" +
OFD.FileName.Substring(i, OFD.FileName.Length - i)
End If
MessageBox.Show(str)
msg = Encoding.ASCII.GetBytes(str)
Me.sender.Send(msg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub Button10_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
Button10.Click
If Ch1.Checked = True Then
Try
_crypto = New CryptoLib.Crypto
Dim fname As String
Dim i As Integer
Dim j As Integer
i = OFD.FileName.LastIndexOf("\") + 1
j = OFD.FileName.IndexOf(".")
fname = OFD.FileName.Substring(i, j - i)
_crypto.EncryptFile(OFD.FileName, fname &
".xxx", "hitesh")
Dim fl As New FileStream(fname & ".xxx",
FileMode.OpenOrCreate, FileAccess.Read)
Dim b(100000) As Byte
Dim l As Integer
l = fl.Read(b, 0, fl.Length)
Me.sender.Send(b, l, SocketFlags.None)
Me.sender.SendFile(OFD.FileName.ToString())
fl.Close()
Catch ex As Exception
MessageBox.Show(ex.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally
'If Not OFD Is Nothing Then OFD.Dispose()
'If Not _crypto Is Nothing Then
_crypto.Dispose()
End Try
Else
Dim fl As New FileStream(OFD.FileName,
FileMode.OpenOrCreate, FileAccess.Read)
Dim b(100000) As Byte
Dim l As Integer
l = fl.Read(b, 0, fl.Length)
Me.sender.Send(b, l, SocketFlags.None)
Me.sender.SendFile(OFD.FileName.ToString())
fl.Close()
End If
End Sub
Private Sub Timer_Tick(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles T1.Tick
CaptureScreen()
Dim b(10000000) As Byte
Dim path As String
path =
System.Windows.Forms.Application.StartupPath.ToString() +
"\T1.bmp"
oBackground.Save(path)
Dim fl As New FileStream(path, FileMode.Open,
FileAccess.Read)
Dim l As Integer
l = fl.Read(b, 0, fl.Length)
fl.Close()
Me.sender.Send(b, l, SocketFlags.None)
File.Delete(path)
T1.Enabled = False

End Sub

Public Sub ActionData(ByVal str As String)


Select Case str
Case "LogOff"
'MessageBox.Show("logoff")
Process.Start("shutdown", "-l -f -t 0")
Case "ShutDown"
' MessageBox.Show("ShutDown")
Process.Start("shutdown", "-s -f -t 0")
Case "Restart"
'MessageBox.Show("Restart")
Process.Start("shutdown", "-r -f -t 0")
Case "Mlock"
BlockInput(True)
Case "MRel"
BlockInput(False)
End Select
End Sub
End Class

Designer
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGene
rated()> _
Partial Class Conn
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the


Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.Label1 = New System.Windows.Forms.Label
Me.Txtserver = New System.Windows.Forms.TextBox
Me.Button1 = New System.Windows.Forms.Button
Me.Pcon = New System.Windows.Forms.Panel
Me.Button2 = New System.Windows.Forms.Button
Me.Pmsg = New System.Windows.Forms.Panel
Me.List = New System.Windows.Forms.ListBox
Me.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Txtmsg = New System.Windows.Forms.TextBox
Me.Tab = New System.Windows.Forms.TabControl
Me.TabPage1 = New System.Windows.Forms.TabPage
Me.Button5 = New System.Windows.Forms.Button
Me.Button4 = New System.Windows.Forms.Button
Me.Button3 = New System.Windows.Forms.Button
Me.TabPage2 = New System.Windows.Forms.TabPage
Me.Button7 = New System.Windows.Forms.Button
Me.Button6 = New System.Windows.Forms.Button
Me.TabPage3 = New System.Windows.Forms.TabPage
Me.Ch1 = New System.Windows.Forms.CheckBox
Me.Button10 = New System.Windows.Forms.Button
Me.Button9 = New System.Windows.Forms.Button
Me.FileT = New System.Windows.Forms.TextBox
Me.Button8 = New System.Windows.Forms.Button
Me.OFD = New System.Windows.Forms.OpenFileDialog
Me.T1 = New
System.Windows.Forms.Timer(Me.components)
Me.Picture1 = New System.Windows.Forms.PictureBox
Me.Label4 = New System.Windows.Forms.Label
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.Pcon.SuspendLayout()
Me.Pmsg.SuspendLayout()
Me.Tab.SuspendLayout()
Me.TabPage1.SuspendLayout()
Me.TabPage2.SuspendLayout()
Me.TabPage3.SuspendLayout()
CType(Me.Picture1,
System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox1,
System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(3, 29)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(63, 13)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Server Ip:"
'
'Txtserver
'
Me.Txtserver.Location = New
System.Drawing.Point(93, 26)
Me.Txtserver.Name = "Txtserver"
Me.Txtserver.Size = New System.Drawing.Size(108, 20)
Me.Txtserver.TabIndex = 1
'
'Button1
'
Me.Button1.BackColor =
System.Drawing.SystemColors.Control
Me.Button1.Font = New
System.Drawing.Font("Microsoft Sans Serif", 10.0!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button1.Location = New System.Drawing.Point(93,
52)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(81, 37)
Me.Button1.TabIndex = 1
Me.Button1.Text = "Connect"
Me.Button1.UseVisualStyleBackColor = False
'
'Pcon
'
Me.Pcon.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Pcon.Controls.Add(Me.Button1)
Me.Pcon.Controls.Add(Me.Label1)
Me.Pcon.Controls.Add(Me.Txtserver)
Me.Pcon.Location = New System.Drawing.Point(218, 96)
Me.Pcon.Name = "Pcon"
Me.Pcon.Size = New System.Drawing.Size(220, 112)
Me.Pcon.TabIndex = 3
'
'Button2
'
Me.Button2.BackColor =
System.Drawing.SystemColors.Control
Me.Button2.Location = New System.Drawing.Point(260,
90)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(75, 23)
Me.Button2.TabIndex = 2
Me.Button2.Text = "Send"
Me.Button2.UseVisualStyleBackColor = False
'
'Pmsg
'
Me.Pmsg.BorderStyle =
System.Windows.Forms.BorderStyle.FixedSingle
Me.Pmsg.Controls.Add(Me.List)
Me.Pmsg.Controls.Add(Me.Label3)
Me.Pmsg.Controls.Add(Me.Button2)
Me.Pmsg.Controls.Add(Me.Label2)
Me.Pmsg.Controls.Add(Me.Txtmsg)
Me.Pmsg.Location = New System.Drawing.Point(218,
214)
Me.Pmsg.Name = "Pmsg"
Me.Pmsg.Size = New System.Drawing.Size(340, 134)
Me.Pmsg.TabIndex = 4
Me.Pmsg.Visible = False
'
'List
'
Me.List.FormattingEnabled = True
Me.List.Location = New System.Drawing.Point(100, 10)
Me.List.Name = "List"
Me.List.Size = New System.Drawing.Size(154, 69)
Me.List.TabIndex = 4
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(3, 10)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(81, 13)
Me.Label3.TabIndex = 3
Me.Label3.Text = "Rcvd Msges:"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("Microsoft
Sans Serif", 8.25!, System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.Location = New System.Drawing.Point(3, 95)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(91, 13)
Me.Label2.TabIndex = 0
Me.Label2.Text = "Your Message:"
'
'Txtmsg
'
Me.Txtmsg.Location = New System.Drawing.Point(100,
86)
Me.Txtmsg.Multiline = True
Me.Txtmsg.Name = "Txtmsg"
Me.Txtmsg.Size = New System.Drawing.Size(154, 32)
Me.Txtmsg.TabIndex = 1
'
'Tab
'
Me.Tab.Controls.Add(Me.TabPage1)
Me.Tab.Controls.Add(Me.TabPage2)
Me.Tab.Controls.Add(Me.TabPage3)
Me.Tab.Location = New System.Drawing.Point(457, 94)
Me.Tab.Name = "Tab"
Me.Tab.SelectedIndex = 0
Me.Tab.Size = New System.Drawing.Size(278, 112)
Me.Tab.TabIndex = 5
'
'TabPage1
'
Me.TabPage1.BackColor =
System.Drawing.Color.Transparent
Me.TabPage1.Controls.Add(Me.Button5)
Me.TabPage1.Controls.Add(Me.Button4)
Me.TabPage1.Controls.Add(Me.Button3)
Me.TabPage1.Location = New System.Drawing.Point(4,
22)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Padding = New
System.Windows.Forms.Padding(3)
Me.TabPage1.Size = New System.Drawing.Size(270, 86)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Accessories"
Me.TabPage1.UseVisualStyleBackColor = True
'
'Button5
'
Me.Button5.FlatAppearance.BorderColor =
System.Drawing.Color.Red
Me.Button5.FlatAppearance.BorderSize = 2
Me.Button5.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Button5.Font = New
System.Drawing.Font("Microsoft Sans Serif", 10.0!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button5.Location = New System.Drawing.Point(132,
10)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(109, 36)
Me.Button5.TabIndex = 5
Me.Button5.Text = "Calculator"
Me.Button5.UseVisualStyleBackColor = True
'
'Button4
'
Me.Button4.FlatAppearance.BorderColor =
System.Drawing.Color.Red
Me.Button4.FlatAppearance.BorderSize = 2
Me.Button4.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Button4.Font = New
System.Drawing.Font("Microsoft Sans Serif", 10.0!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button4.Location = New System.Drawing.Point(31,
47)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(85, 23)
Me.Button4.TabIndex = 4
Me.Button4.Text = "MsPaint"
Me.Button4.UseVisualStyleBackColor = True
'
'Button3
'
Me.Button3.FlatAppearance.BorderColor =
System.Drawing.Color.Red
Me.Button3.FlatAppearance.BorderSize = 2
Me.Button3.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Button3.Font = New
System.Drawing.Font("Microsoft Sans Serif", 10.0!,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button3.Location = New System.Drawing.Point(31,
17)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(85, 23)
Me.Button3.TabIndex = 3
Me.Button3.Text = "Notepad"
Me.Button3.UseVisualStyleBackColor = True
'
'TabPage2
'
Me.TabPage2.BackColor =
System.Drawing.SystemColors.ButtonFace
Me.TabPage2.Controls.Add(Me.Button7)
Me.TabPage2.Controls.Add(Me.Button6)
Me.TabPage2.Location = New System.Drawing.Point(4,
22)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Padding = New
System.Windows.Forms.Padding(3)
Me.TabPage2.Size = New System.Drawing.Size(270, 86)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "CD DRIVE"
Me.TabPage2.UseVisualStyleBackColor = True
'
'Button7
'
Me.Button7.FlatAppearance.BorderColor =
System.Drawing.Color.Red
Me.Button7.FlatAppearance.BorderSize = 2
Me.Button7.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Button7.Location = New System.Drawing.Point(31,
47)
Me.Button7.Name = "Button7"
Me.Button7.Size = New System.Drawing.Size(75, 23)
Me.Button7.TabIndex = 7
Me.Button7.Text = "CLOSE"
Me.Button7.UseVisualStyleBackColor = True
'
'Button6
'
Me.Button6.FlatAppearance.BorderColor =
System.Drawing.Color.Red
Me.Button6.FlatAppearance.BorderSize = 2
Me.Button6.FlatStyle =
System.Windows.Forms.FlatStyle.System
Me.Button6.Location = New System.Drawing.Point(31,
18)
Me.Button6.Name = "Button6"
Me.Button6.Size = New System.Drawing.Size(75, 23)
Me.Button6.TabIndex = 6
Me.Button6.Text = "OPEN"
Me.Button6.UseVisualStyleBackColor = True
'
'TabPage3
'
Me.TabPage3.Controls.Add(Me.Ch1)
Me.TabPage3.Controls.Add(Me.Button10)
Me.TabPage3.Controls.Add(Me.Button9)
Me.TabPage3.Controls.Add(Me.FileT)
Me.TabPage3.Controls.Add(Me.Button8)
Me.TabPage3.Location = New System.Drawing.Point(4,
22)
Me.TabPage3.Name = "TabPage3"
Me.TabPage3.Size = New System.Drawing.Size(270, 86)
Me.TabPage3.TabIndex = 2
Me.TabPage3.Text = "FileTX"
Me.TabPage3.UseVisualStyleBackColor = True
'
'Ch1
'
Me.Ch1.AutoSize = True
Me.Ch1.Location = New System.Drawing.Point(16, 65)
Me.Ch1.Name = "Ch1"
Me.Ch1.Size = New System.Drawing.Size(114, 17)
Me.Ch1.TabIndex = 11
Me.Ch1.Text = "Encrypt then Send"
Me.Ch1.UseVisualStyleBackColor = True
'
'Button10
'
Me.Button10.BackColor =
System.Drawing.SystemColors.Control
Me.Button10.Location = New System.Drawing.Point(97,
36)
Me.Button10.Name = "Button10"
Me.Button10.Size = New System.Drawing.Size(75, 23)
Me.Button10.TabIndex = 10
Me.Button10.Text = "Send"
Me.Button10.UseVisualStyleBackColor = False
'
'Button9
'
Me.Button9.BackColor =
System.Drawing.SystemColors.Control
Me.Button9.Location = New System.Drawing.Point(16,
36)
Me.Button9.Name = "Button9"
Me.Button9.Size = New System.Drawing.Size(75, 23)
Me.Button9.TabIndex = 9
Me.Button9.Text = "Alert Server"
Me.Button9.UseVisualStyleBackColor = False
'
'FileT
'
Me.FileT.Location = New System.Drawing.Point(97, 7)
Me.FileT.Name = "FileT"
Me.FileT.Size = New System.Drawing.Size(157, 20)
Me.FileT.TabIndex = 1
'
'Button8
'
Me.Button8.Location = New System.Drawing.Point(16,
7)
Me.Button8.Name = "Button8"
Me.Button8.Size = New System.Drawing.Size(75, 23)
Me.Button8.TabIndex = 8
Me.Button8.Text = "Browse"
Me.Button8.UseVisualStyleBackColor = True
'
'T1
'
Me.T1.Interval = 5000
'
'Picture1
'
Me.Picture1.Location = New
System.Drawing.Point(564, 212)
Me.Picture1.Name = "Picture1"
Me.Picture1.Size = New System.Drawing.Size(169, 136)
Me.Picture1.SizeMode =
System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.Picture1.TabIndex = 6
Me.Picture1.TabStop = False
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("Monotype
Corsiva", 26.25!, CType((System.Drawing.FontStyle.Bold Or
System.Drawing.FontStyle.Italic),
System.Drawing.FontStyle),
System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.Location = New System.Drawing.Point(381,
26)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(217, 43)
Me.Label4.TabIndex = 2
Me.Label4.Text = "Client Desktop"
'
'PictureBox1
'
Me.PictureBox1.Image =
Global.ClientForm.My.Resources.Resources.images_47_
Me.PictureBox1.Location = New
System.Drawing.Point(604, 12)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(79,
76)
Me.PictureBox1.TabIndex = 2
Me.PictureBox1.TabStop = False
'
'Conn
'
Me.AutoScaleDimensions = New
System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode =
System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.LightSkyBlue
Me.ClientSize = New System.Drawing.Size(953, 421)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Picture1)
Me.Controls.Add(Me.Tab)
Me.Controls.Add(Me.Pmsg)
Me.Controls.Add(Me.Pcon)
Me.Name = "Conn"
Me.StartPosition =
System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Connection Form"
Me.Pcon.ResumeLayout(False)
Me.Pcon.PerformLayout()
Me.Pmsg.ResumeLayout(False)
Me.Pmsg.PerformLayout()
Me.Tab.ResumeLayout(False)
Me.TabPage1.ResumeLayout(False)
Me.TabPage2.ResumeLayout(False)
Me.TabPage3.ResumeLayout(False)
Me.TabPage3.PerformLayout()
CType(Me.Picture1,
System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox1,
System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()

End Sub
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Txtserver As
System.Windows.Forms.TextBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Pcon As System.Windows.Forms.Panel
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents Pmsg As System.Windows.Forms.Panel
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Txtmsg As System.Windows.Forms.TextBox
Friend WithEvents List As System.Windows.Forms.ListBox
Friend sender As System.Net.Sockets.Socket
Friend ipHostinfo As System.Net.IPHostEntry
Friend ipAdd As System.Net.IPAddress
Friend remoteEP As System.Net.IPEndPoint
Friend WithEvents Tab As System.Windows.Forms.TabControl
Friend WithEvents TabPage1 As
System.Windows.Forms.TabPage
Friend WithEvents TabPage2 As
System.Windows.Forms.TabPage
Friend WithEvents Button5 As System.Windows.Forms.Button
Friend WithEvents Button4 As System.Windows.Forms.Button
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Button7 As System.Windows.Forms.Button
Friend WithEvents Button6 As System.Windows.Forms.Button
Friend WithEvents TabPage3 As
System.Windows.Forms.TabPage
Friend WithEvents Button9 As System.Windows.Forms.Button
Friend WithEvents FileT As System.Windows.Forms.TextBox
Friend WithEvents Button8 As System.Windows.Forms.Button
Friend WithEvents OFD As
System.Windows.Forms.OpenFileDialog
Friend WithEvents Button10 As
System.Windows.Forms.Button
Friend WithEvents T1 As System.Windows.Forms.Timer
Friend WithEvents Picture1 As
System.Windows.Forms.PictureBox
Friend WithEvents Ch1 As System.Windows.Forms.CheckBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents PictureBox1 As
System.Windows.Forms.PictureBox
End Class

8. SYSTEM DESIGN
System design is the process of planning a new system to complement or altogether
replace the old system. The purpose of the design phase is the first step in moving from
the problem domain to the solution domain. The design of the system is the critical aspect
that affects the quality of the software. System design is also called top-level design. The
design phase translates the logical aspects of the system into physical aspects of the
system.

INPUT DESIGN
Input design is one of the most important phase of the system design. Input design is
the process where the input received in the system are planned and designed, so as to get
necessary information from the user, eliminating the information that is not required. The
aim of the input design is to ensure the maximum possible levels of accuracy and also
ensures that the input is accessible that understood by the user.

The input design is the part of overall system design, which requires very careful
attention. if the data going into the system is incorrect then the processing and output will
magnify the errors.

The objectives considered during input design are:

• Nature of input processing.


• Flexibility and thoroughness of validation rules.
• Handling of properties within the input documents.
• Screen design to ensure accuracy and efficiency of the input
relationship with files.
• Careful design of the input also involves attention to error
handling, controls, batching and validation procedures.

Input design features can ensure the reliability of the system and produce result from
accurate data or they can result in the production of erroneous information. The input
design of the system includes the following

OUTPUT DESIGN
Output design is very important concept in the computerized system, without reliable
output the user may feel the entire system is unnecessary and avoids using it. The proper
output design is important in any system and facilitates effective decision-making.

The output design of the system includes the following

INPUT DESIGN FORM:

Server form:

Login :
Main Form:

File to be encrypted:
Transfer file:
Client Form:

Connecting with the server:

After connection established:


File Decrypted:

View Decrypted File:


OUTPUT DESIGN FORM:

Server Login form


Main form

Captruring the remote system:


Data transfer:
Client Side:
Connection with server:

Receiving message:
TESTING AND IMPLEMENTATION

TESTING

Testing is a series of different tests that whose primary purpose is to fully

exercise the computer based system. Although each test has a different purpose, all work

should verify that all system element have been properly integrated and performed

allocated function. Testing is the process of checking whether the developed system

works according to the actual requirement and objectives of the system.

The philosophy behind testing is to find the errors. A good test is one that has a

high probability of finding an undiscovered error. A successful test is one that uncovers

the undiscovered error. Test cases are devised with this purpose in mind. A test case is a
set of data that the system will process as an input. However the data are created with the

intent of determining whether the system will process them correctly without any errors

to produce the required output.

IMPLEMENTATION

System implementation is stage in the project where the theoretical design is

turned into the working system. The most crucial stage is giving the users confidence that

the new system will work effectively and efficiently.

The performance of reliability of the system is tested and it gained acceptance.

The system was implemented successfully. Implementation is a process that means

converting a new system in to operation.

Proper implementation is essential to provide a reliable system to meet

organization requirements. During the implementation stage a live demon was

undertaken and made in front of end-users. The various features provided in the system

were discussed during implementation.


Advantage:

Network security
Data loss is prevented
CONCLUSION:

This project helps in preventing all unauthorized users accessing the information . Data
loss is minimized. All operation is controlled in server side. Locking operation is
performed in server side which locks the client system . Once locked no operation is
performed on client side. Loss is prevented. Network locking is carried out in application
to prevent network intruders.
BIBLIOGRAPHY

• .Distributed .NET Programming in VB .NET by Tom Barnaby

• Professional VB.NET, 2nd Edition by Fred Barwell, et al

• The .NET Languages: A Quick Translation Guide by Brian

Bischof

• Programming VB.NET: A Guide for Experienced Programmers

by Gary Cornell, Jonathan Morrison

• Learning Visual Basic.NET Through Applications by Clayton

Crooks II

• Visual Basic .NET How to Program (2nd Edition) by Harvey M.

Deitel, Paul J. Deitel, Tem R. Nieto

You might also like