Main page

Half-Life sniffer

This program sniffs your network device, looking for half-life traffic. When it sees a "connect" message, it calls a batch file with three parameters:

hlpost.bat [ip] [port] [name]

The batch file then updates a web page on your web server, so all your friends can see where you are currently playing and join the same server. Simple, but effective.

Client installation

  1. Download and install winpcap32 (low level packet sniffer code)
  2. Download and install curl (used for posting data to a web server)
  3. Download and unzip hlsniff.
  4. Edit 'hlpost.bat' so it posts to your own web server.
  5. Run 'lsnet' to see what your network device is called
  6. Run 'hlsniff <devicename>'. The next time you join a server, your web page will be updated.

To enable joining a server directly from the web page, you also need to do the following:

  1. Copy hlstart.txt and hlstart.bat to your half-life directory
  2. Edit the first line of hlstart.bat so it cds to your half-life directory.
  3. Go into your browser's settings and associate the mime type "application/hlsniff" with the hlstart.bat batch file.

Note: If you edit hlstart.txt make sure that the file does not have a line feed at the end of the line, or it will not work. Some text editors have problems with this.

Server installation

The 'server' directory contains a very simple perl CGI script that receives the posts from your client and displays a list of players.

If you want to use the included hlinfo.pl script, you need to compile hlinfo.c on the server:

# gcc -o hlinfo hlinfo.c

Demo

This is my page, tracking my friends. DO NOT point your client at this page - create your own web page to track your own friends.

Version history

1.4 (2001-04-09)
Now handles spaces and special characters properly.
1.3 (2001-03-27)
Updated server perl scripts with hlstart code.
1.2 (2001-03-27)
Updated hlstart files and instructions
1.1 (2001-03-26)
Added hlstart functionality
1.0 (2001-03-25)
First version

Page was last modified "Apr 9 2001" Björn Stenberg
aaa