Rcon commands

Status
Niet open voor verdere reacties.

007baske007

Gebruiker
Lid geworden
9 jan 2008
Berichten
102
Hallo daar,

ik zit met het volgene probleem:
Ik heb een SOF2 server, Soldier of Fortune, en ik wil hier graag een remote admin program voor maken. Nu wil ik in visual basic 2008 een programmatje maken, die Rcon commands kan versturen naar de server, net zoals in Rcon unlimited. Ik heb al in de gaten dat dit moet met Winsock, heb dit ook al gedownload, maar hoe kan ik rcon commands versturen in Visual Basic 2008 Express edition?

Alvast bedankt, Alvast respect voor mijn redder:p

Baske
 
Winsock is een socket-geval voor windows (ja, vandaar de naam). Een socket kan verbinding maken met een server welke socket-connecties kan accepteren. Ik neem aan dat sof2 udt-socket gebruikt? Dat moet je eerst maar eens zien uit te vissen.

Daarna moet je weten welke commando's hoe werken. En, je zult moeten inloggen, en daarvoor moet je ook weten hoe de sof2 server dit wilt. Al met al niet iets makkelijks!


Heb je al enige ervaring met VB.NET, winsock of socket programming?




Lezen:
http://nl.wikipedia.org/wiki/Internet_socket
http://www.sof2.150m.com/sof2cmd.htm (pas op, reclame!)
http://www.filefront.com/851014/sof2rcon.zip (? zomaar even gevonden, is dit iets? - niet gechecked op beesjes)
http://www.freevbcode.com/ShowCode.asp?ID=2534 (voor vb6 en CS, maar het idee is hetzelfde)
 
Laatst bewerkt:
Zoiets als sof2rcon wil ik graag maken voor mijn clan. Kan je me miss toevoegen op msn?
Als ik dit programma decompile, krijg ik code war ik niet veel van snap... Form:

Bas

