ATHARVA COLLEGE OF ENGINEERING Malad (WEST), Mumbai-400 096
PROJECT ON:
PC EXPERT
DEVELOPED BY
Hardik Shah Subin Cheruvath Nikhil Loke1
Vaibhav Datir
GUIDED BY
Mrs. Sumita Chandak
2
PC EXPERT
3
ACKNOWLEDGEMENT
We are honored and grateful to express our project through this project report to our Lecturers and colleagues.
Firstly we would like to thank our respected guide Mr. Abhijeet Dangaonkar, who always stood by our side and gave us all the support that we required during the different phases of our Project development. He also provided valuable guidance, extended help, and constant encouragement for the development of the project.
We would also like to give honorable gratitude to our respected HOD Mr. Y.I.Shah who never made our moral go down and also shared his valuable experience, knowledge and provided constant guidance to us.
4
We would also like to thank entire CSE department and its helpful staff, technicians who have always willingly cooperated with us in resolving all our queries and providing us all the required facilities in time.
PREFACE
5
This book is meant to serve as a guide to our project PC EXPERT which will help you to customize your WINDOWS XP and also use the hidden utilities which are not transparent to the normal user.
This book not only describes our project development but also helps the user how to manage it well. We all are very proud to give our project development details and the application of our developed software.
This book also gives the details of our each tools with its application , screenshot and its description in brief .It also describes the various feasibility ,cost and technical requirement for the software .It also gives actual input and output views which the user would use to interact with the software.
6
INTRODUCTION
PC EXPERT is a set of small computer utility applications..It is a tweaking utility basically designed for windows xp. PC EXPERT allows you to change a multitude of settings in the registry. It consists of some network tools also which can be useful for students and administrators which will allow them to find different information such as hosting provider of a particular website, who is lookup, trace route etc. Regardless of all views the customization tool has a lot to do with a basic administrator or with normal regular user who has a lot expectation from O.S. where the user is limited from the customization point of view wherein user needs a lot but gets nothing Base of this PC Expert is two types of tools viz. Net tools and PC Tweaking Tools. Net tools are basic tools for administrator in this aspiring student who wants to gain more knowledge regarding it. Next category of tools is PC Tweaking7
Tools which will help basic user and to all who has great imagination from pc customization point of view PC Expert will basically help all user as well as the professionals to get more advanced information about hidden windows utility.
CONTENTS
1. Project Objectives8
2. Project Selection
3. Problem Statement
4. Project Management
1.
System Design 1. 2. 3. 4. Software Selection Data flow diagram Flowchart Page design
6.
Coding
1.
Application and advantages
2.
Future Development
9
3.
Bibliography
4.
Conclusion
PROJECT OBJECTIVES10
OBJECTIVES1. 2. 3. Conceptualize the layout of the PC EXPERT & develop the user interface. Create a Solution Architecture identifying the key components of your solution. Carry out coding and testing as necessary to produce a program which can be compiled and run with out any bugs
11
12
PROJECT SELECTION
13
PROJECT SELECTION
Computer software like customization toolkits have become a driving force in todays modern technology world. It is a software which helps the administrator to handle the entire network or a single computer according to its needs. It serves as a basic reference to the administrator for PC customizing. In such growing IT revolution it is very difficult to choose a complete customization tool kit with various utilities. The various projects that can be implemented are:
SYSTEM SOFTWARE:
14
These are the programs written to service other programs. E.g. compiler editors etc. System software implements control function that enable application software to interface with system elements. It is very challenging to build system software but ,big organizations have already developed them and having a monopoly in t6he market(e.g. Norton, Microsoft and Turbo). It is very difficult to find sponsors for system software.
REAL TIME SOFTWARES:
Programs that monitors/analyses/controls the real world events, as they occur, are called real time software s. Real time software are very difficult to develop because of limited knowledge, time constraints, and high investments.
EMBEDDED SOFTWARE:
15
Developing an embedded system needs perfect in-out embedded working of product at hardware level which companies do not release. It is difficult to go ahead with buildings an embedded system.
PERSONAL COMPUTER SOFTWARES:
Today thousands of softwares like word processors , spread sheets, entertainments etc are available free or at a very low cost thus such projects has almost no market value.
BUSINESS SOFTWARES:
Management Information systems (MIS) accsses one or more databases containing business information for smooth operation of organization and for decision making.
APPLICATION SOFTWARES:
Application software implements the procedure that is required to accommodate information processing functions. My project is a application software .It essentially provides emailing services to organizations.
16
We have selected this project due to the following reasons:
1.
As I have studied visual basic in the 6th semester in our subject System Analysis & Designing especially in practical, so it becomes easy to create a logical model of the overall system on the basis of my knowledge.
2.
In addition it also helps to make the project management easier as I have studied in the subject System Analysis & Designing
3.
This idea was also aroused to us through some reference computer magazines like chip, digit and many more
4.
We also chose this project as this one is different from all others ever yet done
17
18
PROBLEM STATEMENT
19
PROBLEM STATEMENTDevelop an application that allows user to do following task:
All tools are divided in two sections 1. NET TOOLS: - In this section some network related applications will be added. Such as port scanner, route tracer, WHO IS lookup and many more PC TWEAKING TOOLS :- Applications in this section will allow the user to customize their pc in the way they want and should allow the administrators to secure their pc from intruders
2.
1) NET TOOLS20
1.
Host Lookup :-
Create an application which will allow the user to find IP address of any domain or host.
2.
Fetch Html Source Code:-
This application should allow the user to see the html source code of any webpage directly. This will decrease the steps for viewing the source code of webpage.
3.
Port Scanner:This application should allow the user to scan any IP address for open ports. It will use TCP connect scan method for port scanning TCP Connect scan: - This type of scan is the most reliable, although it is also the most detectable. It is easily logged and detected because a full connection is established. Open ports reply with a SYN/ACK, whereas closed ports respond with an RST/ACK.
4.
Port Listener:This will allow the user to listen on any particular port in their pc and see what is happening at that port.
5.
Trace Route:This should allow the user to see how the connection is established between two systems. This will show the route of the data transmission between two systems21
6.
Ping Ip address:This application will allow the user to ping any IP address. It will also allow the user to determine the number of packets for ping with good user interface
7.
Who is Lookup Utility:This application should allow the user to find the host provider for any domain name and other related info of the domain name.
2) PC TWEAKING TOOLS8. Change Title of Internet Explorer Window:-
Create an application which will allow the user to change the title of the Microsoft Internet Explorer.
9.
Change The Display Name Of a processor:-
Create an application which allows the user to change the processor name of the pc. This will allow the user to customize his pc 10. Desktop Lock:22
Develop an application which can lock the desktop and disable task manager. It should deny the access to desktop without proper password. When the desktop is locked , no one should be able to access the documents, browse computer or use programs 1. Change Windows Default Icons:-
Create an application which will allow the user to change default windows icons like My Computer, Recycle Bin icons etc. 2. Logon Banner:-
Write a code and develop an application to allow the user to create a logon banner. This application can be used in a company to display the companies private policy before someone logs in. 13. Change Windows Media Player Title Bar:Write a code and create an application to allow the user to change the windows media player title so that user can customize his pc in the way he wants
1.
Speed Up Start Menu Display Speed:-
Microsoft has added some delay in start menu display. Create an application which will allow the user to set the delay time
2.
Screen Shot Capturing Tool:-
Create an application which allows the user to take screenshots easily and which will take screenshots automatically23
3.
Add Item to right click:-
Develop an application for normal pc users which allows them to add items to right click (In Right click Menu for Folder and File)
4.
Add any program to startup:-
Many software adds themselves in the startup automatically but it is not easy for normal users to add items to startup, so develop an application which allows the user to add items to startup easily.
Add some more utilities in this set if possible
24
PROJECT MANAGEMENT
25
PROJECT MANAGEMENT:Project management is a process of scoping, planning, organizing and controlling the development of an acceptable system within a specified time-frame.
For the proper management of a project I required eight different phases to develop our application .They are as follows:
1.
INITIAL INVESTIGATION1. Negotiate preliminary scope. 2. List problems, opportunities and directives
3.
PROBLEM ANALYSIS1.2.
Analyses problems and opportunities Present findings and recommendations
4.
REQUIREMENT ANALYSIS26
1. 2.
Define requirements Analyze functional requirements
1.
DECISION ANALYSIS1. Recommend a solution 2. Plan project
1. DESIGN PHASE1. Design general view for application 2. Design the system interface for each tool
1. CONSTRUCTION PHASE1. Install and test new software packages (If necessary)2.
Write and test new program.
1. INSTALLATION PHASE1. Build and test the package 2. Conduct system test
1.
DOCUMENTATION1. Prepare project report
27
GRANT CHART:
A Grant Chart is a simple horizontal bar chart that despites project task. The tasks are listed vertically in the left-hand column. The horizontal axis is a calendar timeline. Figure shows how project is going to be developed i.e. various phases, its completion time their relationships.
TASK NAME Jan
2010 Feb Mar April
28
Project Management Initial Investigation Problem Analysis Requirement Analysis Decision Analysis Design Phase Construction Phase Installation Phase Documentation Phase
29
SYSTEM DESIGN
30
SOFTWARE SELECTION31
SOFTWARE USEDOur application is developed using: 1. 2. Microsoft Visual Basic 6.0 API.
API:32
Windows is a graphical user interface. It uses graphics to organize our workspace. In windows environment, we choose items and execute programs by pointing and clicking with mouse. Moreover, the programs (such as MS-Excel, MS-Word) can run only within Windows, because Windows provides build-in functions and data that is not available in other environments This system defined functions that an application can call are provided by an interface known as the application program interface or API. The API is an interface between an application and the windows environment. The API is provided by the operating system (Windows) to all applications.
33
Visual Basic:The predecessor of Visual Basic was BASIC (Beginners All Purpose Symbolic Instruction Code). BASIC was mainly interpreter-based whereas Visual Basic is partly interpreter-based and partly complier-based. The main advantage of Visual Basic is that it is a Rapid Application Development tool. This is the main reason why visual basic is extensively used as a prototyping language. Microsoft Windows manages to handle multiple windows, events, messages. Dealing with all of possible combination of windows, events and messages could be mind-boggling. But Visual Basic insulates you from having to deal with lowlevel message handling. Many of the messages are handled automatically by Visual basic; others are exposed as event procedures for your convenience. VB is extensively used as a prototyping language as it is a Rapid Application Development Tool. It insulates you from having deal with low-level message handling.
34
35
DATA FLOW DIAGRAM
DATA FLOW DIAGRAM
36
It is a graphic representation of a system that shows data flows to, from and within the systems, processing a function that changes the data in some manner and storage of the data. A DFD is the starting point of the design phase that functionally decomposes the requirement specifications down to the lowest level of detail.
The symbols used while creating a DFD are:
The image part with relationship ID rId7 was not found in the file.
37
DFDService Request PC EXPERT
USERProvided Service
38
39
FLOWCHART
40
START
PC EXPERT
TYPE?
PC TWEAKING TOOLS
NETTOOLS
Procee
Procee
Back Exit STOP Exit
Back
41
PAGE DESIGN
42
LOADING FORM
The image part with relationship ID rId8 was not found in the file.
43
MAIN FORM
44
The image part with relationship ID rId9 was not found in the file.
45
HOST LOOKUP
The image part with relationship ID rId10 was not found in the file.
46
PORT LISTENER
47
The image part with relationship ID rId11 was not found in the file.
PING48
The image part with relationship ID rId12 was not found in the file.
49
FETCH HTML CODE
The image part with relationship ID rId13 was not found in the file.
50
PORT SCANNER
51
The image part with relationship ID rId14 was not found in the file.
52
WHOIS LOOKUP
The image part with relationship ID rId15 was not found in the file.
53
TRACE ROUTE
The image part with relationship ID rId16 was not found in the file.
54
LOCK DRIVE
The image part with relationship ID rId17 was not found in the file.
55
ADD PROGRAM TO STARTUP
56
The image part with relationship ID rId18 was not found in the file.
57
LOGON BANNER
58
CHANGE MEDIA PLAYER TITLE
59
SPEEDUP START MENU
60
61
DESKTOP LOCK
62
CHANGE PROCESSOR NAME
63
The image part with relationship ID rId23 was not found in the file.
64
CHANGE IE TITLE
65
ADD ITEM TO RIGHT CLICK
66
SCREEN CAPTURING TOOL
67
The image part with relationship ID rId26 was not found in the file.
68
HELP FILE
The image part with relationship ID rId27 was not found in the file.
69
CODING70
MAIN FORMDim IP as String Dim Keep Going As Integer71
Dim Total Num As Long Dim I Return As Long, sLowByte As String, sHighByte As String Dim sMsg As String, HostLen As Long Dim Hostent As Hostent, PointerToPointer As Long, ListAddress As Long Dim WSAdata As WSAdata, DotA As Long, DotAddr As String, ListAddr As Long Dim MaxUDP As Long, MaxSockets As Long, i As Integer Dim Description As String, Status As String Dim ExitTheFor Integer ' Ping Variables Dim bReturn As Boolean, hIP As Long Dim szBuffer As String Dim Addr As Long Dim RCode As String Dim RespondingHost As String ' TRACERT Variables Dim TraceRT As Boolean Dim TTL As Integer ' WSock32 Constants Const WS_VERSION_MAJOR = &H101 \ &H100 And &HFF& Const WS_VERSION_MINOR = &H101 And &HFF&
72
Const MIN_SOCKETS_REQD = 0 Dim exityn As Integer
Option Explicit Private Sub Form_Load() begin: lblie.Visible = False lblstart.Visible = False lbldesklock.Visible = False lblbanner.Visible = False lblmedia.Visible = False lbldis.Visible = False lblscreen.Visible = False lblitem.Visible = False lblproc.Visible = False
lblhost.Visible = False lblhtml.Visible = False lblports.Visible = False lblportl.Visible = False lblping.Visible = False lblwho.Visible = False
73
lbltrace.Visible = False
Timer1.Interval = 1 Timer1.Enabled = False txtport.Text = "0" txtoldps.Text = modRegSettings.GetRegValue(HKEY_CURRENT_USER, "PC EXPERT", "password") 'frmnet.Visible = False 'frmpctools.Visible = False 'frmpic.Visible = True frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmmedia.Visible = False frmspeed.Visible = False frmproc.Visible = False frmip.Visible = False frmhtml.Visible = False frmping.Visible = False frmaddright.Visible = False frmscreenmain.Visible = False74
frmlookup.Visible = False frmlistener.Visible = False frmwhois.Visible = False frmtracert.Visible = False txtoldpass.Text = modRegSettings.GetRegValue(HKEY_CURRENT_USER, "PC EXPERT", "screenpass") End Sub Public Sub GetRCode() RCode = "" If pIPe.Status = 0 Then RCode = "Success" If pIPe.Status = 11001 Then RCode = "Buffer too Small" If pIPe.Status = 11002 Then RCode = "Destination Unreahable" If pIPe.Status = 11003 Then RCode = "Dest Host Not Reachable" If pIPe.Status = 11004 Then RCode = "Dest Protocol Not Reachable" If pIPe.Status = 11005 Then RCode = "Dest Port Not Reachable" If pIPe.Status = 11006 Then RCode = "No Resources Available" If pIPe.Status = 11007 Then RCode = "Bad Option" If pIPe.Status = 11008 Then RCode = "Hardware Error" If pIPe.Status = 11009 Then RCode = "Packet too Big"75
If pIPe.Status = 11010 Then RCode = "Reqested Timed Out" If pIPe.Status = 11011 Then RCode = "Bad Request" If pIPe.Status = 11012 Then RCode = "Bad Route" If pIPe.Status = 11014 Then RCode = "TTL Exprd Reassemb" If pIPe.Status = 11015 Then RCode = "Parameter Problem" If pIPe.Status = 11016 Then RCode = "Source Quench" If pIPe.Status = 11017 Then RCode = "Option too Big" If pIPe.Status = 11018 Then RCode = "Bad Destination" If pIPe.Status = 11019 Then RCode = "Address Deleted" If pIPe.Status = 11020 Then RCode = "Spec MTU Change" If pIPe.Status = 11021 Then RCode = "MTU Change" If pIPe.Status = 11022 Then RCode = "Unload" If pIPe.Status = 11050 Then RCode = "General Failure"
DoEvents
If RCode "" Then If RCode = "Success" Then Speed = Speed + Val(Trim$(CStr(pIPe2.RoundTripTime))) txtpingstatus.Text = txtpingstatus.Text + " Reply from " + RespondingHost + ": Bytes = " + Trim$(CStr(pIPe2.DataSize)) + " RTT = " +76
Trim$(CStr(pIPe2.RoundTripTime)) + "ms TTL = " + Trim$(CStr(pIPe2.Options.TTL)) + vbCrLf txtpingstatus.SelStart = Len(txtpingstatus) Exit Sub End If KeepGoing = 1 txtpingstatus.Text = txtpingstatus.Text & RCode Else KeepGoing = 1 txtstatus.Text = txtstatus.Text & RCode End If txtpingstatus.SelStart = Len(txtpingstatus)
If RCode "" Then If RCode = "Reqested Timed Out" Then vbWSACleanup If TotalNum < 10 Then Response.Text = Response.Text + " # 0" & TotalNum Else Response.Text = Response.Text + " # " & TotalNum Response.Text = Response.Text + " " & RCode & vbCrLf Response.SelStart = Len(Response)77
Exit Sub End If If RCode = "Success" Then vbWSACleanup If TotalNum < 10 Then Response.Text = Response.Text + " # 0" & TotalNum Else Response.Text = Response.Text + " # " & TotalNum Response.Text = Response.Text + " " + IP + vbCrLf Response.SelStart = Len(Response) Exit Sub End If KeepGoing = 1 Response.Text = Response.Text & RCode Else If TTL - 1 < 10 Then Response.Text = Response.Text + " # 0" & TotalNum Else Response.Text = Response.Text + " # " & TotalNum Response.Text = Response.Text + " " + RespondingHost + vbCrLf End If Response.SelStart = Len(Response) End Sub
78
Private Sub cmdPing_Click() Speed = 0 PingTimes = 0 cmdping.Enabled = False ScrollTimes.Enabled = False ScrollPacket.Enabled = False txtpingstatus = "" Host = Trim$(txthostping.Text) szBuffer = Space(Val(lblPacketSize)) vbWSAStartup Host = Trim$(txthostping.Text) If Len(txthostping.Text) = 0 Then vbGetHostName End If
vbGetHostByName vbIcmpCreateFile pIPo2.TTL = Trim$(255) ' 'For Times = 1 To lblPingTimes 'If ExitTheFor = 1 Then ExitTheFor = 0: Exit For vbIcmpSendEcho
79
'Next vbIcmpCloseHandle vbWSACleanup ScrollTimes.Enabled = True ScrollPacket.Enabled = True cmdping.Enabled = True Speed = Speed / PingTimes txtpingstatus = txtpingstatus & vbCrLf & " Average Speed: " & Speed & "." txtpingstatus.SelStart = Len(txtpingstatus) Exit Sub End Sub Private Sub cmdtrace_Click() TotalNum = 0 Response.Enabled = True szBuffer = Space(32) Response.Text = "" vbWSAStartup
If Len(Host.Text) = 0 Then vbGetHostNametrace End If80
vbGetHostByNametrace vbIcmpCreateFile ' The following determines the TTL of th ' e ICMPEcho for TRACE function
TraceRT = True Response.Text = Response.Text + "Tracing Route To " + IP.Caption + ":" + Chr$(13) + Chr$(10) + Chr$(13) + Chr$(10)
For TTL = 2 To 255 If KeepGoing = 1 Then KeepGoing = 0 Exit For End If pIPo.TTL = TTL DoEvents vbIcmpSendEchotrace
DoEvents
If RespondingHost = IP.Caption Then Response.Text = Response.Text + vbCrLf + "Route Trace has Completed"81
Exit For ' Stop TraceRT End If Next TTL Response.SelStart = Len(Response) TraceRT = False vbIcmpCloseHandle vbWSACleanup End Sub Private Sub cmdwhois_Click() Winsockw.Close Dim WhoisStr As String txtWhois.Text = "" Winsockw.Connect ServerTxt, 43 End Sub Private Sub Image1_Click() Call ShellExecute(Me.hwnd, vbNullString, App.Path & "\help.chm", vbNullString, vbNullString, 2) 'Keyas End Sub
Private Sub Image2_Click() Load frmabout frmabout.Show82
End Sub
Private Sub Label1_Click(Index As Integer)
lblie.Visible = False lblstart.Visible = False lbldesklock.Visible = False lblbanner.Visible = False lblmedia.Visible = False lbldis.Visible = False lblscreen.Visible = False lblitem.Visible = False lblproc.Visible = False
lblhost.Visible = True lblhtml.Visible = True lblports.Visible = True lblportl.Visible = True lblping.Visible = True lblwho.Visible = True lbltrace.Visible = True End Sub
83
Private Sub Label2_Click(Index As Integer) lblie.Visible = True lblstart.Visible = True lbldesklock.Visible = True lblbanner.Visible = True lblmedia.Visible = True lbldis.Visible = True lblscreen.Visible = True lblitem.Visible = True lblproc.Visible = True
lblhost.Visible = False lblhtml.Visible = False lblports.Visible = False lblportl.Visible = False lblping.Visible = False lblwho.Visible = False lbltrace.Visible = False End Sub Private Sub lbltrace_Click() 'frmpic.Visible = False
84
frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmscreenmain.Visible = False frmip.Visible = False frmhtml.Visible = False frmlookup.Visible = False frmwhois.Visible = False frmtracert.Visible = True End Sub
Private Sub lblwho_Click() 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False
85
frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmscreenmain.Visible = False frmip.Visible = False frmhtml.Visible = False frmlookup.Visible = False frmwhois.Visible = True frmtracert.Visible = False End Sub
Private Sub Resolve_Click() On Error Resume Next Address.Text = "" Host = Trim$(Host.Text) If Len(Host.Text) = 0 Then vbGetHostName
86
End If vbGetHostByName End Sub Public Sub vbGetHostByName() Dim szString As String szString = String(64, &H0) Host = Host + Right$(szString, 64 - Len(Host))
'If gethostbyname(Host) = SOCKET_ERROR Then ' sMsg = "Winsock Error" & Str$(WSAGetLastError()) ' MsgBox sMsg, 0, "" 'Else PointerToPointer = gethostbyname(Host) ' Get the pointer to the address of the winsock hostent structure CopyMemory Hostent.h_name, ByVal _ PointerToPointer, Len(Hostent) ' Copy Winsock structure to the VisualBasic structure ListAddress = Hostent.h_addr_list ' Get the ListAddress of the Address List CopyMemory ListAddr, ByVal ListAddress, 4 ' Copy Winsock structure To the VisualBasic structure CopyMemory IPLong3, ByVal ListAddr, 4 ' Get the first list entry from the Address List87
CopyMemory Addr, ByVal ListAddr, 4 Address.Text = Trim$(CStr(Asc(IPLong3.Byte4)) + "." + CStr(Asc(IPLong3.Byte3)) _ + "." + CStr(Asc(IPLong3.Byte2)) + "." + CStr(Asc(IPLong3.Byte1))) IP = Trim$(CStr(Asc(IPLong3.Byte4)) + "." + CStr(Asc(IPLong3.Byte3)) _ + "." + CStr(Asc(IPLong3.Byte2)) + "." + CStr(Asc(IPLong3.Byte1))) 'End If End Sub Public Sub vbGetHostName() Host = String(64, &H0) 'Host = Trim$(Host.Text) 'If gethostname(Host, HostLen) = SOCKET_ERROR Then ' ' sMsg = "WSock32 Error" & Str$(WSAGetLastError()) MsgBox sMsg, 0, ""
'Else Host = Left$(Trim$(Host), Len(Trim$(Host)) - 1) 'Host.Text = Host 'End If End Sub
Private Sub cmdback0_Click(Index As Integer)88
'frmpic.Visible = True frmie.Visible = False frmadds.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmmedia.Visible = False frmspeed.Visible = False frmproc.Visible = False frmip.Visible = False frmhtml.Visible = False frmaddright.Visible = False frmping.Visible = False frmlookup.Visible = False frmlistener.Visible = False frmwhois.Visible = False frmtracert.Visible = False End Sub
Private Sub cmdchange_Click() modRegSettings.SetRegValue HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Main", "Window Title", txtietitle.Text89
MsgBox "IE TITLE CHANGED" End Sub
Private Sub cmdchangemed_Click() modRegSettings.CreateRegistryKey HKEY_CURRENT_USER, "Software\Policies\Microsoft\WindowsMediaPlayer" modRegSettings.SetRegValue HKEY_CURRENT_USER, "Software\Policies\Microsoft\WindowsMediaPlayer", "TitleBar", txttitmed.Text MsgBox "MEDIA PLAYER TITLE CHANGED" End Sub
Private Sub cmdclrip_Click() List.Clear End Sub
Private Sub cmdConnect_Click() cmdConnect.Enabled = False cmbport.Enabled = False cmdDisconnect.Enabled = True txtstatus = "" If optTCP = True Then ws1.Protocol = sckTCPProtocol
90
End If If optUDP = True Then ws1.Protocol = sckUDPProtocol End If On Error GoTo PortIsOpen ws1.Close ws1.LocalPort = cmbport.Text ws1.Listen Exit Sub PortIsOpen: ws1.Close If Err.Number = 10048 Then txtstatus = "The port " & cmbport.Text & " is already open." Else txtstatus = "Error: " & Err.Number & vbCrLf & " " & Err.Description End If cmdDisconnect.Enabled = False cmbport.Enabled = True cmdConnect.Enabled = True End Sub
Private Sub cmdDisconnect_Click()91
ws1.Close cmdDisconnect.Enabled = False cmbport.Enabled = True cmdConnect.Enabled = True End Sub
Private Sub cmdend0_Click(Index As Integer) End End Sub
Private Sub lblportl_Click() 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False
92
frmscreenmain.Visible = False frmip.Visible = False frmhtml.Visible = False frmlookup.Visible = False frmlistener.Visible = True frmwhois.Visible = False frmtracert.Visible = False End Sub
Private Sub Winsockw_Connect() On Error Resume Next Winsockw.SendData ("whois " & txtdomain.Text & vbCrLf) End Sub Private Sub Winsockw_DataArrival(ByVal bytesTotal As Long) On Error Resume Next Dim dataA Winsockw.GetData dataA, vbString txtWhois.Text = txtWhois.Text & dataA '& vbCrLf Dim counter As Long counter = 1
93
start: Dim Search, where ' Declare variables. ' Get search string from user. Search = Chr$(10) where = InStr(counter, txtWhois.Text, Search, vbTextCompare) ' Find string in text. 'MsgBox Where If where Then ' If found, txtWhois.SelStart = where - 1 ' set selection start and txtWhois.SelLength = Len(Search) txtWhois.SelText = vbCrLf counter = where + txtWhois.SelLength + 2 ': 'MsgBox counter Else Exit Sub ' Notify user. End If
GoTo start Winsockw.Close End Sub
Private Sub ws1_ConnectionRequest(ByVal requestID As Long) If ws1.State sckClosed Then ws1.Close94
ws1.Accept (requestID) txtstatus.Text = "Connection..." End Sub
Private Sub ws1_DataArrival(ByVal bytesTotal As Long) Dim strData As String ws1.GetData strData txtstatus.Text = txtstatus.Text & vbCrLf & " - " & strData End Sub
Private Sub cmdfetch_Click() Dim Source As String Source = Inet1.OpenURL(txturl.Text) html.Text = Source End Sub
Private Sub cmdfile_Click() modRegSettings.CreateRegistryKey HKEY_CLASSES_ROOT, "*\shell\" + txtcaptionr.Text + "\command" modRegSettings.SetRegValue HKEY_CLASSES_ROOT, "*\shell\" + txtcaptionr.Text + "\command", "", txtpathr.Text MsgBox " done " End Sub95
Private Sub cmdfolder_Click() modRegSettings.CreateRegistryKey HKEY_CLASSES_ROOT, "Folder\shell\" + txtcaptionr.Text + "\command" modRegSettings.SetRegValue HKEY_CLASSES_ROOT, "Folder\shell\" + txtcaptionr.Text + "\command", "", txtpathr.Text MsgBox "DONE" End Sub
Private Sub cmdgo_Click() modRegSettings.SetRegValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon", "LegalNoticeCaption", txttitlog.Text modRegSettings.SetRegValue HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon", "LegalNoticeText", txtmsg.Text MsgBox "BANNER HAS BEEN SET" End Sub
Private Sub cmdgopro_Click() modRegSettings.SetRegValue HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString", txtpro.Text MsgBox "PROCESSOR NAME CHANGED"96
End Sub
Private Sub cmdgospeed_Click() modRegSettings.SetRegValue HKEY_CURRENT_USER, "Control Panel\Desktop", "MenuShowDelay", txtspeed.Text MsgBox "DONE" End Sub
Private Sub cmdlock_Click() Unload Me Load frmdesktoplock frmdesktoplock.Show End Sub
Private Sub cmdres_Click() modRegSettings.CreateRegistryKey HKEY_CURRENT_USER, "PC EXPERT"
modRegSettings.SetRegValue HKEY_CURRENT_USER, "PC EXPERT", "password", txtnewps.Text MsgBox "Password Reset" End Sub
97
Private Sub cmdresetpass_Click() modRegSettings.SetRegValue HKEY_CURRENT_USER, "PC EXPERT", "screenpass", txtnewpass.Text End Sub Private Sub cmdscan_Click() Timer1.Enabled = True End Sub Private Sub cmdstartcapt_Click() Me.Hide Load frmscreen frmscreen.Show frmscreen.Visible = False End Sub Private Sub cmdstop_Click() Timer1.Enabled = False txtport.Text = "0" MsgBox "SCANNING ABORTED BY THE USER" End Sub
Private Sub lblbanner_Click() 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False98
frmdesk.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmlogon.Visible = True frmip.Visible = False frmhtml.Visible = False frmlookup.Visible = False frmwhois.Visible = False frmtracert.Visible = False End Sub
Private Sub lbldesklock_Click() frmdesk.Visible = True 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False frmlogon.Visible = False frmspeed.Visible = False
99
frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmip.Visible = False frmhtml.Visible = False frmlookup.Visible = False frmwhois.Visible = False frmtracert.Visible = False End Sub Private Sub lbldis_Click() frmspeed.Visible = True 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False
100
frmaddright.Visible = False frmip.Visible = False frmhtml.Visible = False frmwhois.Visible = False frmlookup.Visible = False frmtracert.Visible = False End Sub Private Sub lblhost_Click() 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmscreenmain.Visible = False frmip.Visible = False frmhtml.Visible = False
101
frmlookup.Visible = True frmwhois.Visible = False frmtracert.Visible = False frmlistener.Visible = False
End Sub
Private Sub lblhtml_Click() frmhtml.Visible = True 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmscreenmain.Visible = False
102
frmip.Visible = False frmlookup.Visible = False frmlistener.Visible = False frmwhois.Visible = False frmtracert.Visible = False End Sub
Private Sub lblie_Click() 'frmpic.Visible = False frmie.Visible = True frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmscreenmain.Visible = False frmlookup.Visible = False frmip.Visible = False
103
frmlistener.Visible = False frmwhois.Visible = False frmtracert.Visible = False End Sub
Private Sub lblitem_Click() 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = True frmscreenmain.Visible = False frmhtml.Visible = False frmlistener.Visible = False frmip.Visible = False frmwhois.Visible = False
104
frmtracert.Visible = False End Sub
Private Sub lblmedia_Click() 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmping.Visible = False frmaddright.Visible = False frmmedia.Visible = True frmscreenmain.Visible = False frmip.Visible = False frmhtml.Visible = False frmlistener.Visible = False frmlookup.Visible = False frmwhois.Visible = False
105
frmtracert.Visible = False End Sub Private Sub lblping_Click() 'frmpic.Visible = False frmping.Visible = True frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmaddright.Visible = False frmmedia.Visible = False frmscreenmain.Visible = False frmip.Visible = False frmhtml.Visible = False frmlistener.Visible = False frmlookup.Visible = False frmwhois.Visible = False frmtracert.Visible = False End Sub
106
Private Sub lblports_Click() 'frmpic.Visible = False frmip.Visible = True frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmscreenmain.Visible = False frmhtml.Visible = False frmlookup.Visible = False frmwhois.Visible = False frmlistener.Visible = False frmtracert.Visible = False End Sub
107
Private Sub lblproc_Click() frmproc.Visible = True 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmscreenmain.Visible = False frmip.Visible = False frmhtml.Visible = False frmlookup.Visible = False frmlistener.Visible = False frmwhois.Visible = False frmtracert.Visible = False End Sub
Private Sub lblscreen_Click()
108
frmscreenmain.Visible = True 'frmpic.Visible = False frmie.Visible = False frmadds.Visible = False frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmip.Visible = False frmhtml.Visible = False frmlookup.Visible = False frmlistener.Visible = False frmwhois.Visible = False frmtracert.Visible = False End Sub
Private Sub lblstart_Click() 'frmpic.Visible = False
109
frmie.Visible = False frmadds.Visible = True frmdesk.Visible = False frmlogon.Visible = False frmspeed.Visible = False frmaddright.Visible = False frmproc.Visible = False frmmedia.Visible = False frmping.Visible = False frmaddright.Visible = False frmscreenmain.Visible = False frmip.Visible = False frmhtml.Visible = False frmlookup.Visible = False frmlistener.Visible = False frmwhois.Visible = False frmtracert.Visible = False End Sub
Private Sub Picture1_Click() 'frmnet.Visible = True 'frmpctools.Visible = False
110
lblie.Visible = False lblstart.Visible = False lbldesklock.Visible = False lblbanner.Visible = False lblmedia.Visible = False lbldis.Visible = False lblscreen.Visible = False lblitem.Visible = False lblproc.Visible = False
lblhost.Visible = True lblhtml.Visible = True lblports.Visible = True lblportl.Visible = True lblping.Visible = True lblwho.Visible = True lbltrace.Visible = True End Sub
Private Sub Picture2_Click() 'frmpctools.Visible = True
111
'frmnet.Visible = False lblie.Visible = True lblstart.Visible = True lbldesklock.Visible = True lblbanner.Visible = True lblmedia.Visible = True lbldis.Visible = True lblscreen.Visible = True lblitem.Visible = True lblproc.Visible = True
lblhost.Visible = False lblhtml.Visible = False lblports.Visible = False lblportl.Visible = False lblping.Visible = False lblwho.Visible = False lbltrace.Visible = False
End Sub 'Private Sub cmdclear_Click() 'Text1.Text = " "
112
'Text2.Text = " " 'End Sub
Private Sub cmddelete_Click() 'inputbox (hello) frmdeletekey.Show 'modRegSettings.DeleteValue HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", Text1.Text End Sub
Private Sub cmdadds_Click() modRegSettings.SetRegValue HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", txtaddskey.Text, Chr$(34) & txtaddspath.Text & Chr$(34) MsgBox " ITEM IS ADDED TO STARTUP" End Sub Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub
Private Sub Drive1_Change() Dir1.Path = Drive1.Drive End Sub113
Private Sub File1_Click() txtaddspath.Text = Dir1.Path + "\" + File1.FileName End Sub
Private Sub Timer1_Timer() On Error Resume Next Winsock1.Close txtport.Text = txtport.Text + 1 Winsock1.RemoteHost = txtip.Text Winsock1.RemotePort = txtport.Text Winsock1.Connect If txtport.Text = "65535" Then Timer1.Enabled = False txtport.Text = "0" End If End Sub
Private Sub Winsock1_Connect() List.AddItem Winsock1.RemotePort & "is open " End Sub
114
Public Sub vbIcmpSendEcho()
Dim NbrOfPkts As Integer For NbrOfPkts = 1 To Trim$(1)
DoEvents bReturn = IcmpSendEcho(hIP, Addr, szBuffer, Len(szBuffer), pIPo2, pIPe2, Len(pIPe2) + 8, 2700) If bReturn Then If KeepGoing = 1 Then KeepGoing = 0: Exit For PingTimes = PingTimes + 1 RespondingHost = CStr(pIPe2.Address(0)) + "." + CStr(pIPe2.Address(1)) + "." + CStr(pIPe2.Address(2)) + "." + CStr(pIPe2.Address(3)) GetRCode Else txtpingstatus.Text = txtpingstatus.Text + " Request Timeout" + vbCrLf txtpingstatus.SelStart = Len(txtpingstatus) End If Next NbrOfPkts
End Sub
115
Sub vbWSAStartup()
Dim wsdaata As WSAdata iReturn = WSAStartup(&H101, WSAdata)
If iReturn 0 Then ' If WSock32 error, then tell me about it txtpingstatus = "WSock32.dll is Not responding!" ExitTheFor = 1 End If
If LoByte(WSAdata.wVersion) < WS_VERSION_MAJOR Or (LoByte(WSAdata.wVersion) = WS_VERSION_MAJOR And HiByte(WSAdata.wVersion) < WS_VERSION_MINOR) Then sHighByte = Trim$(Str$(HiByte(WSAdata.wVersion))) sLowByte = Trim$(Str$(LoByte(WSAdata.wVersion))) sMsg = "WinSock Version " & sLowByte & "." & sHighByte sMsg = sMsg & " is Not supported " txtpingstatus = sMsg ExitTheFor = 1
116
End End If
If WSAdata.iMaxSockets < MIN_SOCKETS_REQD Then sMsg = "This application requires a minimum of " sMsg = sMsg & Trim$(Str$(MIN_SOCKETS_REQD)) & " supported sockets." txtpingstatus = sMsg ExitTheFor = 1 End End If
MaxSockets = WSAdata.iMaxSockets
If MaxSockets < 0 Then MaxSockets = 65536 + MaxSockets End If MaxUDP = WSAdata.iMaxUdpDg
If MaxUDP < 0 Then117
MaxUDP = 65536 + MaxUDP End If
Description = ""
For i = 0 To General.WSA_DESCRIPTIONLEN If WSAdata.szDescription(i) = 0 Then Exit For Description = Description + Chr$(WSAdata.szDescription(i)) Next i Status = ""
For i = 0 To General.WSA_SYS_STATUS_LEN If WSAdata.szSystemStatus(i) = 0 Then Exit For Status = Status + Chr$(WSAdata.szSystemStatus(i)) Next i End Sub
Public Function HiByte(ByVal wParam As Integer) HiByte = wParam \ &H100 And &HFF&118
End Function
Public Function LoByte(ByVal wParam As Integer) LoByte = wParam And &HFF& End Function
Public Sub vbWSACleanup() iReturn = WSACleanup() End Sub
Public Sub vbIcmpCloseHandle() bReturn = IcmpCloseHandle(hIP) End Sub
Public Sub vbIcmpCreateFile() hIP = IcmpCreateFile() End Sub Private Sub ScrollPacket_Change()
119
lblPacketSize = ScrollPacket.Value End Sub Private Sub ScrollTimes_Change() lblPingTimes = ScrollTimes.Value End Sub
Public Sub vbGetHostNametrace() 'Host = Trim$(Host.Text) Host = String(64, &H0)
'If gethostname(Host, HostLen) = SOCKET_ERROR Then ' ' sMsg = "WSock32 Error" & Str$(WSAGetLastError())' MsgBox sMsg, 0, ""
' Else ' ' Host = Left$(Trim$(Host), Len(Trim$(Host)) - 1) Host2.Text = Host 'End If End Sub
120
Public Sub vbGetHostByNametrace() Dim szString As String Host = Trim$(Host2.Text) szString = String(64, &H0) Host = Host + Right$(szString, 64 - Len(Host))
'If gethostbyname(Host) = SOCKET_ERROR Then ' sMsg = "Winsock Error" & Str$(WSAGetLastError()) ' MsgBox sMsg, 0, "" 'Else PointerToPointer = gethostbyname(Host) ' Get the pointer to the address of the winsock hostent structure CopyMemory Hostent.h_name, ByVal _ PointerToPointer, Len(Hostent) ' Copy Winsock structure to the VisualBasic structure ListAddress = Hostent.h_addr_list ' Get the ListAddress of the Address List CopyMemory ListAddr, ByVal ListAddress, 4 ' Copy Winsock structure To the VisualBasic structure CopyMemory IPLong, ByVal ListAddr, 4 ' Get the first list entry from the Address List CopyMemory Addr, ByVal ListAddr, 4 IP.Caption = Trim$(CStr(Asc(IPLong.Byte4)) + "." + CStr(Asc(IPLong.Byte3)) _
121
+ "." + CStr(Asc(IPLong.Byte2)) + "." + CStr(Asc(IPLong.Byte1))) 'End If End Sub Public Sub vbIcmpSendEchotrace() vbWSACleanup Dim NbrOfPkts As Integer For NbrOfPkts = 1 To Trim$(1)
DoEvents vbWSACleanup bReturn = IcmpSendEcho(hIP, Addr, szBuffer, Len(szBuffer), pIPo, pIPe, Len(pIPe) + 8, 2700) If bReturn Then TotalNum = TotalNum + 1 RespondingHost = CStr(pIPe.Address(0)) + "." + CStr(pIPe.Address(1)) + "." + CStr(pIPe.Address(2)) + "." + CStr(pIPe.Address(3)) GetRCodetrace Else TotalNum = TotalNum + 1 GetRCodetrace TTL = TTL + 1122
End If Next NbrOfPkts End Sub Public Sub GetRCodetrace() RCode = "" DoEvents If pIPe.Status = 0 Then RCode = "Success" If pIPe.Status = 11001 Then RCode = "Buffer too Small" If pIPe.Status = 11002 Then RCode = "Destination Unreahable" If pIPe.Status = 11003 Then RCode = "Dest Host Not Reachable" If pIPe.Status = 11004 Then RCode = "Dest Protocol Not Reachable" If pIPe.Status = 11005 Then RCode = "Dest Port Not Reachable" If pIPe.Status = 11006 Then RCode = "No Resources Available" If pIPe.Status = 11007 Then RCode = "Bad Option" If pIPe.Status = 11008 Then RCode = "Hardware Error" If pIPe.Status = 11009 Then RCode = "Packet too Big" If pIPe.Status = 11010 Then RCode = "Reqested Timed Out" If pIPe.Status = 11011 Then RCode = "Bad Request" If pIPe.Status = 11012 Then RCode = "Bad Route"123
' If pIPe.Status = 11013 Then RCode = "TTL Exprd In Transit" If pIPe.Status = 11014 Then RCode = "TTL Exprd Reassemb" If pIPe.Status = 11015 Then RCode = "Parameter Problem" If pIPe.Status = 11016 Then RCode = "Source Quench" If pIPe.Status = 11017 Then RCode = "Option too Big" If pIPe.Status = 11018 Then RCode = "Bad Destination" If pIPe.Status = 11019 Then RCode = "Address Deleted" If pIPe.Status = 11020 Then RCode = "Spec MTU Change" If pIPe.Status = 11021 Then RCode = "MTU Change" If pIPe.Status = 11022 Then RCode = "Unload" If pIPe.Status = 11050 Then RCode = "General Failure" ' RCode = RCode + " (" + CStr(pIPe.Status) + ")"
DoEvents
If RCode "" Then If RCode = "Reqested Timed Out" Then vbWSACleanup If TotalNum < 10 Then Response.Text = Response.Text + " # 0" & TotalNum Else Response.Text = Response.Text + " # " & TotalNum124
Response.Text = Response.Text + " " & RCode & vbCrLf Response.SelStart = Len(Response) Exit Sub End If If RCode = "Success" Then vbWSACleanup If TotalNum < 10 Then Response.Text = Response.Text + " # 0" & TotalNum Else Response.Text = Response.Text + " # " & TotalNum Response.Text = Response.Text + " " + IP + vbCrLf Response.SelStart = Len(Response) Exit Sub End If KeepGoing = 1 Response.Text = Response.Text & RCode Else If TTL - 1 < 10 Then Response.Text = Response.Text + " # 0" & TotalNum Else Response.Text = Response.Text + " # " & TotalNum Response.Text = Response.Text + " " + RespondingHost + vbCrLf End If Response.SelStart = Len(Response)
125
End Sub
About us form
Private cmdok_Click() Unload Me End Sub
126
Delete Key FormPrivate Sub cmddelete_Click() modRegSettings.DeleteValue HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", Text1.Text MsgBox "Key Deleted"127
End Sub
128
Screen Capturing FormIf txtscreenpass.Text = modRegSettings.GetRegValue(HKEY_CURRENT_USER, "PC EXPERT", "screenpass") Then End Else MsgBox "wrong password" Me.Hide End If End Sub
129
Desktop Lock FormOption Explicit Private Declare Function PaintDesktop Lib "user32.dll" (ByVal hwnd As Long) As Long Private Type POINTAPI130
X As Long Y As Long End Type
Private Sub Form_Load() Call modRegSettings.SetWindowPos(frmdesktoplock.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE) End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If X = 0 And Y = 0 Then
Label1.Visible = True txtPassword.Visible = True Else
Label1.Visible = False txtPassword.Visible = False End If End Sub
131
Private Sub Form_Paint() PaintDesktop Me.hDC End Sub
Private Sub txtPassword_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then On Error Resume Next If txtPassword.Text = modRegSettings.GetRegValue(HKEY_CURRENT_USER, "PC EXPERT", "Password") Then
App.TaskVisible = True Call modRegSettings.SetWindowPos(frmdesktoplock.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
End Else MsgBox "Invalid Password , Access Denied, Contact bas", vbInformation End If
End If End Sub132
133
MODULESGENERALPublic Const WSA_DESCRIPTIONLEN = 256 Public Const WSA_DescriptionSize = WSA_DESCRIPTIONLEN +1 Public Const WSA_SYS_STATUS_LEN = 128 Public Const WSA_SysStatusSize = WSA_SYS_STATUS_LEN + 1
Type Inet_address Byte4 As String * 1 Byte3 As String * 1 Byte2 As String * 1 Byte1 As String * 1 End Type
Type WSAdata wVersion As Integer134
wHighVersion As Integer szDescription(0 To 255) As Byte szSystemStatus(0 To 128) As Byte iMaxSockets As Integer iMaxUdpDg As Integer lpVendorInfo As Long End Type
Type Hostent h_name As Long h_aliases As Long h_addrtype As Integer h_length As Integer h_addr_list As Long End Type
Type IP_OPTION_INFORMATION TTL As Byte Tos As Byte flags As Byte OptionsSize As Long
135
OptionsData As String * 128 End Type
Type IP_ECHO_REPLY Address(0 To 3) As Byte Status As Long RoundTripTime As Long DataSize As Integer Reserved As Integer Data As Long Options As IP_OPTION_INFORMATION End Type
Public pIPe As IP_ECHO_REPLY Public pIPe2 As IP_ECHO_REPLY Public pIPe3 As IP_ECHO_REPLY Public pIPo As IP_OPTION_INFORMATION Public pIPo2 As IP_OPTION_INFORMATION Public pIPo3 As IP_OPTION_INFORMATION Public IPLong As Inet_address Public IPLong2 As Inet_address
136
Public IPLong3 As Inet_address Public IPLong4 As Inet_address Public IPLong5 As Inet_address Public IPLong6 As Inet_address Public IPLong7 As Inet_address
Declare Function WSAStartup Lib "wsock32.dll" (ByVal wVersionRequired&, lpWSAData As WSAdata) As Long Public Declare Function IcmpSendEcho Lib "ICMP" (ByVal IcmpHandle As Long, ByVal DestAddress As Long, _ ByVal RequestData As String, ByVal RequestSize As Integer, RequestOptns As IP_OPTION_INFORMATION, _ ReplyBuffer As IP_ECHO_REPLY, ByVal ReplySize As Long, ByVal timeout As Long) As Boolean
Declare Function gethostname Lib "wsock32.dll" (ByVal hostname$, HostLen&) As Long Declare Function gethostbyname& Lib "wsock32.dll" (ByVal hostname$) Declare Function WSAGetLastError Lib "wsock32.dll" () As Long Declare Function WSACleanup Lib "wsock32.dll" () As Long Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
137
Public Declare Function IcmpCreateFile Lib "ICMP.dll" () As Long Public Declare Function IcmpCloseHandle Lib "ICMP.dll" (ByVal HANDLE As Long) As Boolean
MODREGSETTINS MODULE
138
Option Explicit Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _ ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Public Const HWND_TOPMOST = -1 Public Const HWND_NOTOPMOST = -2 Public Const SWP_NOMOVE = &H2 Public Const SWP_NOSIZE = &H1 'Types Definition Type SECURITY_ATTRIBUTES nLength As Long lpSecurityDescriptor As Long bInheritHandle As Long End Type
'API Declarations Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal139
lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long Private Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal Reserved As Long, ByVal lpClass As String, ByVal dwOptions As Long, ByVal samDesired As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, phkResult As Long, lpdwDisposition As Long) As Long Private Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String) As Long
'Types Enum Definition Public Enum T_KeyClasses HKEY_CLASSES_ROOT = &H80000000 HKEY_CURRENT_CONFIG = &H80000005 HKEY_CURRENT_USER = &H80000001 HKEY_LOCAL_MACHINE = &H80000002 HKEY_USERS = &H80000003140
End Enum
'Constants Definition Private Const SYNCHRONIZE = &H100000 Private Const STANDARD_RIGHTS_ALL = &H1F0000 Private Const KEY_QUERY_VALUE = &H1 Private Const KEY_SET_VALUE = &H2 Private Const KEY_CREATE_LINK = &H20 Private Const KEY_CREATE_SUB_KEY = &H4 Private Const KEY_ENUMERATE_SUB_KEYS = &H8 Private Const KEY_EVENT = &H1 Private Const KEY_NOTIFY = &H10 Private Const READ_CONTROL = &H20000 Private Const STANDARD_RIGHTS_READ = (READ_CONTROL) Private Const STANDARD_RIGHTS_WRITE = (READ_CONTROL) Private Const KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE)) Private Const KEY_READ = ((STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE)) Private Const KEY_EXECUTE = (KEY_READ)141
Private Const KEY_WRITE = ((STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY) And (Not SYNCHRONIZE)) Private Const REG_BINARY = 3 Private Const REG_CREATED_NEW_KEY = &H1 Private Const REG_DWORD = 4 Private Const REG_DWORD_BIG_ENDIAN = 5 Private Const REG_DWORD_LITTLE_ENDIAN = 4 Private Const REG_EXPAND_SZ = 2 Private Const REG_FULL_RESOURCE_DESCRIPTOR = 9 Private Const REG_LINK = 6 Private Const REG_MULTI_SZ = 7 Private Const REG_NONE = 0 Private Const REG_SZ = 1 Private Const REG_NOTIFY_CHANGE_ATTRIBUTES = &H2 Private Const REG_NOTIFY_CHANGE_LAST_SET = &H4 Private Const REG_NOTIFY_CHANGE_NAME = &H1 Private Const REG_NOTIFY_CHANGE_SECURITY = &H8 Private Const REG_OPTION_BACKUP_RESTORE = 4 Private Const REG_OPTION_CREATE_LINK = 2 Private Const REG_OPTION_NON_VOLATILE = 0 Private Const REG_OPTION_RESERVED = 0 Private Const REG_OPTION_VOLATILE = 1142
Private Const REG_LEGAL_CHANGE_FILTER = (REG_NOTIFY_CHANGE_NAME Or REG_NOTIFY_CHANGE_ATTRIBUTES Or REG_NOTIFY_CHANGE_LAST_SET Or REG_NOTIFY_CHANGE_SECURITY) Private Const REG_LEGAL_OPTION = (REG_OPTION_RESERVED Or REG_OPTION_NON_VOLATILE Or REG_OPTION_VOLATILE Or REG_OPTION_CREATE_LINK Or REG_OPTION_BACKUP_RESTORE) 'Delete e Registry Key with all his contained Values Public Sub DeleteRegistryKey(rClass As T_KeyClasses, Path As String) Dim res As Long
res = RegDeleteKey(rClass, Path) End Sub
'Delete a Value from the Registry Public Sub DeleteValue(rClass As T_KeyClasses, Path As String, sKey As String) Dim hKey As Long Dim res As Long
res = RegOpenKeyEx(rClass, Path, 0, KEY_ALL_ACCESS, hKey) res = RegDeleteValue(hKey, sKey)143
RegCloseKey hKey End Sub
'Creates a New Registry Key Public Sub CreateRegistryKey(rClass As T_KeyClasses, Path As String) Dim hKey As Long Dim res As Long Dim Y As SECURITY_ATTRIBUTES Dim Operation As Long
res = RegCreateKeyEx(rClass, Path, 0, "", 0, KEY_ALL_ACCESS, Y, hKey, Operation) RegCloseKey hKey End Sub
'Get a specific Registry Value (to access the Default Registry Key Value set sKey parameter as "") Public Function GetRegValue(KeyRoot As T_KeyClasses, Path As String, sKey As String) As String Dim hKey As Long Dim KeyValType As Long Dim KeyValSize As Long Dim KeyVal As String144
Dim tmpVal As String Dim res As Long Dim i As Integer
res = RegOpenKeyEx(KeyRoot, Path, 0, KEY_ALL_ACCESS, hKey) If res 0 Then GoTo Errore tmpVal = String(1024, 0) KeyValSize = 1024 res = RegQueryValueEx(hKey, sKey, 0, KeyValType, tmpVal, KeyValSize) If res 0 Then GoTo Errore If (Asc(Mid(tmpVal, KeyValSize, 1)) = 0) Then tmpVal = Left(tmpVal, KeyValSize - 1) Else tmpVal = Left(tmpVal, KeyValSize) End If Select Case KeyValType Case REG_SZ KeyVal = tmpVal Case REG_DWORD For i = Len(tmpVal) To 1 Step -1 KeyVal = KeyVal + Hex(Asc(Mid(tmpVal, i, 1)))145
Next KeyVal = Format("&h" + KeyVal) End Select GetRegValue = KeyVal RegCloseKey hKey Exit Function Errore: GetRegValue = "" RegCloseKey hKey End Function
'Create or Modify a Registry Value (to access the Default Registry Key Value set sKey parameter as "") Public Function SetRegValue(KeyRoot As T_KeyClasses, Path As String, sKey As String, NewValue As String) As Boolean Dim hKey As Long Dim KeyValType As Long Dim KeyValSize As Long Dim KeyVal As String Dim tmpVal As String Dim res As Long Dim i As Integer Dim X As Long146
res = RegOpenKeyEx(KeyRoot, Path, 0, KEY_ALL_ACCESS, hKey) If res 0 Then GoTo Errore tmpVal = String(1024, 0) KeyValSize = 1024 res = RegQueryValueEx(hKey, sKey, 0, KeyValType, tmpVal, KeyValSize) Select Case res Case 2 KeyValType = REG_SZ Case Is 0 GoTo Errore End Select Select Case KeyValType Case REG_SZ tmpVal = NewValue Case REG_DWORD X = Val(NewValue) tmpVal = "" For i = 0 To 3 tmpVal = tmpVal & Chr(X Mod 256) X = X \ 256147
Next End Select KeyValSize = Len(tmpVal) res = RegSetValueEx(hKey, sKey, 0, KeyValType, tmpVal, KeyValSize) If res 0 Then GoTo Errore SetRegValue = True RegCloseKey hKey Exit Function Errore: SetRegValue = False RegCloseKey hKey End Function
148
149
APPLICATIONS OF PC EXPERT
150
APPLICATIONS:1. PORT SCANNER: A port scanner is a piece of software designed to search a network host for open ports. This is often used by administrators to check the security of their networks and by hackers to compromise it.
2.
PING: It allows you to ping any host or IP address, number of bytes and number of pings can also be defined by the user.
3.
SCREEN CAPTURING TOOL: This can be very useful for administrators or normal users. By using this tool one can see what others are doing on their pc in their absence. It will take screenshot of the window and will store the images in the folder where application is stored.
151
4.
DESKTOP LOCK: This tool is used to lock the desktop in the absence of the administrator to prevent the terminal to be used by another person who is not authorized or allowed to use the terminal. Also the advantage of the tool is that the highest priority program of the windows XP which is the task manager is also disabled during the run time of this tool. Thus desktop lock can be used as a very useful tool for the security point of view for the administrator. Since it provides password protection , it is the best method for keeping the system secure and safe from intruders.
5.
ADD ITEM TO RIGHT CLICK: This tool helps to add any program which is frequently required by the administrator to just a click of a button,i.e the right click of the mouse. Any application can be added at the right click event of file or any folder.
6.
CHANGE IE TITLE: The title of the Internet Explorer window consists of the page title and the Internet Explorer window title. This tool allows the user to customize IE title bar.
7.
CHANGE MEDIA PLAYER TITLE:
152
This is mainly used for the customizing the PC as required by the normal home user. It helps in changing the title of the windows media player to any name which is required by the user.
8.
CHANGE PROCESSOR NAME: This tool is also used to customize the PC as required by the user, It changes the processor name of your computer to any name desired by the user.
9.
ADD PROGRAM TO STARTUP: If user is doing the same task everytime he starts the computer like opens the wordpad to create to-do list, uses particular software throughout the day or anything like that then this tool is very useful for him. User can add any item to startup of windows by using this tool. This tool can start the programs and files you want when you boot up Windows.
10.
FETCH HTML SOURCE CODE: This tool helps to get a HTML source code of any webpage on the net which can be used by the students to observe and study as how the webpage is made , what are the attributes, thus he can implement those ideas for the development of his own webpage.
153
11.
LOGON BANNER: This tool can be used to display the message before the logon screen. It is very useful for companies or organizations where they need to give some message to all users or for home users to who wants to give some important message to other user of that pc.
12. TRACE ROUTE: This tool is designed to display the route that packets take when traveling across IP network. Excellent utility for network troubleshooting, this software incorporates the functionality of well known tracert and trace route command line utilities and presents the output using a Windows based interface. 13. DRIVE LOCK: This tool can be used to lock any of the system drives which the administrator wants to keep hidden from the normal users and the drive which contains all the private and confidential documents of a company. It is a very helpful tool for the administrator for security purposes. It is not the normal enable or disable drives utility of windows which hides the system drives but to lock the drives which are visible but not accessible to the normal user.
14.
HOST LOOKUP:
154
This tool can be used to resolve IP address of any website. User have to give the domain name of the website and he can see the IP address of the server on which that website is hosted.
15.
PORT LISTENER: It is a simple port listener that uses whatever TCP/UDP port you specify and logs all incoming requests in detail. Useful for application testing (errors can be logged as well) and security monitoring for vulnerable ports.
16.
WHOIS LOOKUP UTILITY: This tool is a client utility that communicates with the domain registry to obtain domain registration information. It supports IP address queries and automatically selects the appropriate whois server for IP addresses. This tool will lookup information on a domain, IP address, or a domain registration information
17.
SPEEDUP START MENU: There is some delay in opening all programs option in start menu. This tool can be used to speed up the start menu in windows xp. User can customize the speed of start menu by using this tool.
155
156
FUTURE DEVELOPMENT
157
FUTURE DEVELOPMENTS1. 2. 3. 4. 5. GUI can be improved Remote key logger can also be added with application Many other tools can be added in this application We can add html editor and browser with HTML Fetcher and this can be enhanced for content analysis also. Right now WHOIS LOOKUP utility gives detail about .net, .com and .edu domains only. We can add support for country domains also by using different registries
158
159
BIBILOGRAPHY
160
BIBILOGRAPHY:
Here are some resources which we used during our project.
1. 2. 3. 4. 5. 6.
API Guide created by the KPD team VB Black book System Analyses and Design -> E . M . Awad http://etricks.in http://msdn2.microsoft.com Http://pctools.com
161
162
CONCLUSION
163
CONCLSION:The application allows the Administrators to customize their pc, lock their desktop and save it from intruders. One can also resolve any IP address from its host name, can ping hosts or nodes in the network to see whether they are alive or not, capture the screenshots of the PC and see what other users are doing on the pc. All tools included in this application have their own advantages.
164
165