Ejemplo n.º 1
0
<?php

$md5 = Common::getMD5("report");
$id = Common::getInteger("id");
$binary = "uploads/{$md5}.bin";
$sections = Binary::sections($binary);
if ($id > count($sections)) {
    print Website::Error("That section was not found...");
    return;
}
$b = new Binary($binary);
$bytes = $b->readBytesAtOffset($sections[$id - 1]["prd"]["value"], $sections[$id - 1]["srd"]["value"]);
print "<pre>";
$html = htmlentities($bytes, ENT_DISALLOWED, "iso-8859-1");
$html = preg_replace("/&#xFFFD;/", " ", $html);
print $html;
print "</pre>";
Ejemplo n.º 2
0
</pre>
				</div>
				<div class="modal-footer">
					 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
				</div>
			</div>
		
		</div>
	
	</div>
<?php 
}
if (isset($_GET["rcdata"])) {
    print Templates::Load("templates/misc/rcdata_dump.php", array(""));
}
if (isset($_GET["rtbitmap"])) {
    print Templates::Load("templates/misc/rtbitmap_dump.php", array(""));
}
if (isset($_GET["rtstring"])) {
    print Templates::Load("templates/misc/rtstring_dump.php", array(""));
}
//check if we found the right section for dumping the resources
$sectionFound = false;
foreach (Binary::sections($binary) as $s) {
    if ($va == $s["va"]) {
        $sectionFound = true;
    }
}
if (!$sectionFound && $va) {
    print Common::Error("Error", "The section with VirtualAddress={$va} was not found");
}