Category Archives: Computing

Tech talk, I won’t be responsible for your loss of the will to live!

UT2k Query Script

This is only the second script that I have actually published so I hope you like it. This script came about due to the huge interest in the script I wrote for my website that queried my UT2003 server and returned as much information as possible about the game to a page. Lots of people e-mailed me asking for the source so I tidied it up and that is what you see here.

This script works fine with UT2004 I just haven’t removed all the references to UT2003 yet 🙂

I never claimed to be a professional Perl programmer and as such I would class this script as permanently in BETA. I am always looking for comments on my work so if you see an improvement that can be made to the code, have an idea for another project or just like the script then please take a moment to contact me .

What it does
This script queries the game server on the GameSpy query port (usually +10 from the base port), the results are then parsed and cleaned up to make them easier to understand (e.g. True/False is turned into Yes/No) before being output to an HTML page. The resulting page also includes the meta tag to refresh and so the browser window can be kept open and the page will automatically update itself. There are a number of configuration settings that allow you to tweak the timeout, refresh & title as well as page colour settings and as an optional setting you can include your own HTML before and after the query which allows you to keep the same look and feel of your site.

Screenshot

Download

ut2003-query.tar.gz

Dependancies
This script requires the following things…

  • Perl – It’s a perl script!! You will require v5.003 or above.
  • A webserver – Anything that can cope with with CGI scripts written in Perl.

Installation
The setup should be pretty easy…

  • Download the script from this site.
  • Put the download where you want it.
  • Uncompress the file using ‘gunzip ut2003-query.tar.gz’.
  • Extract the tar using ‘tar xvf ut2003-query.tar’.
  • Run ‘chmod 755 ut2003-query.cgi’
  • Edit the path to perl in the first line of ut2003-query.cgi.
  • Try running the script without changing any of the configuration, by default it should query my UT2003 server as long a your webserver can ‘see’ my UT2003 server ‘gamer.dogsbody.org’ e.g. your not on a LAN.
  • Edit the configuration lines at the top of ut2003-query.cgi for your details…
    • $server – Server hostname or IP address.
    • $port – Server’s main game port.
    • $queryport – The Gamespy query port offset, this should be “+10”.
    • $timeout – How many seconds to wait for a response from the server.
    • $refresh – How often to refresh the results page in seconds.
    • $title – The title of the page returned which will be used in the header and at the top of the page.
    • $bgcolour – The background colour of the page returned.
    • $fgcolour – The text colour for the page returned.
    • $lncolour – The colour of hyperlinks on the page returned.
    • $headerfile – Optional: You can leave this field blank which will return the results in a generic page however you can set this to the path of an HTML file that can be included before the results page, this allows you to include whatever else you like on the results page to fit in with the rest of your site. Be warned the “” tags are returned at the top of all pages so your HTML should carry on from there. If you use this $bgcolour, $fgcolour & $lncolour will not be used as you can specify your own tag and $title will only be used for the text at the top of the page.
    • $footerfile – Optional: As with the headerfile, this is the path to an HTML file that can be used to close off any tables used in the headerfile. This file SHOULD include the & tags.
    • $pictureurl – Enter a URL or relational path to images of maps that this query should use. The text “MATCHTHIS” will be replaced with the map filename in lowercase. The default for this links to the images in my site which you are welcome to use, more details.
    • $script – This should be set to the filename of the script (yes the file you are editing), this is used to call the script back and refresh the HTML page. If you set this to “$ENV{SCRIPT_URI}” it will automatically be set to the correct name on most web servers (tested on Apache, iPlanet & Netscape Web servers).
  • And hopefully it will all work 🙂 Happy Fragging

Notes / Known Bugs
The numbers of players on the server is returned twice, once as a player count which is reported in the bottom left table and also as each individual player statistic. Sometimes these two counts don’t tally up with the player count reporting a higher number. As far as I can tell this is correct as the player count reports on the number of connections to the server which does not necessarily mean they are playing the game (e.g. they are downloading the map or haven’t pressed fire to join the game)

The translocator field doesn’t work, data should be returned to show is the translocator can be used on the server however the data is empty each time. This seems to be a bug in UT2003, If anyone sees that this is fixed in a patch or something I will see if I can query that and turn this back on.

Changelog

  • 3.00 – 04 Jun 2003
    • First public release of code – removed all site specific stuff and tidied up.
  • 2.xx – Various Dates
    • Complete re-write of code using own UDP query to UT2003 server.
  • 1.xx – Various Dates
    • First write of a query script that used qstat to get details from server.

IT ‘nerds’ get more bedroom action

With a title like that I just had to put this on my site!! 🙂

The archetypal image of the IT professional is of a nerdy bloke who spends most of his time by the computer. But Downtime can now explode that myth by revealing that “adult male nerds” have sex far more often than the average man.

