1. SERVER:
'Buat Socket
Set objTcp = CreateObject ( "Shadow Angel.Tcp" )
Set objConstants = CreateObject ( "Shadow Angel.ASConstants" )
objTcp.Protocol = objConstants.asSOCKET_PROTOCOL_RAW
' Informasi
WScript.Echo "Shadow Angel Demo Server"
WScript.Echo "Tanggal Server: " & objTcp.ExpirationDate & vbCrLf
' Buka Port 1500
objTcp.StartListening 1500
WScript.Echo "Informasi Koneksi Server, Status: " & objTcp.LastError & _
" (" & objTcp.GetErrorDescription( objTcp.LastError ) & ")"
If objTcp.LastError <> 0 Then
WScript.Quit
End If
' Tunggu koneksi di port 1500...
WScript.Echo "Menunggu koneksi dari Client..."
Do while objTcp.ConnectionState = objConstants.asSOCKET_CONNSTATE_LISTENING
'Menunggu koneksi yang masuk
Loop
If objTcp.ConnectionState <> objConstants.asSOCKET_CONNSTATE_CONNECTED Then
WScript.Quit
End If
WScript.Echo "Koneksi Terhubung Dengan Client" & vbCrLf
str = ""
Do While objTcp.ConnectionState = objConstants.asSOCKET_CONNSTATE_CONNECTED and str <> "Batal Koneksi"
Loop
' Batal Koneksi
objTcp.Disconnect
2. CLIENT:
'Buat Socket
Set objTcp = CreateObject ( "Shadow Angel.Tcp" )
Set objConstants = CreateObject ( "Shadow Angel.ASConstants" )
objTcp.Protocol = objConstants.asSOCKET_PROTOCOL_RAW
'Informasi
WScript.Echo "Shadow Angel Demo Server"
WScript.Echo "Tanggal Server: " & objTcp.ExpirationDate & vbCrLf
' Buka Port 1500
objTcp.StartListening 1500
WScript.Echo "Informasi Koneksi Server, Status: " & objTcp.LastError & _
" (" & objTcp.GetErrorDescription( objTcp.LastError ) & ")"
If objTcp.LastError <> 0 Then
WScript.Quit
End If
' Tunggu koneksi di port 1500...
WScript.Echo "Menunggu koneksi dari Client..."
Do while objTcp.ConnectionState = objConstants.asSOCKET_CONNSTATE_LISTENING
'Menunggu koneksi yang masuk
Loop
If objTcp.ConnectionState <> objConstants.asSOCKET_CONNSTATE_CONNECTED Then
WScript.Quit
End If
WScript.Echo "Koneksi Terhubung Dengan Client" & vbCrLf
str = ""
Do While objTcp.ConnectionState = objConstants.asSOCKET_CONNSTATE_CONNECTED and str <> "Batal Koneksi"
Loop
' Batal Koneksi
objTcp.Disconnect
Rabu, 02 April 2008
membuat virus pake VBS
Diposting oleh baracrack di Rabu, April 02, 2008
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar