2009
03.24

UIF (Universal Image Format) is a virtual image format used by MagicISO!

2009
03.13

Function

Removes redundant spaces within a string.

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// :: JaZz phpFramework
// :: V1.0
// :: 13/03/2009 15:24:08
function remove_redundant_spaces($String = '')
{
  // :: Initalize Variables
  $Result = NULL;
  for ($i = 0; $i < strlen($String); $i++) {
    if (substr($String, $i, 1) != ' ') {
      $Result .= trim(substr($String, $i, 1));
    }
    else {
      while (substr($String, $i, 1) == ' ') {
        $i++;
      }
      $Result .= ' ';
      $i--;
    }
  }
  return $Result;
}


Usage

1
2
3
$String = 'This    string   contains    redundant    spaces';
$NewString = remove_redundant_spaces($String);
echo $NewString; // Output: This string conains redundant spaces


So long,
JaZz

2009
03.13

On the 14th February 2009 was Debian 5 (Codename Lenny) released.
To update from Debian 4.x to Debian 5.x follow the following steps:

Step 1
Edit the sources.list

vim /etc/apt/sources.list

Step 2
Replace “etch” with “lenny”

:%s/etch/lenny/g

Step 3
Save the new sources.list

:wq

Step 4
Update your sources index

apt-get update

Step 5
Repeat the following command until nothing more is upgraded.

apt-get upgrade

Step 6
Repeat the following command until nothing more is upgraded.

apt-get dist-upgrade

Your Debian system should now be up to date!

So long,
JaZz

2009
03.12

The Function

  func.parse_ftp_rawlist.php (1.3 KiB, 294 hits)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// :: JaZz phpFramework
// :: V1.1
// :: 13/03/2009 15:35:22
function parse_ftp_rawlist($List, $Win = false)
{
  $Output = array();
  $i = 0;
  if ($Win) {
    foreach ($List as $Current) {
      ereg('([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|) +(.+)', $Current, $Split);
      if (is_array($Split)) {
        if ($Split[3] < 70) {
          $Split[3] += 2000;
        }
        else {
          $Split[3] += 1900;
        }
        $Output[$i]['isdir']     = ($Split[7] == '');
        $Output[$i]['size']      = $Split[7];
        $Output[$i]['month']     = $Split[1];
        $Output[$i]['day']       = $Split[2];
        $Output[$i]['time/year'] = $Split[3];
        $Output[$i]['name']      = $Split[8];
        $i++;
      }
    }
    return !empty($Output) ? $Output : false;
  }
  else {
    foreach ($List as $Current) {
      $Spli = preg_split('[ ]', $Current, 9, PREG_SPLIT_NO_EMPTY);
      if ($Split[0] != 'total') {
        $Output[$i]['isdir']     = ($Split[0] {0} === 'd');
        $Output[$i]['perms']     = $Split[0];
        $Output[$i]['number']    = $Split[1];
        $Output[$i]['owner']     = $Split[2];
        $Output[$i]['group']     = $Split[3];
        $Output[$i]['size']      = $Split[4];
        $Output[$i]['month']     = $Split[5];
        $Output[$i]['day']       = $Split[6];
        $Output[$i]['time/year'] = $Split[7];
        $Output[$i]['name']      = $Split[8];
        $i++;
      }
    }
    return !empty($Output) ? $Output : false;
  }
}

Usage

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// set up basic connection
$conn_id = ftp_connect($ftp_server);
 
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
 
// get the file list for /
$buff = ftp_rawlist($conn_id, '/');
 
// OUR LITTLE PARSER
$a = parse_ftp_rawlist($buff, false);
var_dump($a);
 
// close the connection
ftp_close($conn_id);

  func.parse_ftp_rawlist.php (1.3 KiB, 294 hits)

Have fun!
Andreas Glaser aka JaZz

2009
03.06

A required update for Team Fortress 2 is now available. Please run hldsupdatetool to receive it. The specific changes include:

Gameplay changes:
- Added a duck timer that prevents duck spamming while running around on-ground.
- In-air, players are only allowed to duck once before they touch ground again.
- Fixed several bounding box issues with jumping, falling, and rocket jump air-walking. Bounding box should be much more accurate there now.
- Increased backstab check so that Spies can side-stab again.
- When disguising, Spies now always start showing the primary weapon in their disguise, and can then switch it with the last-disguise key.

TF2 Fixes:
- Fixed flamethrower loophole that resulted in the flame effect being stuck on while the flamethrower wasn’t really firing.
- Fixed exploit that allowed players to circumvent the force-fire timeout on the pipebomb launcher.
- Fixed a bug that caused Natasha’s slow on hit effect to be inverted from 75% to 25%.
- Restored sawmill_logs.mdl file, fixing some user maps that used it.
- Fixed some localization issues with Scout achievement strings.
- Removed the “Final” phrasing in the map loading screen.

Engine fixes:
- Fixed a server crash on startup under Linux.
- Fixed a buffer overflow issue related to network string tables.
- Gamestats uploading is now done asynchronously. This fixes the client timeout issues on map changes.

CP_Junction:
- Fixed an exploit where engineers could build a teleporter exit in an invalid area.
- Fixed a few bad overlay assignments and other minor issues.