有人可以帮我检查一下代码吗?我不了解PHP部分 [英] Can someone check the code for me? I don't understand the PHP part

查看:183
本文介绍了有人可以帮我检查一下代码吗?我不了解PHP部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以为我检查代码吗?我不了解php部分.我正在尝试一种跳过验证或在其中找到代码的方法.

我尝试过的事情:

<?php
require_once(''config.php'');
session_start();

if(isset($ _ GET [''code''])){
$ content = file_get_contents(__ FILE__);
echo Highlight_string($ content);
exit();
}

if(isset($ _ POST [''solution''])&& $ _SESSION [''captcha_solution''] == $ _POST [''solution'']){
$ correct = true;
} else {
$ correct = false;
}

如果(!$正确){
$ _SESSION [''captcha_solution''] = openssl_random_pseudo_bytes(100);
}
?>


< meta charset ="utf-8">



身体{
padding-top:40像素;
padding-bottom:40px;
}




<?php if(!$ correct){?>

Can someone check the code for me? I don''t understand the php part. I''m trying a way to skip the verification or to find the code inside.

What I have tried:

<?php
require_once(''config.php'');
session_start();

if (isset($_GET[''code''])) {
$content = file_get_contents(__FILE__);
echo highlight_string($content);
exit();
}

if (isset($_POST[''solution'']) && $_SESSION[''captcha_solution''] == $_POST[''solution'']) {
$correct = true;
} else {
$correct = false;
}

if (!$correct) {
$_SESSION[''captcha_solution''] = openssl_random_pseudo_bytes(100);
}
?>


<meta charset="utf-8">



body {
padding-top: 40px;
padding-bottom: 40px;
}




<?php if (!$correct) { ?>


不可能输入验证码吗?





SHA1(?)=<?php echo sha1($ _ SESSION [''captcha_solution'']);; ?>


Captcha Impossible ?





SHA1(?) = <?php echo sha1($_SESSION[''captcha_solution'']); ?>


解决方案:


Solution :





淡紫色解决方案


<?php}?>




<?php } ?>





<!-/容器->
<?php}其他{?>

<!-- /container -->
<?php } else { ?>



<?php echo $ flag; ?>
<?php echo $flag; ?>




<?php}?>


<?php } ?>

推荐答案

_GET [``code'']))){
_GET[''code''])) {


content = file_get_contents(__ FILE__);
echo Highlight_string(
content = file_get_contents(__FILE__);
echo highlight_string(


content);
exit();
}

如果(isset(
content);
exit();
}

if (isset(


这篇关于有人可以帮我检查一下代码吗?我不了解PHP部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