linux目录下文件批量植入
[[email protected] http2]# find /usr/local/http2/htdocs/ -type f|xargs sed -i "1 i <script>alert(1)</script>"
其中上面的1 为文件的第一行 i为植入
批量删除:
[[email protected] ~]# find /usr/local/http2/htdocs/ -type f|xargs sed -i ‘/<script>alert(1)<\/script>/d‘
批量替换
[[email protected] ~]# find /usr/local/http2/htdocs/ -type f|xargs sed -i ‘s#<script>alert(1)</script>#1111#g
时间: 2024-10-27 05:43:29