Location: PHPKode > projects > Ptk-forensics > ptk/lib/get_live_file_content.php
<?
/*
PTK  - DFLabs
Copyright (C) 2008 - DFLabs srl - All rights reserved
hide@address.com
*/
include("check_session.php");
include("check_session_image.php");
include("lib_commands.php");
include("lib_std.php");
include("loggerClass.php");

$offset = sanitize($_GET['arg1'],INT);
$inode = sanitize($_GET['arg2'],PARANOID);
$type = sanitize($_GET['arg3'],PARANOID);

$path = $_SESSION['image_path'];
$test = user_can_load_this_image(sanitize($_SESSION['image_id'],INT));
if (test == true){
	if($type=='ascii'){
		$output = get_live_file_content_ascii($path, $offset, $inode);
	}
	elseif($type=='hex'){
		$output = get_live_file_content_hex($path, $offset, $inode);	
	}	
	elseif($type=='asciistrings'){
		$output = get_live_file_content_asciistrings($path, $offset, $inode);		
	}
	$output = preg_replace("/\\\n/", "<br>", $output);	
	if($output=='') $output = "File recovery not possible";
	echo RemoveXSS($output);
}else{
        new AuditLog('Unauthorized access to image');
        header("location: goto_home.php");
}
?>
Return current item: Ptk-forensics