L33TSig 2 Logo
Personal tools



L33TSig API

From L33TSig Wiki

Jump to: navigation, search

I have decided to post this, as it means people can write their own scripts/clients for other operating systems (such as Mac OS, FreeBSD etc), or just alternatives to the current clients! It shouldn't pose any kind of security risk, as it still needs usernames and passwords to send any data - and no real data is ever sent back (only an "update ok" or a "it didn't work" signal is sent back by the server).

Contents

Prerequisites

Sending data is very easy - all you need is a working DNS resolver, port 80 access to the internet (it should work via most proxies), and a scripting/programming language that can send data over the TCP protocol.

The data in question is a simple HTTP 1.0 "GET" line.

I won't go into how to resolve DNS names, send HTTP requests or use proxies in this guide. If you're a competent programmer, you'll already know, or be able to work out how to do this.

Sending Data

There are two ways to send data:

  • Simply send a GET request to a PHP page which will process the variables in the query string.
  • Or send a POST to a different PHP page, which will process the variable you send.

The file to send GET requests to is rec.php. POST requests should be sent to rec2.php. The host to send to is www.l33tsig.net.

HTTP Encoding

You must (url)encode all data sent - you cannot send spaces or other "odd" ASCII characters. Some languages, such as PHP, now like to encode spaces using a + (plus) sign - you should use the old version, which uses %20 to symbolize a space.

Variables

Required Variables

You must send the following variables in your request:

  • Username
  • Password
    • MD5-hashed, and upper-case
  • At least one line

Optional Variables

You can optionally add these variables to the query string:

  • All the other lines, up to the limit of signatures, which is currently 7
  • CPU, RAM and HDD info, for the Avatars
  • Next update time, used for the Offline Message (only available to Subscribers (or higher) at the moment)

The Query String

Here is an example of a query string: Note: only the filename, file extension and variables are shown. When sending data you must send according to the HTTP standard specification

rec.php?user=testuser&pass=ABC123ABC123ABC123ABC123&line1=The%20First%20Line!

The other variables are:

  • line[1-7]
  • nud
  • cpu
  • ram
  • hdd

Variable Details

Line[1-7]

All seven line variables must be HTTP encoded, as mentioned earlier in the page. Max length is 255 characters, but remember that it has to fit on the signatures, so it shouldn't be more than 100 in reality.

NUD

The next update time is an integer (number). Any number above 1 is technically acceptable, but of course, it should be kept sensible. Some people may want to know that NUD isn't just some made up word, it stands for Next Up Date

CPU

cpu is a percentage of the current CPU load, of all CPUs in the system.

RAM

ram is a percentage of the current amount of used RAM in the system.

HDD

hdd is the percentage of all used disk space in the system.

Hostname

hostname is the hostname of the client computer, and is used in the PCID page to make it easier for a user to work out which of their computers is using which PCID.

Others

If you use Ethereal (or other packet sniffing software), you'll notice that the official clients send an uptime and sec variable - these are related to the record uptime, but cannot be used (at least not yet) by third-party clients.

Errors and Omissions

If you think I made an error somewhere, or missed out a vital piece of information, please feel free to join the IRC channel and tell me, contact me privately (if you know how), or post on the Talk page.