Remove repeated malicious script using shell script

We can use below code to remove repeated malicious scripts #!/bin/bash pattern_1=”<FilesMatch \”.(py|exe|php)$\”>” pattern_2=”[ ]*Order allow\,deny\n” pattern_3=”[ ]*Deny from all\n” pattern_4=”[ ]*<\/FilesMatch>\n” pattern_5=”[ ]*<FilesMatch \”\^(about.php|radio.php|index.php|content.php|lock360.php)$\”>\n” pattern_6=”[ ]*Order allow\,deny\n” pattern_7=”[ ]*Allow from all\n” pattern_8=”[ ]*<\/FilesMatch>\n” complete_pattern=”$pattern_1\n$pattern_2$pattern_3$pattern_4$pattern_5$pattern_6$pattern_7$pattern_8″ replacement_1=”” replacement_2=”” replacement_3=”” replacement_4=”” replacement_5=”” replacement_6=”” replacement_7=”” replacement_8=”” complete_replacement=”$replacement_1$replacement_2$replacement_3$replacement_4$replacement_5$replacement_6$replacement_7$replacement_8″ filename=”.htaccess” echo “” echo “Replacing the lines..” sed -i “/$pattern_1/{  ...

Share
Android

Meet the OS that’s optimised for how you use your phone. Helping you to manage conversations. And organising your day. With even more tools and privacy controls that put you in charge.

Share
Shopify

Shopify is a commerce platform that allows anyone to set up an online store and sell their products. Merchants can also sell their products in person with Shopify POS.

Share
Magento

Adobe Experience Cloud brings together all of your marketing tech in a single place, so you can do everything from managing your content and delivering email campaigns to automating your ad buying and measuring your success. One integrated approach for one seamless experience.

Share