nil0x42/phpsploit

View on GitHub
src/api/php-functions/can_change_mtime.php

Summary

Maintainability
A
0 mins
Test Coverage
<?

// can_change_mtime($path) (type => bool):
//      check if mtime can be arbitrarly changed

function can_change_mtime($path)
{
    $old_mtime = @filemtime($path);
    $old_atime = @fileatime($path);
    return @touch($path, $old_mtime, $old_atime);
}

?>