Find the answer to your Linux question:
Results 1 to 2 of 2
Hello! My site was recently hacked and a line of <JAVASCRIPT> was inserted into all my php files. Is there a way to pull just that one line out of ...
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    1

    Remove a particular line of text from all php files

    Hello!
    My site was recently hacked and a line of <JAVASCRIPT> was inserted into all my php files. Is there a way to pull just that one line out of all the php files on the server? I was thinking of using a
    grep -iR <CODE> *.php then piping thru sed

    Can't quite figure it out. Any help would be greatly appreciated!

    Thanks!
    Dave Meas

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,100
    Sorry, but imho your problem goes deeper than that.
    1) Create an image of that server for possible forensic and legal actions
    2) Identify, how the server was compromised
    3) Install it from scratch
    4) Re-configure it, taking 2) into account
    5) Restore from last known good backup

    Luckily, the sed action will no longer be neccessary then
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...