Code:
VERSION 5.00
Begin VB.Form frmRcon
  Caption = "SoF2 Remote Console"
  BackColor = &H40&
  ScaleMode = 3
  ScaleLeft = 19005507
  ScaleTop = 689699
  ScaleWidth = 7629824
  ScaleHeight = 687616
  AutoRedraw = False
  FontTransparent = False
  Begin CommonDialog dlgCommon
  End
  Begin TextBox txtIP
    Index = 3
    BackColor = &H0&
    ForeColor = &H80FF&
    Left = 3015
    Top = 3810
    Width = 375
    Height = 285
    Text = "0"
    TabIndex = 3
    Alignment = 2 'Center
    MaxLength = 3
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
    Appearance = 0 'Flat
  End
  Begin TextBox txtIP
    Index = 2
    BackColor = &H0&
    ForeColor = &H80FF&
    Left = 2610
    Top = 3810
    Width = 375
    Height = 285
    Text = "0"
    TabIndex = 2
    Alignment = 2 'Center
    MaxLength = 3
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
    Appearance = 0 'Flat
  End
  Begin TextBox txtIP
    Index = 1
    BackColor = &H0&
    ForeColor = &H80FF&
    Left = 2205
    Top = 3810
    Width = 375
    Height = 285
    Text = "0"
    TabIndex = 1
    Alignment = 2 'Center
    MaxLength = 3
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
    Appearance = 0 'Flat
  End
  Begin Winsock wskServer
  End
  Begin TextBox txtPass
    BackColor = &H0&
    ForeColor = &H80FF&
    Left = 1800
    Top = 4530
    Width = 1575
    Height = 285
    TabIndex = 5
    PasswordChar = "*"
  End
  Begin TextBox txtPort
    BackColor = &H0&
    ForeColor = &H80FF&
    Left = 1800
    Top = 4170
    Width = 1575
    Height = 285
    Text = "20100"
    TabIndex = 4
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
    Appearance = 0 'Flat
  End
  Begin TextBox txtIP
    Index = 0
    BackColor = &H0&
    ForeColor = &H80FF&
    Left = 1800
    Top = 3810
    Width = 375
    Height = 285
    Text = "0"
    TabIndex = 0
    Alignment = 2 'Center
    MaxLength = 3
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
    Appearance = 0 'Flat
  End
  Begin TextBox txtSend
    BackColor = &H0&
    ForeColor = &H80FF&
    Left = 1800
    Top = 3450
    Width = 7335
    Height = 285
    TabIndex = 6
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
    Appearance = 0 'Flat
  End
  Begin TextBox txtReceive
    BackColor = &H0&
    ForeColor = &H80FF&
    Left = 120
    Top = 120
    Width = 9015
    Height = 3255
    TabIndex = 7
    MultiLine = -1  'True
    ScrollBars = 2
    Locked = -1  'True
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
    Appearance = 0 'Flat
  End
  Begin Label Label9
    Caption = "frmRcon.frx":0
    ForeColor = &H80FF&
    Left = 3600
    Top = 4080
    Width = 5535
    Height = 735
    TabIndex = 16
    BackStyle = 0 'Transparent
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
  End
  Begin Label Label8
    Caption = "Instructions on use:"
    ForeColor = &H80FF&
    Left = 3600
    Top = 3840
    Width = 5535
    Height = 135
    TabIndex = 15
    BackStyle = 0 'Transparent
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
  End
  Begin Label Label7
    Caption = "."
    ForeColor = &H80FF&
    Left = 2955
    Top = 3855
    Width = 75
    Height = 135
    TabIndex = 14
    BackStyle = 0 'Transparent
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
  End
  Begin Label Label6
    Caption = "."
    ForeColor = &H80FF&
    Left = 2550
    Top = 3855
    Width = 75
    Height = 135
    TabIndex = 13
    BackStyle = 0 'Transparent
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
  End
  Begin Label Label5
    Caption = "."
    ForeColor = &H80FF&
    Left = 2145
    Top = 3855
    Width = 75
    Height = 135
    TabIndex = 12
    BackStyle = 0 'Transparent
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
  End
  Begin Shape Shape5
    BorderColor = &H4080&
    Left = 105
    Top = 105
    Width = 9045
    Height = 3285
  End
  Begin Shape Shape4
    BorderColor = &H4080&
    Left = 1785
    Top = 4515
    Width = 1605
    Height = 315
  End
  Begin Shape Shape3
    BorderColor = &H4080&
    Left = 1785
    Top = 4155
    Width = 1605
    Height = 315
  End
  Begin Shape Shape2
    BackColor = &H0&
    BorderColor = &H4080&
    Left = 1785
    Top = 3795
    Width = 1620
    Height = 315
    BackStyle = 1 'Opaque
  End
  Begin Shape Shape1
    BorderColor = &H4080&
    Left = 1785
    Top = 3435
    Width = 7365
    Height = 315
  End
  Begin Label Label4
    Caption = "Rcon Password:"
    ForeColor = &H80FF&
    Left = 120
    Top = 4560
    Width = 1575
    Height = 255
    TabIndex = 11
    Alignment = 1 'Right Justify
    BackStyle = 0 'Transparent
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
  End
  Begin Label Label3
    Caption = "Server Port:"
    ForeColor = &H80FF&
    Left = 120
    Top = 4200
    Width = 1575
    Height = 255
    TabIndex = 10
    Alignment = 1 'Right Justify
    BackStyle = 0 'Transparent
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
  End
  Begin Label Label2
    Caption = "IP Address:"
    ForeColor = &H80FF&
    Left = 120
    Top = 3840
    Width = 1575
    Height = 255
    TabIndex = 9
    Alignment = 1 'Right Justify
    BackStyle = 0 'Transparent
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
  End
  Begin Label Label1
    Caption = "Command:"
    ForeColor = &H80FF&
    Left = 120
    Top = 3480
    Width = 1575
    Height = 255
    TabIndex = 8
    Alignment = 1 'Right Justify
    BackStyle = 0 'Transparent
    BeginProperty Font
      Name = "Lucida Console"
      Size = 8,25
      Charset = 0
      Weight = 400
      Underline = 0 'False
      Italic = 0 'False
      Strikethrough = 0 'False
    EndProperty
  End
  Begin Menu mnuFile
    Caption = "&File"
    Begin Menu mnuFileNew
      Caption = "&New"
      Shortcut = 14
    End
    Begin Menu mnuFileOpen
      Caption = "&Open..."
      Shortcut = 15
    End
    Begin Menu Hyphen1
      Caption = "-"
    End
    Begin Menu mnuFileSave
      Caption = "&Save"
      Shortcut = 19
    End
    Begin Menu mnuFileSaveAs
      Caption = "Save &As..."
      Shortcut = 1
    End
    Begin Menu Hyphen2
      Caption = "-"
    End
    Begin Menu mnuFilePrint
      Caption = "&Print"
      Shortcut = 16
    End
    Begin Menu Hyphen3
      Caption = "-"
    End
    Begin Menu mnuFileExit
      Caption = "E&xit"
    End
  End
  Begin Menu mnuHelp
    Caption = "&Help"
    Begin Menu mnuHelpAbout
      Caption = "&About..."
    End
  End
End

Attribute VB_Name = "frmRcon"

Alvast bedankt!
 
Laatst bewerkt:
Hmm, de code die je gaf is voor een vb > .NET. Ofwel, vb 5 of 6. En jij werkt, denk ik, met vb.NET.
[edit]oh, ja: Visual Basic 2008 Express edition[/edit]

Nou, het hele idee is hetzelfde. Maar zonder dat je vb5 of 6 hebt, kan je er niet veel mee! Maar mischien kan je wel de (?gratis?) vb6 portable ergens downloaden, en t daarmee importen (new->form->from file->dat bestand). Even google'n.


:thumb:
 
heb vb6 even gedownload, maar als ik open, krijg ik errors...
en ik heb helemaal geen dat bestand...

Bas
 
kan niemand mij helpen? heb het gevoel dat er niet zoveel gepost word hierzo...
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan