Hi!
So theese days, i have been working on some rcon client for quake3, and i made it work properly, it can get the response too
anyways, i figured out that i could remake this into rcon brute forcer (i.e. blocker)
so i stripped down some code it shouldnt require, so the code looks like this now
the thing is: code is in vb.NET, so i would just loop the function calling
Code:
Namespace QuakeRcon
Friend Class RCON
Public Function sendCommand(ByVal gameServerIP As String, ByVal password As String, ByVal gameServerPort As Integer) As String
On Error Resume Next
Dim client As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)
client.Connect(IPAddress.Parse(gameServerIP), gameServerPort)
Dim command As String
command = "rcon " & password & " " & "status"
Dim bufferTemp() As Byte = Encoding.ASCII.GetBytes(command)
Dim bufferSend(bufferTemp.Length + 5 - 1) As Byte
'intial 5 characters as per standard
bufferSend(0) = Byte.Parse("255")
bufferSend(1) = Byte.Parse("255")
bufferSend(2) = Byte.Parse("255")
bufferSend(3) = Byte.Parse("255")
bufferSend(4) = Byte.Parse("02")
Dim j As Integer = 5
For i As Integer = 0 To bufferTemp.Length - 1
bufferSend(j) = bufferTemp(i)
j += 1
Next i
Dim RemoteIpEndPoint As New IPEndPoint(IPAddress.Any, 0)
client.Send(bufferSend, SocketFlags.None)
End Function
End Class
End Namespace
so, i removed the code with which i was getting response, as i think that response isn't needed for this task
i looped the call to this function, ans i did a little test run, and guess what?
of course, it didnt work
i have no idea why, so if anyone has, it would be really great to share it :D