申请过很多免费空间,但不是很慢就是服务器上挂马(当然也有放广告条的)
比如下面这个:

……

这个空间上所有的html文件,在用户访问的时候都会在底部加上这么一行代码,虽然这段代码不显示广告,也没提示木马,但还是看着它不爽,万一以后将那个地址换成木马了,后果不堪设想。

下面介绍下

这个普通的标签大家很可能不熟悉,因为一般的,很少有人会用到它,其实,对于常与代码打交道的朋友来说,这是一个很实用的标签。<XMP>标签本来是用于显示XML内容的,但是也可以让它使HTML标签不被浏览器识别。</p> <p>我们可以在每个网页的底部加上<XMP>,这样即使被挂马,木马代码也是在<XMP>标签的后面,将不会被执行而是被直接显示在页面上。</p> <blockquote> <div class="quote"></table> <p><XMP><br /><iframe src=http://www.*******.cn/****.htm height=0></iframe><!-- 广告代码,不影响网站的访问 --></div> </blockquote> <p>当然我们希望它既不执行也不显示,所以还要在css里加入</p> <div class="UBBPanel"> <div class="UBBTitle"><img src="images/quote.gif" style="margin:0px 2px -3px 0px" alt="引用内容"/> 引用内容</div> <div class="UBBContent">XMP {display:none;}。</div> </div> <p>这样几乎所有在文件底部挂马的情况,都可以用这种方法解决。</p> </div> </div><!--toolBar--> <div class="toolBar toolBarTwo"> <UL> <li class="mrinc2 tags2">Tags:<a href="https://vcoo.me/tag/htm" rel="tag">htm</a>,<a href="https://vcoo.me/tag/%e6%9c%a8%e9%a9%ac" rel="tag">木马</a></li> <LI class="mrinc2 share_r" onmouseover=share_more(815,this);><A href="javascript:;">分享到...</A> </LI> </UL> </div> <SCRIPT>postArray[815]=[];postArray[815][0]="[HTM]巧用xmp标签防止网页被挂马";postArray[815][1]="https://vcoo.me/show/815.html";postArray[815][2]="申请过很多免费空间,但不是很慢就是服务器上挂马(当然也有放广告条的)比如下面这个: 引用内容......&lt;/table&gt;";postArray[815][3]="https://vcoo.me/wp-content/themes/MRuu2011/img/default.gif";</SCRIPT> </div> <div class="content_t_bot"><!--样式尾部--></div> </div> <div class="navigation"> <p class="navNew"><a href="https://vcoo.me/show/816.html" rel="next">[脚本]5个有趣的浏览器地址栏Javascript代码</a></p> <p class="navOld"><a href="https://vcoo.me/show/814.html" rel="prev">[图片]发几张冲击视觉的图片</a></p> </div> <!-- You can start editing here. --> <div id="comment_body"> <!-- If comments are open, but there are no comments. --> </div> <div class="navigation_comments"> <div class="pagination"></div> </div> <div id="respond"> <div class="excerpt_top"></div> <div class="excerpt_main"> <h3 class="givetext">发表评论</h3> <div class="cancel-comment-reply"> <!--<div id="real-avatar"> <img alt='' src='https://secure.gravatar.com/avatar/?s=40&#038;d=identicon&#038;r=g' srcset='https://secure.gravatar.com/avatar/?s=80&#038;d=identicon&#038;r=g 2x' class='avatar avatar-40 photo avatar-default' height='40' width='40' loading='lazy'/> </div>--> <small><a rel="nofollow" id="cancel-comment-reply-link" href="/show/815.html#respond" style="display:none;">点击这里取消回复。</a></small> </div> <form action="https://vcoo.me/wp-comments-post.php" method="post" id="commentform"> <div class="form_box"> <div class="form_infobody"> <div id="comment-author-info" class="form_info"> <div class="author"><input type="text" class="textfield" name="author" id="author" tabindex="1" value=""></div> <p style="height:15px"></p> <div class="email"><input type="text" class="textfield" name="email" id="email" tabindex="2" value=""></div> <p style="height:15px"></p> <div class="url"><input type="text" class="textfield" name="url" id="url" tabindex="3" value=""></div> </div> </div> <div class="form_text"><textarea name="comment" id="comment" class="textarea" tabindex="4" onfocus="if (this.value == 'Make Comments on this Article') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Make Comments on this Article';}">评论是一群人的孤单……</textarea></div> </div> <p></p> <div class="ajax_box" id="comment_jstext"><a href="http://www.gravatar.com/" target="_blank">想要个全球通用头像? | 点击注册吧</a></div> <div class="form_btn"> <div class="submit_box"><div class="aLeft"><input class="submit" name="submit" type="submit" id="submit" tabindex="5" value="提交留言"><input class="reset" name="reset" type="reset" id="reset" tabindex="6" value="重写"></div><div class="aRight"><p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="901951236a" /></p><input type="checkbox" name="comment_mail_notify" id="comment_mail_notify" value="comment_mail_notify" checked="checked" style="margin-left:0px;" /><label for="comment_mail_notify" style="display: inline;">有人回复时邮件通知我</label><p style="display: none !important;"><label>&#916;<textarea name="ak_hp_textarea" cols="45" rows="8" maxlength="100"></textarea></label><input type="hidden" id="ak_js" name="ak_js" value="93"/><script>document.getElementById( "ak_js" ).setAttribute( "value", ( new Date() ).getTime() );</script></p> / 快捷键:Ctrl+Enter</label><input type='hidden' name='comment_post_ID' value='815' id='comment_post_ID' /> <input type='hidden' name='comment_parent' id='comment_parent' value='0' /> </div></div> </div> <script type="text/javascript"> //Crel+Enter $(document).keypress(function(e){ if(e.ctrlKey && e.which == 13 || e.which == 10) { $(".submit").click(); document.body.focus(); } else if (e.shiftKey && e.which==13 || e.which == 10) { $(".submit").click(); } }) </script> </form> </div> <div class="excerpt_bot"></div> </div> </div> <div id="sidebar"> <!--日志分类--> <div class="sidebar_body"> <div class="sidebar_b_top"><!--样式头部--></div> <div class="sidebar_b_main"> <div class="sid_ify"> <div class="sid_ify_bg"> <H3>文章分类</H3> </div> </div> <div class="sid_body"> <ul class="sid_lm"> <li class="cat-item cat-item-121"><a href="https://vcoo.me/cat/free">免费资源</a> (6) </li> <li class="cat-item cat-item-40"><a href="https://vcoo.me/cat/essay">唠叨随写</a> (23) </li> <li class="cat-item cat-item-37"><a href="https://vcoo.me/cat/work">学习工作</a> (32) </li> <li class="cat-item cat-item-91"><a href="https://vcoo.me/cat/website">建站编程</a> (128) </li> <li class="cat-item cat-item-8"><a href="https://vcoo.me/cat/ent">影音娱乐</a> (126) </li> <li class="cat-item cat-item-132"><a href="https://vcoo.me/cat/photo">摄影相片</a> (38) </li> <li class="cat-item cat-item-5"><a href="https://vcoo.me/cat/article">文摘评论</a> (59) </li> <li class="cat-item cat-item-3"><a href="https://vcoo.me/cat/life">生活心情</a> (823) </li> <li class="cat-item cat-item-4"><a href="https://vcoo.me/cat/computer">电脑技术</a> (216) </li> <li class="cat-item cat-item-223"><a href="https://vcoo.me/cat/webmaster">站长日志</a> (97) </li> <li class="cat-item cat-item-175"><a href="https://vcoo.me/cat/design">素材设计</a> (20) </li> <li class="cat-item cat-item-10"><a href="https://vcoo.me/cat/news">网络资讯</a> (119) </li> <li class="cat-item cat-item-44"><a href="https://vcoo.me/cat/soft">软件源码</a> (81) </li> </ul> </div> </div> <div class="sidebar_b_bot"><!--样式尾部--></div> </div> <!--博客归档OR最新文章OR随机日志--> <div class="sidebar_body"> <div class="sidebar_b_top"><!--样式头部--></div> <div class="sidebar_b_main"> <div class="sid_ify"> <div class="sid_ify_bg"> <H3>最新文章</H3> </div> </div> <div class="sid_body"> <ul class="sid_Archives sid_link_text"> <li><a href="https://vcoo.me/show/2276.html" title="查看《改用 Directory Lister 搭建了微酷下载网站》">改用 Directory Lister 搭建了微酷下载网站</a></li><li><a href="https://vcoo.me/show/2271.html" title="查看《2018.5.20》">2018.5.20</a></li><li><a href="https://vcoo.me/show/2269.html" title="查看《恢复运动》">恢复运动</a></li><li><a href="https://vcoo.me/show/2261.html" title="查看《终于下决心将扁桃体切除了》">终于下决心将扁桃体切除了</a></li><li><a href="https://vcoo.me/show/2252.html" title="查看《今天心情不佳》">今天心情不佳</a></li><li><a href="https://vcoo.me/show/2240.html" title="查看《被暴雨困在路上》">被暴雨困在路上</a></li><li><a href="https://vcoo.me/show/2236.html" title="查看《关于最近的生活和工作》">关于最近的生活和工作</a></li><li><a href="https://vcoo.me/show/2231.html" title="查看《梦到又回到学校上学》">梦到又回到学校上学</a></li><li><a href="https://vcoo.me/show/2217.html" title="查看《科目四完美通关,驾照到手》">科目四完美通关,驾照到手</a></li><li><a href="https://vcoo.me/show/2211.html" title="查看《科目三顺利通关》">科目三顺利通关</a></li> </ul> </div> </div> <div class="sidebar_b_bot"><!--样式尾部--></div> </div> <!--最新留言--> <div class="sidebar_body"> <div class="sidebar_b_top"><!--样式头部--></div> <div class="sidebar_b_main"> <div class="sid_ify"> <div class="sid_ify_bg"> <H3>最新评论</H3> </div> </div> <div class="sid_body"> <ul class="sid_recent"> </ul> </div> </div> <div class="sidebar_b_bot"><!--样式尾部--></div> </div> <!--控制面板--> <div class="sidebar_body"> <div class="sidebar_b_top"><!--样式头部--></div> <div class="sidebar_b_main"> <div class="sid_ify"> <div class="sid_ify_bg"> <H3>控制面板</H3> </div> </div> <div class="sid_body"> <ul class="sid_Archives sid_link_text"> <li><a href="https://vcoo.me/wp-login.php">登录</a></li> </ul> </div> </div> <div class="sidebar_b_bot"><!--样式尾部--></div> </div> </div> <div class="clear"></div> </div> <!--中间内容End--> <!--尾部--> <div id="footer"> <div id="footerbar"> <p><span>微酷博客 Copyright © 2005-2012 www.vcoo.me All Rights Reserved.</span></p> <p><span><script language="javascript" type="text/javascript" src="https://js.users.51.la/1641054.js"></script></span><span>|</span><span><a href="http://www.vcoo.cc">微酷网络</a><span><span>|</span><span><a href="http://www.zibo.la" title="淄川信息港" target="_blank">淄川信息港</a><span><span>|</span><span><a href="/links/">友情链接</a><span><span>|</span><span><a href="/about-vcoo/">关于微酷</a></span><span>|</span><span>Powered by <a href="http://wordpress.org/" rel="external">WordPress</a></span><span>|</span><span>Theme Designed by <a href="http://blog.mruu.cn/" target="_blank">MinRui</a></span></p><script type='text/javascript' src='https://vcoo.me/wp-includes/js/comment-reply.min.js?ver=5.8.2' id='comment-reply-js'></script> <script type='text/javascript' src='https://vcoo.me/wp-includes/js/wp-embed.min.js?ver=5.8.2' id='wp-embed-js'></script> <script type="text/javascript" id="slb_context">/* <![CDATA[ */if ( !!window.jQuery ) {(function($){$(document).ready(function(){if ( !!window.SLB ) { {$.extend(SLB, {"context":["public","user_guest"]});} }})})(jQuery);}/* ]]> */</script> </div> </div> <!--尾部End--> <!-- QQ分享 Start <script language="javascript" type="text/javascript" src="https://www.vcoo.cc/web/static/js/QQShare.js"></script> QQ分享 End --> </div> <!-- BlogPet --> <div id="spig" class="spig"> <div id="message">加载中……</div> <div id="mumu" class="mumu"></div> <div > <!-- BlogPet End --> </body> </html>