本文整理汇总了PHP中Common::getInteger方法的典型用法代码示例。如果您正苦于以下问题:PHP Common::getInteger方法的具体用法?PHP Common::getInteger怎么用?PHP Common::getInteger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Common
的用法示例。
在下文中一共展示了Common::getInteger方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Binary
<?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("/�/", " ", $html);
print $html;
print "</pre>";
示例2:
<?php
$md5 = Common::getMD5("report");
$id = Common::getInteger("rtstring");
$binary = "uploads/{$md5}.bin";
$resources = Binary::resources($binary);
$c = 0;
$start = 0;
$size = 0;
foreach ($resources as $r) {
if ($r["type"]["value"] != "RT_STRING") {
continue;
}
$c++;
if ($c == $id) {
$start = $r["fo"]["value"];
$size = $r["size"]["value"];
}
}
if (!$start && !$size) {
print Common::Error("Error", "That rt_string resource was not found...");
return;
}
if ($start[0] == "-") {
print Common::Error("Error", "The rt_stirng information is invalid: Negative offset position.");
return;
}
if ($size[0] == "-") {
print Common::Error("Error", "The rt_string information is invalid: Negative size.");
return;
}
示例3: header
<?php
$md5 = Common::getMD5("report");
$icon = Common::getInteger("icon");
$binary = "uploads/{$md5}.bin";
@ob_clean();
if (!file_exists($binary)) {
$path = "img/computers.jpg";
header("Content-Type: image/jpg");
print file_get_contents($path);
} else {
$cache_icon = "cache/{$md5}" . "_icon_" . $icon . ".bmp";
if (!file_exists($cache_icon)) {
$count = 0;
$offset = 0;
$size = 0;
$b = new Binary($binary);
$html = Pefile::call("res_offsets", $binary);
preg_match_all("/RT_ICON (.+)/", $html, $i);
if ($icon > count($i[1])) {
die;
}
foreach ($i[1] as $icn) {
$count++;
if ($count == $icon) {
list($va, $offset_d, $size, $offset) = preg_split("/\\s/", $icn);
break;
}
}
list($width, $height) = getIconWH($b, $html, $icon);
//print "width: ".ord($width)." height: ".ord($height);
示例4: intval
<?php
if (!isset($_SESSION["crate_" . $vars["binary"]])) {
$crate = Binary::compression_rate($vars["binary"]);
$_SESSION["crate_" . $vars["binary"]] = $crate;
} else {
$crate = $_SESSION["crate_" . $vars["binary"]];
}
$filesize = Binary::filesize($vars["binary"], false);
$nbytes = intval($filesize / count($crate));
$x = Common::getInteger("x");
if (strlen($x)) {
$label = htmlentities(Common::getString("label"));
//if($nbytes>1024*2) $nbytes=1024*2;
$found = false;
$found_next = false;
$found_prev = false;
$x_prev = 0;
$label_prev = "";
$y = "?";
foreach ($crate as $point) {
if ($found) {
$x_next = $point["x"];
$label_next = "0x" . dechex($point["x"]) . " " . $point["label"];
$found_next = true;
break;
}
if ($point["x"] == $x) {
$found = true;
$y = $point["y"];
if (isset($last_point)) {
示例5: dechex
<?php
$handle = "0x" . dechex(hexdec(Common::getString("handle")));
$pid = Common::getInteger("pid");
// tr class= active, success, warning, danger
?>
<div class="row clearfix">
<div class="col-md-12 column">
<table class="table table-bordered">
<thead>
<tr>
<th>
#
</th>
<th>
Pid
</th>
<th title="Mode (Create or Set)">
M
</th>
<th>
Type
</th>
<th title="Handle">
Hndl
</th>
<th>
Key
</th>
<th>
Value
示例6: array
<?php
// tr class= active, success, warning, danger
$handle = Common::getInteger("handle");
$procedures = array();
if (strlen($handle)) {
$procedures = Sinjector::procedures($vars["md5"], $handle);
}
$hooks = Sinjector::hooks();
?>
<div class="row clearfix">
<div class="col-md-12 column">
<table class="table table-bordered">
<thead>
<tr>
<th>
#
</th>
<th>
Name
</th>
<th>
Procs
</th>
<th>
Handle
</th>
</tr>
</thead>
<tbody>
<?php
示例7: header
<?php
$md5 = Common::getMD5("report");
$bitmap = Common::getInteger("bitmap");
$binary = "uploads/{$md5}.bin";
@ob_clean();
if (!file_exists($binary)) {
$path = "img/computers.jpg";
header("Content-Type: image/jpg");
print file_get_contents($path);
} else {
$cache_bitmap = "cache/{$md5}" . "_bitmap_" . $bitmap . ".bmp";
if (!file_exists($cache_bitmap)) {
$count = 0;
$offset = 0;
$size = 0;
$b = new Binary($binary);
$html = Pefile::call("res_offsets", $binary);
preg_match_all("/RT_BITMAP (.+)/", $html, $i);
if ($bitmap > count($i[1])) {
die;
}
foreach ($i[1] as $bmp) {
$count++;
if ($count == $bitmap) {
list($va, $offset_d, $size, $offset) = preg_split("/\\s/", $bmp);
break;
}
}
$header = $b->headerOf("RT_BITMAP");
$data = $b->readBytesAtOffset($offset, $size);