The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #14 (permalink)  
Old 06-05-2009
Nejc Nejc is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 5
OK. Obviously this script doesn't do, what I would like, since it purged all my files. No harm done anyway, I did it on purpose on a testing website which was also spamed.

Before I ran the script, I also tested only with sed using this code:

Code:
sed "s:<?php echo '<script language='JavaScript'>function e590206b977().*<\/script>'; ?>::" index.php > index.temp
Now, this sed command is the only command in this script which I don't know what exactly does it do. I looked a little through "man sed" but I didn't understand much. I now cmp compares the files, and if they are the same the file index.temp gets removed, if not, the file index.temp becomes index.php. right? What about sed?

I can say, that the above command of sed, just copies the file index.php to index.temp. Nothing else.

Thanks