This is the findings of a survey of more than 7,500 such individuals carried out in the US by IT recruitment Web site JustTechJobs.com. It discovered that these IT-focused lotharios have sex an average of 108 times a year, compared to the average of 79 times a year for non-ITers.

Russ Curtis, JustTechJobs’ chief executive said, “If these guys were anything like I was, they were picked on as kids, and probably didn’t kiss a girl until they were 23 years old. Now they have money and power and members of the opposite sex find them very alluring.”

Computer Weekly – 26 April 2001

The Conscience of a Hacker

This was taken from Phrack Volume One, Issue 7, Phile 3 of 10. It is a poem by a hacker that was arrested back in 1986, funny how it still seems to be appropriate so many years on. Incidentally, bits of this file made it into the movie “Hackers” (I sense Emmanuel Goldsteins influence there!!) I know it’s kinda sad but in some ways I like this, if nothing else but that it’s a nice bit of poetry. Anyway, here it is in its original format:

The Conscience of a Hacker

by

+++The Mentor+++

Written on January 8, 1986


Another one got caught today, it’s all over the papers. “Teenager Arrested in Computer Crime Scandal”, “Hacker Arrested after Bank Tampering”…

Damn kids. They’re all alike.

But did you, in your three-piece psychology and 1950’s technobrain, ever take a look behind the eyes of the hacker? Did you ever wonder what made him tick, what forces shaped him, what may have molded him?

I am a hacker, enter my world…

Mine is a world that begins with school… I’m smarter than most of the other kids, this crap they teach us bores me…

Damn underachiever. They’re all alike.

I’m in junior high or high school. I’ve listened to teachers explain for the fifteenth time how to reduce a fraction. I understand it. “No, Ms. Smith, I didn’t show my work. I did it in my head…”

Damn kid. Probably copied it. They’re all alike.

I made a discovery today. I found a computer. Wait a second, this is cool. It does what I want it to. If it makes a mistake, it’s because I screwed it up. Not because it doesn’t like me…

Or feels threatened by me…

Or thinks I’m a smart ass…

Or doesn’t like teaching and shouldn’t be here…

Damn kid. All he does is play games. They’re all alike.

And then it happened… a door opened to a world… rushing through the phone line like heroin through an addict’s veins, an electronic pulse is sent out, a refuge from the day-to-day incompetencies is sought… a board is found.

“This is it… this is where I belong…”

I know everyone here… even if I’ve never met them, never talked to them, may never hear from them again… I know you all…

Damn kid. Tying up the phone line again. They’re all alike…

You bet your ass we’re all alike… we’ve been spoon-fed baby food at school when we hungered for steak… the bits of meat that you did let slip through were pre-chewed and tasteless. We’ve been dominated by sadists, or ignored by the apathetic. The few that had something to teach found us will- ing pupils, but those few are like drops of water in the desert.

This is our world now… the world of the electron and the switch, the beauty of the baud. We make use of a service already existing without paying for what could be dirt-cheap if it wasn’t run by profiteering gluttons, and you call us criminals. We explore… and you call us criminals. We seek after knowledge… and you call us criminals. We exist without skin color, without nationality, without religious bias… and you call us criminals. You build atomic bombs, you wage wars, you murder, cheat, and lie to us and try to make us believe it’s for our own good, yet we’re the criminals.

Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.

I am a hacker, and this is my manifesto. You may stop this individual, but you can’t stop us all… after all, we’re all alike.

+++The Mentor+++

Meltdown – The Maths

Originally posted on this site before Y2K (now just a distant memory) it is true to say that everyone got very worked up about this. If you want my opinion (and you probably don’t) I’m still surprised there weren’t more public incidents although let me assure you there were a number of major corporations that had major issues, it’s not in their best interests to tell you that they had problems!!

The Millennium bug raises real possibilities of serious safety incidents around the world. Just consider the figures.

There are between 20 billion and 40 billion microprocessors in use worldwide, of which 20 per cent are in commercial systems. Taking the lower estimate, this means there are about four billion industrial or commercial chips in use.

If 95 per cent of these are either located or bug-free, this still leaves 200 million industrial chips that will fail – or about 10 million an hour as each time zone passes into the Millennium.

Taking an optimistic view that 99.9 per cent of these malfunctioning chips have no impact, this leaves 200,000 safety-critical chips to fail.

Assuming that the worst never happens, let us accept that luck, quick-thinking or some other agency averts 90 per cent of the potential safety-critical incidents caused by the failure of these remaining chips. That still leaves 20,000 serious safety incidents worldwide, all of them likely to occur around the same time.

Assuming the best again, let us say the hand of God thwarts 99.9 per cent of these disasters: this still leaves 20 serious safety incidents worldwide – roughly one per time zone.

By comparison, on the day of Britain’s 1987 hurricane, not a single chip in Britain failed. It is no wonder that the Government has prepared contingency plans to deal with civil unrest, collapse of the national infrastructure, a breakdown of the NHS and a series of allied disasters.