linux script or command line to clean hacked files

IN PROGRESS
Bids
10
Avg Bid (USD)
$35
Project Budget (USD)
$30 - $30

Project Description:
I have a server what was hacked due to a breach when I was reinstalling mod-security and firewall.
All .htaccess files were filled with a spammer code injected.
In attachment you will see an example of one of the .htaccess file injected.
Note that have good lines with correct codes, these can´t be deleted. The inected lines is in the middle of the file, after a lot of blank lines.

I need a script or command line to search all .htaccess in /home/users folders and clean the injected code of each .htaccess file.

It´s important do first a backup of each .htacces file in /home/bkp_htaccess_injected folder, and preserv any other commands what is not the the injected code.

I prefer a command line.

4 actions must be taken:

1) copy the .htaccess to /home/bkp_htaccess_injected
2) The injected code starts after a lot of blank lines, with "" and ends with "". Inside this tags are many lines with different words in the middle. Just delete all text in the middle of these two tags.
3) Also have a commented line after "" with a hash number, what I want to be deleted too.
4) Finally, delete "" tags and blank lines.

Access to the server is impossible, only us. You can use the attachment to produce the command and send to me, I will use in my server. If the code not work i will call back to you to repair the command and try again until code works.

I use CENTOS 6.3 x86_64

Fast job please.

Cheap and fast will get the work.

Regards.

Skills required:
Apache, Linux, Perl, System Admin, UNIX
Additional Files: htaccess.zip
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


Hire osmanbsd
$ 40
in 1 days
$ 50
in 2 days
$ 30
in 1 days
$ 50
in 0 days
$ 30
in 0 days
$ 30
in 1 days
$ 30
in 3 days
$ 30
in 0 days
$ 30
in 3 days
Hire XBobJacobX
$ 30
in 1 days