Re: need a carwler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You're probably going to be best off with a download, find/replace,  
upload approach. It would free you up for other projects while that  
process runs. Even better, why not just upload the files that you  
have locally? If they're the same files, it will save you even more  
time.

However, if you're set on doing it this way, you basically need to:
1. Set permissions to read/write for *all* files.
2. Loop through your directory structure with readir() and opendir()  
- see http://www.php.net/readdir
3. With each loop iteration you'll need to fopen, fread, do a  
str_replace, fwrite, and fclose

Seems like more trouble to me, but if that's the route for you then  
have at it.
--
Joe

On Jan 13, 2009, at 2:51 PM, Farhan khalid wrote:

> Thanks for your reply
>
> I am not using any ide/program because there are hundreds of files  
> and i
> cant download them from each clients ftp and replace code
> every client has many folders in their ftp with php or html files  
> if i start
> downloading them all it will take a really long time
>
> so thats why i am looking for a php script that can read files in  
> folders,
> edit them and remove this code.
>
> yes i have already changed password thanks for the suggestion.
>
> On Wed, Jan 14, 2009 at 1:20 AM, Joe Forsythe
> <jforsythe@xxxxxxxxxxxxxxxxxx>wrote:
>
> > This will typically be a function in whatever program/IDE you're
> > using to handle the site/code. For example, in Dreamweaver you would
> > hit CTRL+F (Command+F on Macs) and set the results to be for "Entire
> > Site".
> >
> > If you don't use anything like that (i.e. you only use a text
> > editor), I might suggest downloading a free trial of one of the pay
> > tools or find a decent OSS version. I don't personally use Eclipse,
> > but it is pretty popular and I'd bet it offers that ability.
> >
> > At the root of it all, though, I'd make a broad suggestion that you
> > change *ALL* user names and passwords for your sites.
> > --
> > Joe
> >
> >
> > On Jan 13, 2009, at 1:58 PM, Farhan khalid wrote:
> >
> > > Hi,
> > >
> > > Alot of my sites and clients sites were somehow hacked and  
> injected
> > > with
> > > some encrypted code that redirects users to porn site and  
> downloads
> > > virus on
> > > the system
> > >
> > > i am attaching the code sample if somebody wants to check.This  
> code
> > > is at
> > > the end of each php, html and asp files now i have to clean
> > > hundreds of
> > > files and remove this code
> > >
> > > can anyone tell me about some crawler script that can read every
> > > file in all
> > > folders and subfolders and find this code remove it automatically
> > > as i need
> > > to urgently fix this issue and downloading all files manually
> > > removing code
> > > will take really long time
> > >
> > > Regards
> > > Farhan
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>
> 



[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux