->>>>>BASE APPLY IS VISUAL BASIC 6.0<<<<<-


The is Visual Basic? Said“ Visual” make the
point which applied for making Graphical User
Interface ( GUI). In This Way You [shall] no longer
write down instruction pemrograman in lines codes,
but easyly You can do drag and drop objects which You
to apply.
Said“ Basic” is language part BASIC(Beginners
All Purpose Symbolic Instruction Code), that is a
programming language which in the history have many
applied by of programmers for compiling application.
Visual Basic is developed from BASIC programming
language.


1.1 Start Visual Basic 6.0
After You instal program Visual Basic 6.0,
You can start with button Start on the taskbar at
Windows. Following the stages;steps completely.
1. Depress button Start from Taskbar at Windows.
2. Choose All, Programs, and point at choice of
Microsoft Visual Studio 6.0 and click at choice
of Microsoft Visual Basic 6.0.

Gambar 1.1 Membuka Program Visual Basic 6.0
3. After You successfully implement Visual Basic for
the things first time his(its, You will see logo
display Visual Basic 6.0 and a few moment later
will emerge dialogue box following.

Gambar 1.2 Kotak Dialog New Project
4. The dialogue box ask confirmation to You is for
choosing project type wishing You making. In this case,
select;choose project type VB Enterprise Edition Constrols.
Depress button Open for continuing.

Gambar 1.3 Kotak Dialog Pemilihan Tipe Proyek
5. With election of type VB Enterprise Edition Controls above,
a user not necessarily again weary added the required
components. That thing is because at the project type
have provided components completely. Depress button Open
for continuing.
6. After buttoning Open, will emerge a program [screen/sail]
Visual Basic by accompanied by is complete components on
the part of General or Toolbox.

Gambar 1.4 Tampilan Interface Visual Basic
7. Display above can called as area of Integrated Development
Environment ( IDEA). At area of the, You can do various
activities like processes editing, compiling, and debugging.


1.2 Mengenal Elemen Visual Basic 6.0
After You successfully open Visual Basic at [screen/sail],
You will find interface program Visual Basic like Picture of 1.4.
Seen that interface consisting of some element.

1.2.1 Menu Bar
Menu Bar will present comands available for You apply
Your moment working for Visual Basic. In default, this bar menu
have choice of File, Edit, View, Window, Query, Diagram, Tools,
Add-Ins, and Help. The side, referring to pemrograman, there
are menu which can be accessed, for example Project, Format,
Debug, or Run.

Gambar 1.5 Tampilan Menu Bar
If each the bar menu clicked, Visual Basic will present
preference table from bar menu which You is click is the.

1.2.2 Context Menu
Context Menu contain shortcut which in a moment You
can apply for opening a context menu an object. For opening
this Context Menu, You can click right of object which You to
open the Context Menu. Following the picture display.


Gambar 1.6 Tampilan Context Menu
Context Menu above, we take away from Designer, Form, that
is by the way of clicking right of Form Designer.

1.2.3 Toolbar
This facility can quicken the comands access in
pemrograman. You can click buttons in this toolbar to do
certain action. standardly, toolbar type Standard which
will be presented by Your moment start Visual Basic.
If You wished to arrange display toolbar was other,
You can apply choice of Toolbar at bar menu View.

Gambar 1.7 Tampilan Toolbar

1.2.4 Toolbox
a window is containing of buttons control which
You would apply for designs or“ Membangun” a form or report.
Besides button control under, You also can define or
add x'self button control is other.

Gambar 1.8 Tampilan Toolbox Tipe Standard

Gambar 1.9 Tampilan Toolbox Tipe VB Enterprise Edition Controls
Come up not his(its of this window earn You arrange from
choice of Toolbox on the bar menu View - Toolbox.

1.2.5 Window Project Explorer
this Window Project Explorer present list form,
module, and also the other object in project active.
A Project is a group of file which You apply to develop
(build a application. Following the picture display.

Gambar 1.10 Tampilan Window Project Explorer

1.2.6 Window Properties
this Window Properties earn You apply to arrange
properties a or object control which You selecting.
a property is object characteristic, like size, caption,
text, or color.

Gambar 1.11 Tampilan Window Properties

1.2.7 Objek Browser
This browser object is enlisting the object in
project active. You can apply Object Browser for presenting
the object in Visual Basic and the application of other.
To present this object You can apply way of View-Object
Browser. Following the picture display.

Gambar 1.12 Tampilan Object Browser

1.2.8 Form Designer
Form Designer is a window available for You apply
to arrange display the application of which You compiling,
or equally as place of design a form. In this form You can
add control, graphic, and draw into form on course which
You wish. Every form have window designer form x'self.
Following the pictures displays

Gambar 1.13 Tampilan Form Designer

1.2.9 Window Code Editor
Window Code Editor is a display window which applied
to enter application code. this Window Code Editor applied
to define codes form or modules codes in a applications.
Following the picture display.

Gambar 1.14 Tampilan Window Code Editor

1.2.10 Window Form Layout
Window Form Layout applicable to control position of
form at the application of You apply graphic system in a
[screen/sail]. With this facility, You can see and know
position of form new You is design. Following the picture display.

Gambar 1.15 Tampilan Window Form Layout

1.2.11 Window Immmediate, Local, dan Watch
this Window-window is window addition which applied
for debug process the application of you. this Window-window
You can only applied if You implement application with
interface Visual Basic. To present this window-window,
You can do him(it by the way of View - Name Window.

Gambar 1.16 Tampilan Window Immediate

Gambar 1.17 Tampilan Window Locals

Gambar 1.18 Tampilan Window Watches

Sabtu, 03 Mei 2008

OPEN PORT


Source code following is program for
looking for Port open.
1. Open 1 Project(name:Port_Scanner.vbp)
2. Add 1 Form(name:frmPortScanner)
Adds:
a. 5 TextBox:
Textbox1(name=TxtIP)
Textbox2(name=TxtFrom)
Textbox3(name=TxtTo)
Textbox4(name=TxtTime)
Textbox5(name=TxtData)
b. 2 Timer:
Timer1(name=TmrConnected,enable=false)
Timer2(name=TimeOut,enable=false)
c. 1 commandButton(name=scan)
d. Winsock(name=sckScan)untuk menambahkan
kontrol winsock dari menu Project-Components
-beri tanda cek pada Microsoft Wincock
control 6.0
e. 1 Label(name=Lblscan)
f. 1 ListBox(name=LstResult)


Copy coding under this and paste in Editor Form:
 
Option Explicit
Dim Port As Single
Dim Scanning As Boolean
Dim RemoteOS As String
Dim PortType As Integer

Private Sub CmdScan_Click()
If Scanning = False Then
PortType = 0
LstResult.Clear
LstResult.AddItem " Port: service:"
LstResult.AddItem "=============================================="
TxtFrom.Enabled = False
TxtIP.Enabled = False
TxtTime.Enabled = False
TxtTo.Enabled = False
TxtData.Enabled = False
CmdScan.Caption = "&Cancel"
Scanning = True
Port = TxtFrom.Text + 1
BeginScan
Else
TxtFrom.Enabled = True
TxtIP.Enabled = True
TxtTime.Enabled = True
TxtTo.Enabled = True
TxtData.Enabled = True
CmdScan.Caption = "&Scan Again"
Scanning = False
TimeOut.Enabled = False
TmrConnected.Enabled = False
sckScan.Close
Port = TxtTo.Text
LblScan.Caption = ""
End If
End Sub

Private Sub sckScan_Connect()
TimeOut.Enabled = False
sckScan.SendData "GET abcdef.htm" & vbCrLf & "USER abcdef" & vbCrLf & "FINGER abcdef" & vbCrLf
TmrConnected.Interval = TxtData.Text
TmrConnected.Enabled = True
End Sub

Private Sub sckScan_DataArrival(ByVal bytesTotal As Long)
Dim Data As String
sckScan.GetData Data, vbString
If InStr(1, Data, vbLf) <> 0 Then
RecognizePort Data
sckScan.Close
Port = Port + 1
BeginScan
End If
End Sub

Private Sub TimeOut_Timer()
TimeOut.Enabled = False
Port = Port + 1
BeginScan
End Sub

Private Sub TmrConnected_Timer()
LstResult.AddItem Format(sckScan.RemotePort, " #00000 --------->>") & " >Gue ga' tau...."
TmrConnected.Enabled = False
Port = Port + 1
BeginScan
End Sub

Private Sub BeginScan()
If Port <= TxtTo Then
sckScan.Close
sckScan.RemoteHost = TxtIP.Text
sckScan.RemotePort = Port
LblScan.Caption = " Port: " & Port & " @ " & sckScan.RemoteHost
sckScan.Connect
TimeOut.Interval = TxtTime.Text
TimeOut.Enabled = True
On Error Resume Next
Else
Call CmdScan_Click
End If
End Sub

Private Sub RecognizePort()
Dim MyType As String
If InStr(1, Data, "FTP") > 0 Then
MyType = "FTP Server"
If InStr(1, Data, "Serv-U") > 0 Then
MyType = MyType & "(Serv-U)"
End If
ElseIf InStr(1, UCase(Data), "HTTP") > 0 Or _
InStr(1, UCase(Data), "HTML") > 0 Then
MyType = "HTTP Server"
If InStr(1, Data, "Microsoft") > 0 Then
MyType = MyType & "(Microsoft)"
ElseIf InStr(1, Data, "Apache") > 0 Then
MyType = MyType & "(Apache)"
End If
ElseIf InStr(1, UCase(Data), "MAIL") > 0 Then
MyType = "MAIL Server"
If InStr(1, Data, "Microsoft") > 0 Then
MyType = MyType & "(Microsoft)"
End If
ElseIf InStr(1, UCase(Data), "IMAP") > 0 Then
MyType = "IMAP Server"
If InStr(1, Data, "Microsoft") > 0 Then
MyType = MyType & "(Microsoft)"
ElseIf InStr(1, UCase(Data), "NNTP") > 0 Then
MyType = "NNTP Server"
If InStr(1, Data, "Microsoft") > 0 Then
MyType = MyType & "(Microsoft)"
End If
ElseIf InStr(1, UCase(Data), "NOTICE AUTH") > 0 Then
MyType = "IRC Server"
ElseIf InStr(1, Data, "ERROR: Your host is trying too (re)connect too fast") > 0 Then
MyType = "IRC Server"
ElseIf Mid(Data, 1, Len("GET abscdef.htm")) = "GET abcdef.htm" Then
MyType = "PING Server"
Else
MyType = "Ora Ngerti...."
End If
LstResult.AddItem Format(sckScan.RemotePort, " #00000 --------->>") & " >" & MyType
End Sub

Tidak ada komentar: