2,winsock的添加 补丁地址:http://msdn.microsoft.com/download/vstudio60ent/SP5/Wideband-VB/WIN98Me/CN/VS6sp5VB.exe 3,服务器端程序 (1)编码 Private Sub Form_Load() myserver.LocalPort = 5211 myserver.bind myserver.Listen End Sub Private Sub myServer_ConnectionRequest(ByVal requestID As Long) If myserver.State <> sckClosed Then myserver.Close End If myserver.Accept requestID End Sub Private Sub myServer_DataArrival(ByVal bytesTotal As Long) Dim strData As String myserver.GetData strData If strData = " hello " Then MsgBox ("收到数据!") End If End Sub Private Sub myServer_Close() myserver.Close myserver.Listen End Sub (2)测试 我们可以查看自己端口,来看下有没有起到相应的作用。
4,客户端程序 (1)编码 Private Sub form_Load() myClient.RemoteHost = "127.0.0.1" myClient.RemotePort = 5211 End Sub
Private sub cmdConnect_Click() myClient.Connect End sub Private Sub cmdsenddata_Click() myClient.SendData "hello" End Sub Private Sub myClient_Connect() debug.print "success!" end sub (2)测试 四 联机测试本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/a123062220a/archive/2010/01/07/5150816.aspx
一 木马的由来 木马,即“特洛伊木马”(trojan horse)。 二 所需要的技术 一个成功的木马,除了制作出相关的程序以外,还需要实现以下几方面的功能。1,木马的隐藏 2,木马的运行 3,木马的复制 4,木马的传播等,进一步还有加外壳和反杀毒等,争取做到“道高一尺,魔高一丈”。
三 程序的制作
1,winsock控件
在程序中将使用Winsock控件。Winsock控件是一个ActiveX控件,利用TCP协议或UDP协议连接到远程计算机上并与之交换数据。我们的目标就是建立两个程序,一个是服务器端程序myserver,另一个是客户端程序myclient。
2,winsock的添加
补丁地址:http://msdn.microsoft.com/download/vstudio60ent/SP5/Wideband-VB/WIN98Me/CN/VS6sp5VB.exe 3,服务器端程序 (1)编码 Private Sub Form_Load()
myserver.LocalPort = 5211
myserver.bind
myserver.Listen
End Sub Private Sub myServer_ConnectionRequest(ByVal requestID As Long)
If myserver.State <> sckClosed Then
myserver.Close
End If
myserver.Accept requestID
End Sub Private Sub myServer_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
myserver.GetData strData
If strData = " hello " Then
MsgBox ("收到数据!")
End If
End Sub Private Sub myServer_Close()
myserver.Close
myserver.Listen
End Sub
(2)测试
我们可以查看自己端口,来看下有没有起到相应的作用。
4,客户端程序 (1)编码
Private Sub form_Load()
myClient.RemoteHost = "127.0.0.1"
myClient.RemotePort = 5211
End Sub
Private sub cmdConnect_Click()
myClient.Connect
End sub Private Sub cmdsenddata_Click()
myClient.SendData "hello"
End Sub Private Sub myClient_Connect()
debug.print "success!"
end sub (2)测试 四 联机测试本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/a123062220a/archive/2010/01/07/5150816.aspx