Home >Backend Development >PHP Tutorial >javascript - 紧急SOS!请问大神,这段代码是什么意思?是不是恶意代码?谢谢

javascript - 紧急SOS!请问大神,这段代码是什么意思?是不是恶意代码?谢谢

WBOY
WBOYOriginal
2016-06-06 20:35:561023browse

<code><div style="display:none;" id="__crond">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#__crond').html(unescape('%3Cimg%20src%3D%22' + G_BASE_URL + '/crond/run/<?php echo TIMESTAMP; ?>%22%20width%3D%221%22%20height%3D%221%22%20/%3E'));
        });
    </script>
</div>
</code>

回复内容:

<code><div style="display:none;" id="__crond">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#__crond').html(unescape('%3Cimg%20src%3D%22' + G_BASE_URL + '/crond/run/<?php echo TIMESTAMP; ?>%22%20width%3D%221%22%20height%3D%221%22%20/%3E'));
        });
    </script>
</div>
</code>

<code><img  src="G_BASE_URL/crond/run/TIMESTAMP/"    style="max-width:90%"  style="max-width:90%" alt="javascript - 紧急SOS!请问大神,这段代码是什么意思?是不是恶意代码?谢谢" >
</code>

其中G_BASE_URLjavascript里的变量,推测应该是类似http://www.example.com/TIMESTAMPphp里的一个变量,应该是当前时间戳,推测可能是20150416这样的字串,如果这样拼出来的话,会是像下面这样:http://www.example.com/crond/run/20150416 width="1" height="1"

具体是不是恶意的,你看看这两个变量拼接出来的路径是不是包含敏感信息。

不过我看这里的crond/run/20150416非常像是机器上crontab日志的路径,如果你的Web服务器配置有漏洞,使这个CGI执行能拿到结果,黑客将有可能从这里查看到你机器上的crontab信息,crontab里可能是包含机器密码、数据库密码的啊——你懂的。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn