1 sayfadan 1. sayfa

cback filehash fontions???

İletiTarih: 01.01.2007, 19:36
sabri ünal
I dont speak english or german, but cyberosmanaut is a turkish?

happy year for all users and developers...

cbact ctracker file contol system why processing?

this file: class_ct_adminfunctions.php

and this code


Kod: Tümünü seç
      $directory = @opendir($dir);

      while (@$file = readdir($directory))
      {
         if (!in_array($file, array('.', '..')))
         {
            $is_dir = (is_dir($dir .'/'. $file)) ? true : false;

            // Create a nice Path for the found Files / Folders
            $temp_path  = '';
            $temp_path  = $dir . '/' . (($is_dir) ? strtoupper($file) : $file);
            $temp_path  = str_replace('//', '/', $temp_path);

            // Remove dots from extension Parameter
            $extension  = str_replace('.', '', $extension);

            // Fill it in our File Array if the found file is matching the extension
            if( preg_match("/^.*?\." . $extension . "$/", $temp_path) && !preg_match('/cache\\//m', $temp_path) )
            {
               $filehash = filesize($temp_path) . '-' . count(file($temp_path));
               $filehash = md5($filehash);

                  $sql = 'INSERT INTO ' . CTRACKER_FILECHK . " (`filepath`, `hash`) VALUES ('$temp_path', '$filehash')";

                  if(!($result = $db->sql_query($sql)))
                  {
                     message_die(CRITICAL_ERROR, $lang['ctracker_error_database_op'], '', __LINE__, __FILE__, $sql);
                  }
              }

              // Directory found, so recall this function
              if ($is_dir)
              {
                 $this->recursive_filechk($dir .'/'. $file, $dir .'/', $extension);
              }
           }
       }

       @closedir($directory);


very good but


Kod: Tümünü seç

$filehash = filesize($temp_path) . '-' . count(file($temp_path));



yes filehash only controling filesize!

for exsamplle

ı opened my config.php and replacted

from this

Kod: Tümünü seç
//Admin paneli koruma şifresi
$config['adminuser'] = 'xxxxxxx';
$config['adminpassword'] = 'xxxxxxx';


to this

Kod: Tümünü seç
//Admin paneli koruma şifresi
/*$config['adminuser'] = 'xxxxxxx';
$config['adminpassword'] = 'xxxxxxx';*/


great end...

sonuç muhteşem

config.php ->
not changed


thaks for all developpers from turkey :)

nice to meet you

İletiTarih: 01.01.2007, 19:38
sabri ünal
http://www.community.cback.de/viewtopic.php?t=9630

konuyu gündeme getirdim bakalım benim kıt kanaat ingilizcemle elin almanına laf anlatabilecek miyim...

İletiTarih: 02.01.2007, 14:06
yaso19
hımm ii bari o tekin kardeş cevap yazmış bi dahaki verssiyonda md5 hash kontrolü ekleris demiş ;) güsel bi olaya barnak basmışın :D

Cvp: cback filehash fontions???

İletiTarih: 03.01.2007, 06:35
sabri ünal
işte tam böyle bir şey...

You are right. We should insert a md5 hash routine into it.

ATTENTION - TURKISH FROM NOW ON:

Dogru konusuyorsun kardes. Gelecek versionda md5 hash controlu ekleriz ve o zaman 'not changed' demez. Wink

Bayramin kutlu olsun,
Tekin