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
原文:http://www.cnblogs.com/chenchenphp/p/6195880.html