Sunday, August 07, 2005

Directory index

Some (free) webservers do not allow to list files in directories. This script can help (thanks to http://www.plebian.com/news.php?artc=8):

<?php
unset($dir);
if(!empty($HTTP_GET_VARS['dir'])&&!strpos($HTTP_GET_VARS['dir'],'..')&&!strpos($HTTP_GET_VARS['dir'],'\.\.'))
{

$dir=$HTTP_SERVER_VARS['DOCUMENT_ROOT'].'/'.$HTTP_GET_VARS['dir'];
$d=&$HTTP_GET_VARS['dir'];
}
else
{
$dir='.';
$d='.';
}
clearstatcache();
if($a=@opendir($dir))
{
$dir=htmlspecialchars($dir);
$d=htmlspecialchars($d);
while(false!==($b=readdir($a)))
{
if(ereg("^\.",$b))
continue; // ignore hidden files
if ($b=='index.php') continue; //ignore index.php
echo (is_dir($b))?"
  • $b":"
  • $b";
    }
    closedir($a);
    }
    else
    {
    echo 'unable to open directory';
    }
    ?>
  • Sunday, July 31, 2005

    aMSN tip

    Since aMSN 0.95b (11/07/2005 in my case), it says that TkCximage is needed to run aMSN and it can be compiled with the makefile inside amsn folder. To compile it, tcl-dev and tk-dev are needed. Compiling is done as usual: ./configure and make.

    In this version, compilation happens in 3 places: utils/TkCximage/, utils/webcamsn/ and utils/linux/capture/ with creation of utils/TkCximage/TkCximage.so, utils/webcamsn/webcamsn.so, utils/linux/capture/capture.so, utils/linux/capture/libng/plugins/drv0-v4l2.so, and utils/linux/capture/libng/plugins/drv1-v4l.so. Then files .c, .h, .o can be deleted to save spaces in these directories.

    Disable logo: rename skins/default/pixmaps/logolinmsn.png (or comment the line ::skin::setPixmap logolinmsn logolinmsn.gif in gui.tcl, but there will be a blank line insteads).

    First post

    This post marks the registration date for this blog.