A few changes…

Howdy folks, firstly, there has been a lot of 3rd party development going on in relation to the black ops RCON tool, but none of it was by me. In fact, I found the game so infuriatingly laggy that I canceled my server so I no longer have anything to test on, as a result I have lost interest in the project and have closed the github repo; however, I will post the code here so anyone who wants it can take it and use it, do what ever you like with it under the MIT license.

RCON Source Code available here.

I am also unemployed now :) IMHO it was a great move, as it will allow me to have a break from doing anything really for the first time since I started school when I was 4 or 5… it has also given me the push I needed to go back to college and train myself up .

I have been working on a few projects now too with my increase in available time, however I’m not going to say much about them at the moment in case I don’t finish em.

Updated Black Ops RCON

Hey folks, this is just a quick update to let you know I have still been working on this… as it stands I have implemented two functions which work, and one which doesn’t. Slowly but surely I will be adding more and more functionality… unfortunately I don’t have RCON access to an unranked server at the moment, would anyone like to oblige me on that? :)

I would also like to mention at this point, that I have not looked into causing errors on the RCON, ie invalid logins etc… so be warned, while most of this should work, I cannot and will not guarantee it. Also, it is written for Python 2.6, not 3.whatever… I will be getting a few more people on board to help with this soon and we will be cleaning it up, adding error handling etc…

Anyways, here is what you have all been waiting for….

#!/usr/bin/python
 
'''
_______               ________      .___
\   _  \__  _  ______ \_____  \   __| _/
/  /_\  \ \/ \/ /    \  _(__  <  / __ |
\  \_/   \     /   |  \/       \/ /_/ |
 \_____  /\/\_/|___|  /______  /\____ |
       \/           \/       \/      \/
                    http://hackdev.com
 
Author:
    Steven from hackdev.com
 
File History:
    09/11/10:
        [+] Initial Inception. Proof of concept written entirely inline that
            allows for a single hard coded command to be sent to the server.
 
    10/11/10:
        [+] Creation of functions to handle the sending and receiving of commands.
        [+] Added the ability for users to change passwords in the configuration
            section of the script.
        [+] Broke commands, preambles etc... into variables for easier use & modification.
        [+] Added comments, previous code did not contain comments. ** Important **
    14/11/10:
        [+] Added command boGetPlayerList
        [+] Added command boSayToServer
        [+] Added command boSayToPlayer
        [+] Figured out that not everything has to be done in \x68\x65\x78
 
'''
 
import socket       #Used for creating the UDP sockets
 
#-----------------------------------------------------------------------------------
#   User Configurable Options
#-----------------------------------------------------------------------------------
 
boHost          = ""      #The server IP
boPort          = 3074                  #The server Port
boPassword      = ""              #The RCON Password
 
#-----------------------------------------------------------------------------------
#   End User Configurable Options
#-----------------------------------------------------------------------------------
 
svrAddress = (boHost, boPort)           #Used to create a tuple of host & port
 
#-----------------------------------------------------------------------------------
#   Command Definitions, sorry about the variables :(
#-----------------------------------------------------------------------------------
global cmdPreamble
cmdPreamble  = "\xff\xff\xff\xff\x00"                       #Preamble used to prefix the packet
global cmdSeporator
cmdSeporator = "\x20"                                       #Seporator used between password & command
global cmdPostamble
cmdPostamble = "\00"                                        #Ending of the packet, end of command
 
#-----------------------------------------------------------------------------------
#   Socket Generation
#-----------------------------------------------------------------------------------
udpSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 
#-----------------------------------------------------------------------------------
#   Function used to send commands to the server, function returns the
#   data returned from the query, unformatted...
#-----------------------------------------------------------------------------------
 
def boSendCommand(boCommand, boArgument=0, recvBufferSize=4096):
    if not boArgument:
        commandBuffer = cmdPreamble + boPassword + cmdSeporator + boCommand + cmdPostamble
    else:
        commandBuffer = cmdPreamble + boPassword + cmdSeporator + boCommand + cmdSeporator + boArgument + cmdPostamble
    boSentBytes = udpSock.sendto(commandBuffer, svrAddress)     #Send the data to the server
    if (boSentBytes < len(commandBuffer)):                      #Check the num of bytes sent
        print("An error was encountered while sending the command %s", boCommand)
    boRecvBuffer = udpSock.recv(recvBufferSize)                 #Receive the data returned
 
    if len(boRecvBuffer) > 0:                                   #Check to ensure there is something
        return boRecvBuffer                                     #Return the buffer
    else:
        return 0                                                #If theres nothing, return 0
 
def boGetPlayerList():
    playerlist = boSendCommand("teamstatus")
    if not playerlist:
        return 0
    else:
        return playerlist
 
def boSayToServer(message):
    if not message:
        return 0
    else:
        servermessage = boSendCommand("say", '"' + message + '"')
        if not servermessage:
            return 0
        else:
            return servermessage
 
