• B.PHP

    From Angus McLeod@VERT/ANJO to All on Friday, February 01, 2008 10:59:00
    There is a second piece of code, thankfully shorter, retrieved from a directory called "b". Here it is, with heading/trailing newlines/blanks removed, and PP'd:

    ------------8<------------------------------>8-------------

    <?php

    error_reporting(1);
    global $HTTP_SERVER_VARS;
    $START = time();
    $WD_TIMEOUT = array(8, 7, 6, 6, 5, 5, 5, 5, 0);

    function walkdir($p, $func='_walkdir', $l=0) {
    global $START;
    global $WD_TIMEOUT;
    global $FL;
    $func_f = "{$func}_f";
    $func_d = "{$func}_d";
    $func_s = "{$func}_s";
    $func_e = "{$func}_e";
    if ($dh = @opendir("$p")) {
    if (function_exists($func_s)) {
    if ($func_s($p, $l)) return 1;
    };
    while ($f = @readdir($dh)) {
    if (time() - $START >= $WD_TIMEOUT[$l] ) break;
    if ($f == '.' || $f == '..' ) continue;
    if (@is_dir ("$p$f/") ) walkdir("$p$f/", $func, $l+1);
    if (@is_dir ("$p$f/") && function_exists($func_d)) $func_d("$p$f/", $l);
    if (@is_file("$p$f" ) && function_exists($func_f)) $func_f("$p$f" , $l);
    };
    closedir($dh);
    if (function_exists($func_e)) $func_e($p, $l);
    };
    };

    function r_cut($p) {
    global $R;
    return substr($p, strlen($R));
    };

    function say($t) {
    echo "$t\n";
    };

    function testdata($t) {
    say(md5("testdata_$t"));
    };

    $R = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];
    echo "<pre>";
    testdata('start');
    function _walkdir_f($f, $l) {
    if (ereg("^namogofer\.", basename($f))) {
    if (@unlink($f)) say(r_cut($f));
    };
    };

    walkdir("$R/");
    testdata('end');
    echo "</pre>"; ?>

    ------------8<------------------------------>8-------------

    Most of the routines are similar/the same. But only _walkdir_f() is
    present, and all it seems to do in this case is to remove any file called 'namogofer.*' from each directory. So this seems to simply remove the
    files dropped by the first piece of code.

    BTW, if you google 'namogofer.php' you will find lots of them out there, mostly in directory indexes. If you only knew what gave an MD5 digest of "aace99428c50dbe965acc93f3f275cd3", I imagine that most of these sites
    could be totally yours to do with what you want! :-)

    ---
    Playing: "Sunset (Bird Of Prey)" by "Fatboy Slim"
    from the "Halfway Between The Gutter And The Stars" album.

    ---
    þ Synchronet þ With my ISP it's the InterNOT at The ANJO BBS