PHP Classes

PHP Secure File: Scan directories and compute hashes of file lists

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 55%Total: 311 All time: 7,313 This week: 488Up
Version Licenses PHP version Categories
secure-file 1.0BSD License, GNU ...5.0PHP 5, Files and Folders, Security
Description 

Author

This class can scan directories and compute hashes of file lists.

It can traverse a given directory recursively and compute SHA1 hashes of the each file it finds.

The listing of files and hashes is saved to a new file, so it can be used later to determine if any of the scanned files has changed.

Picture of Nick Daniels
  Performance   Level  
Name: Nick Daniels <contact>
Classes: 13 packages by
Country: United States United States
Age: 34
All time rank: 1107160 in United States United States
Week rank: 216 Up24 in United States United States Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

Example

<?php
/** SecureFile**
 *
 * @Auther Nick Daniels : http://twitter.com/ManicSec
 * @INFO ::: Currently not finished, You're free to continue.
 */
require_once('SecureFile.class.php');

$secFile = new SecureFile("www/");
print_r($secFile->getDirStruct());


  Files folder image Files (6)  
File Role Description
Files folder imagewww (2 files, 1 directory)
Accessible without login Plain text file example.php Example Example script
Plain text file SecureFile.class.php Class Class source
Accessible without login Plain text file sha1.db Data Auxiliary data

  Files folder image Files (6)  /  www  
File Role Description
Files folder imageaSecondDIr (1 file)
  Accessible without login Plain text file about.php Data Example script
  Accessible without login Plain text file index.php Data Example script

  Files folder image Files (6)  /  www  /  aSecondDIr  
File Role Description
  Accessible without login Plain text file index.php Data Example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:311
This week:0
All time:7,313
This week:488Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:66%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:55%StarStarStar
Rank:1915