def boSayToPlayer(message, playerID):
    if not message or not playerID:
        return 0
    else:
        playermessage = boSendCommand("tell", playerID + "\x20" + '"' + message + '"')
        if not playermessage:
            return 0
        else:
            return playermessage
 
print("Playerlist")
myPlayerList = boGetPlayerList()
print(myPlayerList)
 
print("Server Message")
myServerMessage = boSayToServer("Testing!")
print(myServerMessage)
 
print("Player Message")
myPlayerMessage = boSayToPlayer("Testing 123", "1")
print(myPlayerMessage)

Call Of Duty : Black Ops RCON Hacked! Kinda…

Yes, thats right folks, following a bit of a hacking session with the CoD:BO RCON client and wireshark, I now have some Python code that is capable of logging into the RCON on a CoD:BO server!

AFAIK, I am the first person in the world outside of treyarch to have done this and I have elected to share this with all of you, it may not be clean, and it may not be fancy… but damn it it works! (Its late and I haven’t slept…) Please keep in mind that the hostname and login message have been removed from the script as they contain identifiable information for my server. Enjoy this, and happy hacking! – I would also like to point out I wouldn’t have done this, at least as quickly, if it wasn’t for Ajurna of the mighty IrishPirates!

#
 
import socket
import string
 
boHost = ""
boPort = 3074
boAddr = (boHost, boPort)
 
boLoginMsg = "\xff\xff\xff\xff\x00___OMITTED____\x20\x64\x76\x61\x72\x6c\x69\x73\x74\x00"
 
udpSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
boSentBytes = udpSock.sendto(boLoginMsg, boAddr)
 
if (boSentBytes < len(boLoginMsg)):
    print("Message not sent...")
else:
    print("Message sent...")
 
boRecv = udpSock.recv(4096)
 
if len(boRecv) > 0:
    print("Received ", boRecv)
else:
    print("Received Nothing...")
 
udpSock.close()
 
fileHandler = open("out.txt", "w")
print >> fileHandler, boRecv

Just a general update…

It’s been quite a while since I’ve posted  anything, I’ve been very busy lately but since I’m out sick now for a few days, I have a bit of time to update…

If you have tried to play Fallout 3 using an Asus branded NVidia card, and it crashes stating “Fallout 3 has stopped working” every time you try to load a new game, check and see if you have Asus Gamer OSD installed, if you do, get rid of it. Something the overlay does interferes with the game  and causes this to happen…

I have been doing some more work on the lighting for the man cave so I have some Python code that will pull the Average color (not the most predominant, yet, wont be hard, but I am lazy) so here it is, please keep in mind its not nice, fast or clean… for high res images it takes a few seconds to do its thing…

#!/usr/bin/env python
 
#
# PIL Image Module Handbook - http://www.pythonware.com/library/pil/handbook/image.htm
#
 
from PIL import Image
from optparse import OptionParser
 
def processImageAverage(imageFile):
    image = Image.open(imageFile)     #open the image for processing
    pixels = list(image.getdata())    #break the image down into a list of pixels, each pixel contains a list of red,green,blue
 
    totalpx = 0 #set some default values to start counting...
    redpx = 0
    greenpx = 0
    bluepx = 0
 
    for pixel in pixels:    #loop through the lists and build the values.
        totalpx += 1
        redpx += pixel[0]
        greenpx += pixel[1]
        bluepx += pixel[2]
 
    redavg = redpx / totalpx   #generate the averages
    greenavg = greenpx / totalpx
    blueavg = bluepx / totalpx
 
    print "\nTotal Pixels:\t", totalpx     #and write them out.
    print "Red Average:\t", redavg
    print "Green Average:\t", greenavg
    print "Blue Average:\t", blueavg
    print "HEX Color:\t#%x%x%x" % (redavg, greenavg, blueavg)
 
def main():
    parser = OptionParser("Usage: %prog source")
 
    (options, arguments) = parser.parse_args()
    if len(arguments) != 1:
        parser.error("Please specify a single input file.")
 
    processImageAverage(arguments[0])
 
if __name__ == "__main__":
    main()

I have a new job now, I’m no longer a software validation engineer (tester), I’m now an IT Support Engineer (IT Techie…) which is kinda nice….

Well… that is for now…

Getting Manhunt to run in Windows Vista

RockStar Manhunt

Many people have tried to run Manhunt on Windows Vista but without any luck, through a fair ammount of Googling in the past, I came across this fix…

Step 1:
Download XVI32 from http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm

Step 2:
Back up your manhunt.exe file

Step 3:
Open manhunt.exe in XVI32

Step 4:
From the addreess tab at the top, select “Goto”
Select the hexedecimal option and set the go mode to “Absolute”

Step 5:
In the Goto box, enter in 08DE

Step 6:
If all above went well, you should see a box highlighted containing 6A,
modify this so that it says 2A.

Step 7:
Save the file and exit the editor.

Step 8:
Play.

Thanks to Sonnilivo for the great information relating to this!