首页 > 系统服务 > 详细

linux 目录下文件批量植入和删除

时间:2016-12-18 23:33:06      阅读:250      评论:0      收藏:0      [点我收藏+]

linux目录下文件批量植入

[root@greymouster http2]# find /usr/local/http2/htdocs/ -type f|xargs sed -i "1  i <script>alert(1)</script>"

其中上面的1 为文件的第一行 i为植入

批量删除:

[root@greymouster ~]# find /usr/local/http2/htdocs/ -type f|xargs sed -i ‘/<script>alert(1)<\/script>/d‘

 批量替换

[root@greymouster ~]# find /usr/local/http2/htdocs/ -type f|xargs sed -i ‘s#<script>alert(1)</script>#1111#g

linux 目录下文件批量植入和删除

原文:http://www.cnblogs.com/chenchenphp/p/6195880.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!