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

  • Home
  • SEARCH
  • 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 7607699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:43:49+00:00 2026-05-31T00:43:49+00:00

My site is getting hacked. It add some script on my file at the

  • 0

My site is getting hacked. It add some script on my file at the first line of all my php file. I want to get remove that script using Netbeans search and replace with REGEX options.

It seems the hack script has same pattern on it

<?php /**/ eval(base64_decode("[SomeRandomString]"])); ?>

Can you please give me REGEX pattern to remove the string above?

Here is the example of my hacked full script http://ideone.com/6ltMf

  • 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-05-31T00:43:50+00:00Added an answer on May 31, 2026 at 12:43 am

    Something like this matches your short example and the one you pasted:

    $pattern = '~^\<\?php\s?\/\*\*\/\seval\(base64\_decode\(\".*?\)\)\;\s?\?\>~'
    // You might need to incorporate the multi-line option at the end of the pattern
    

    Hindsight is 20/20: In the future you should consider using a versioning system to quickly reset all the altered files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A friend is asking about their ASP.NET site that has been getting hacked. It's
I gave a site full trust however I am still getting some security exceptions.
im currently getting these error on my site: Warning: array_keys() [function.array-keys]: The first argument
Just moved a site over to a new server and we started getting some
I have the site www.mytest.com (in php) I'm getting the site, when i request
I'm having an issue with getting a site set up in the web.config file
Looking for some help in regards to getting my site to understand a link
my site is hosted in lunarpage and it geting hacked in from few month.
I'm getting started building a site with Rails and I would like people to
am getting this error when i open my site in internet explorer......... plz help

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.