Saturday, February 03, 2007

Hacking Quake 4 authorization

Most people agree that the Quake series are some of the best 3d games ever written (kudos to James Carmack!). I was recently browsing through the net, and found out that iD Software had brought the security protection of the game one step further: everytime the software is started, it will try to authenticate the CD key on their authentication server. I havent tried to run the game without being disconnected from the net - simply because I am too lazy to unwire those cables at the back of my table.

Most people had tried some clever alternatives, such as running firewall program, and block Quake 4 to access the net. Obviously this will prevent you from playing over the LAN. Unless you can identify which port Quake 4 is using to communicate over the LAN network.

A better hack involves identifying the authentication server address - which turns out to be: q4master.idsoftware.com
Now, if we can somehow re route any request to this address somewhere else, then we effectively:
- disable the authentication
- still allow quake to communicate against other quake 4 clients in the LAN

Turns out that this is not hard at all, thanks to Microsoft's adoption to UNIX ip route table syntax. I am not sure if I can legally post out how to do it here, but it IS possible, and it WORKS. Just with a little bit of thought, you will be happily fragging your mates over the LAN.

Having said so, please do buy the software if you like it. It is a great game, and you will miss out most of the fun of playing over their official server.

Ciao.

Understanding the !DOCTYPE Tag

Document type(!DOCTYPE) tag specifies how the browser is to interpret the HTML Code. Currently there are seven !DOCTYPE's in HTML 4.01 / XHTML 1.0 / XHTML 1.1 . Here is a list of them all:

HTML 4.01
HTML 4.01 Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

"http://www.w3.org/TR/html4/strict.dtd">

HTML 4.01 Transitional

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

HTML 4.01 Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"

"http://www.w3.org/TR/html4/frameset.dtd">

XHTML 1.0

XHTML 1.0 Strict

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


XHTML 1.0 Transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


XHTML 1.0 Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">



XHTML 1.1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"

"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">



You will see there is Strict, Transitional and Frameset doctypes for both HTML 4.01 and XHTML 1.0 (XHTML 1.1 only has one doctype).

What is the difference between Strict, Transitional and Frameset doctypes?


Strict doctype

The strict doctype is as the name says, strict. If you use this doctype your web browser will switch to 'standards mode' i recommend using the strict doctype. As the browser will process your code much better(if your code is valid). In the strict doctype certain attributes and tags are invalid.


Transitional doctype

This doctype is the 'non-standards' doctype. It will switch the browser to 'non-standards mode'. I recommend not using this doctype, unless you need to use some of the attributes or tags that are invalid in the strict doctype.


Frameset doctype

The frameset doctype is used when frames are used on a page. Not many people use frames now-a-days, and sites look much better without frames, i recommend not using frames at all. Unless you have a special purpose for them.


Valid code?

You may be thinking 'how do i know whether my code is valid or not?'. Well validating your code is quite simple, it can be done online on the following sites:


* http://validator.w3.org/

* http://www.htmllhelp.com/tools/validator/


Once you are on the site, enter your pages URL or use the browse option to validate off your computer. When you have submitted it, a page will come up with all the errors your page has and a description of how to fix them. If your page has no errors, well done.