feat: initial commit
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* 指纹检测跳转页(原 check_flow 内联 HTML)
|
||||
*/
|
||||
class FingerprintRedirectRenderer
|
||||
{
|
||||
/**
|
||||
* @param string $configName 站点配置名,如 index
|
||||
*/
|
||||
public static function renderAndExit($configName)
|
||||
{
|
||||
$template = dirname(__DIR__, 3) . '/resources/fingerprint_redirect.html.php';
|
||||
if (!is_readable($template)) {
|
||||
return;
|
||||
}
|
||||
$html = file_get_contents($template);
|
||||
$html = str_replace('{{CONFIG_NAME}}', htmlspecialchars($configName, ENT_QUOTES, 'UTF-8'), $html);
|
||||
echo $html;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../FpUrlHelper.php';
|
||||
|
||||
/**
|
||||
* 真实页输出(原 page_6.php)
|
||||
*/
|
||||
class FpPageRenderer
|
||||
{
|
||||
/**
|
||||
* @param array $ctx 必须包含 logs 数组
|
||||
*/
|
||||
public static function render(array $ctx)
|
||||
{
|
||||
$logs = $ctx['logs'];
|
||||
|
||||
$my_url = $_SERVER['PHP_SELF'];
|
||||
$my_file_name = substr($my_url, strrpos($my_url, '/') + 1);
|
||||
$cong_name = str_replace('.php', '', $my_file_name);
|
||||
|
||||
$resolved = FpUrlHelper::resolve($cong_name, true);
|
||||
$fp_url = $resolved['url'];
|
||||
$logs['fp_url'] = $fp_url;
|
||||
write_log_db($logs);
|
||||
|
||||
$show_content = CLOAK_SHOW_CONTENT;
|
||||
if ($show_content == 'curl') {
|
||||
$html = file_get_content_sstr($fp_url);
|
||||
$_html = caiji_lujing_buquan_fp($html, $fp_url, $_SERVER['HTTP_HOST']);
|
||||
echo $_html;
|
||||
exit;
|
||||
}
|
||||
if ($show_content == '302') {
|
||||
header('location:' . $fp_url);
|
||||
exit;
|
||||
}
|
||||
if ($show_content == 'js') {
|
||||
?>
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
var time = 1;
|
||||
var timelong = 0;
|
||||
function diplaytime(){
|
||||
document.all.his.innerHTML = time -timelong ;
|
||||
timelong ++;
|
||||
}
|
||||
function redirect(){
|
||||
window.location.href="<?php echo $fp_url; ?>";
|
||||
}
|
||||
timer=setInterval('diplaytime()', 300);
|
||||
timer=setTimeout('redirect()',time * 300);
|
||||
</SCRIPT>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* 二次风控页(原 page_666.php,依赖调用方 $logs 等变量)
|
||||
*/
|
||||
class RiskPageRenderer
|
||||
{
|
||||
/**
|
||||
* @param array $ctx 需含 v_info、log_id(write_log_db 返回值);可选 logs
|
||||
*/
|
||||
public static function render(array $ctx = [])
|
||||
{
|
||||
extract($ctx, EXTR_SKIP);
|
||||
require dirname(__DIR__, 3) . '/page_666.php';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user