Client's PHP site hacked, no back up other than a scraped version HEEELPP for ideas

16 replies
Warrior coders,

To make a long story short, one of my clients has a site that was written in php , someone hacked the web server and the original webmaster refuses to provide the original php files.

The only thing that is available it a scraped version that one of her friends made when they were making changes to graphics etc. (Page Nest was the tool)

All I have are the html scraped files and wonder what the best was is to convert it back to php ??

Yeah its a bad scrape it appears like there are 20+ different contact pages 20+ form pages (yes they are basically the same form, I am guessing they have different pass through info, at a glance they appear to be the same.

Any help or suggestions or guesses of how to find someone to do it or a guess to the costs would be very much appreciated.

Mark Riddle
#back #client #hacked #heeelpp #ideas #php #scraped #site #version
  • Profile picture of the author JonMills
    Open the html pages in macromedia and save as php

    As for collecting more pages and content if you need it from that site, screw the webmaster.. use waybackmachine Internet Archive: Wayback Machine that stores copies of pages, as long as they have been online for 6 months
    Signature
    http://www.thecopywriterwhisperer.com/ Persuasion at it's best!
    http://www.affiliateorganizer.com/ Organize your entire online business - Super affiliates give it the thumbs up!
    {{ DiscussionBoard.errors[2251475].message }}
  • Profile picture of the author CoderPundit
    Is this a dynamic page or a normal static content page?
    {{ DiscussionBoard.errors[2251568].message }}
  • Profile picture of the author KirkMcD
    Did you ask the host if they have backups?
    {{ DiscussionBoard.errors[2251696].message }}
    • Profile picture of the author Mark Riddle
      Answers below

      Originally Posted by JonMills View Post

      Open the html pages in macromedia and save as php As for collecting more pages and content if you need it from that site, screw the webmaster.. use waybackmachine Internet Archive: Wayback Machine that stores copies of pages, as long as they have been online for 6 months
      Jon,

      That's a great suggestion, I hadn't thought to check the wayback machine to see if there was a more current version than the scraped version that I have!

      Originally Posted by CoderPundit View Post

      Is this a dynamic page or a normal static content page?
      It was dynamic in the sense that it appears that the page was set up with header footer and menu sections. Also there was contact forms that appear to have originally passed through the type of information that was being requested in addition to the email etc. as it was entered and then emailed to the owner.

      Originally Posted by KirkMcD View Post

      Did you ask the host if they have backups?
      This is actually the worst part of the story that I left out... The host DELETED All the files on the account because the site was hacked (with no explanation of why they thought the site was the source, or at least the pathway to the hacking.

      Thanks for everyone's input !

      Mark Riddle
      Signature
      Today isn't Yesterday, - Products are everywhere if your eyes are Tuned!
      {{ DiscussionBoard.errors[2251787].message }}
      • Profile picture of the author MatthewDunbar
        Originally Posted by Mark Riddle View Post

        This is actually the worst part of the story that I left out... The host DELETED All the files on the account because the site was hacked (with no explanation of why they thought the site was the source, or at least the pathway to the hacking.
        Least they could've done is sent you a tarball or zip of the account. Please let us know who so we can avoid them, and get your own host. Also, keep offsite backups. Be it personal PCs and the server having a copy, or the server and another service (I do incremental weekly backups to amazon S3 and store them for 3 months, it is a bit expensive, but well worth it). Amazon S3's export program also means that I can request the data on a hard drive and have it shipped to me (next morning) if anything goes wrong, minimizing the weeks it could take me to download over 500GB in data.
        {{ DiscussionBoard.errors[2253401].message }}
        • Profile picture of the author mojojuju
          This has saved my ass before About Warrick
          Signature

          :)

          {{ DiscussionBoard.errors[2253763].message }}
          • Profile picture of the author Mark Riddle
            Matthew, was totally unaware of the export program, that sound like a great idea, It would have been very helpful.

            The hosting company was a local mom and pop shop in southern calif, so I don't think anyone here is using them not to mention they were $49 per MONTH for a 100 meg account!

            Originally Posted by MatthewDunbar View Post

            Amazon S3's export program also means that I can request the data on a hard drive and have it shipped to me (next morning) if anything goes wrong, minimizing the weeks it could take me to download over 500GB in data.
            Mojojuju, THANKS That's a great resource !

            Hopefully I'll never need it

            Mark Riddle

            Originally Posted by mojojuju View Post

            This has saved my ass before About Warrick
            Signature
            Today isn't Yesterday, - Products are everywhere if your eyes are Tuned!
            {{ DiscussionBoard.errors[2256747].message }}
  • Profile picture of the author j33h4d
    Hello Mark,
    I ever faced the same problem... any web hosting company will always do backup on files stored in their server. What you need to do is... contact the company via email and ask them to restore those backup files. your client will get whatever he lost.

    Originally Posted by Mark Riddle View Post

    Warrior coders,

    To make a long story short, one of my clients has a site that was written in php , someone hacked the web server and the original webmaster refuses to provide the original php files.

    The only thing that is available it a scraped version that one of her friends made when they were making changes to graphics etc. (Page Nest was the tool)

    All I have are the html scraped files and wonder what the best was is to convert it back to php ??

    Yeah its a bad scrape it appears like there are 20+ different contact pages 20+ form pages (yes they are basically the same form, I am guessing they have different pass through info, at a glance they appear to be the same.

    Any help or suggestions or guesses of how to find someone to do it or a guess to the costs would be very much appreciated.

    Mark Riddle
    {{ DiscussionBoard.errors[2259182].message }}
  • Profile picture of the author edynas
    Banned
    If it's a matter of header, footer and sidebar idea and not a total database backend etcetc I would recreate those and delete those parts from the scrapped pages and made the include again to be able to change the template later on.

    Notepad++ -> remove/replace in files after you identified and created the template files again.

    Edwin
    {{ DiscussionBoard.errors[2259194].message }}
  • Profile picture of the author weengle
    Originally Posted by Mark Riddle View Post

    Warrior coders,

    To make a long story short, one of my clients has a site that was written in php , someone hacked the web server and the original webmaster refuses to provide the original php files.
    The only thing that is available it a scraped version that one of her friends made when they were making changes to graphics etc. (Page Nest was the tool)
    All I have are the html scraped files and wonder what the best was is to convert it back to php ??
    Yeah its a bad scrape it appears like there are 20+ different contact pages 20+ form pages (yes they are basically the same form, I am guessing they have different pass through info, at a glance they appear to be the same.
    Any help or suggestions or guesses of how to find someone to do it or a guess to the costs would be very much appreciated.
    Mark Riddle
    Hi Mark If possible please provide me the site link after watching the live site I can provide you few suggestion and no need to worry I am sure you will get rid from this problem very soon. Last time One of my client had faced similar type of problem, his hostgator server had hacked by a Saudi Arabia hacker group called Sarabot and he lost all his blogs and he didn't have the backup copy of his 50 blogs and his old programmer didn't help him so last time I had helped him. So please provide me the hacked site link.
    Thanks.
    {{ DiscussionBoard.errors[2259309].message }}
    • Profile picture of the author Mark Riddle
      J33h4d,

      Yes I agree that is normal, but this company didn't have any.

      When I took over the site first thing done was change hosts.

      Originally Posted by j33h4d View Post

      Hello Mark,
      What you need to do is... contact the company via email and ask them to restore those backup files. your client will get whatever he lost.
      Edwin,

      Yes that's what it appears to be the best solution, a little bit of hassle today but long term not all that bad. notepad++ is a great suggestion! Thanks

      Originally Posted by edynas View Post

      If it's a matter of header, footer and sidebar idea and not a total database backend etcetc I would recreate those and delete those parts from the scrapped pages and made the include again to be able to change the template later on.

      Notepad++ -> remove/replace in files after you identified and created the template files again.

      Edwin
      Maxdesigningstudio,

      Its been moved off of the original host with the problem, now the site is TONS of html pages.

      Originally Posted by maxdesigningstudio View Post

      Hi Mark If possible please provide me the site link after watching the live site I can provide you few suggestion and no need to worry I am sure you will get rid from this problem very soon.
      Signature
      Today isn't Yesterday, - Products are everywhere if your eyes are Tuned!
      {{ DiscussionBoard.errors[2259788].message }}
      • Profile picture of the author j33h4d
        there is another way you can use... simply go to Google.com... try to make a really specific search on the website... then, Google will come out with hundred of results... try to look at one of those results... if you realize, you'll see there is a text navigation written as 'Cached'. Click on that...

        by using this method, you'll get back those lost data in HTML... however, you can't use this to get back those PHP files.
        {{ DiscussionBoard.errors[2259996].message }}
      • Profile picture of the author KathyK
        Originally Posted by Mark Riddle View Post

        J33h4d,

        Yes I agree that is normal, but this company didn't have any.

        When I took over the site first thing done was change hosts.
        If it was a Mom & Pop, they were probably renting a dedicated server. It's REMOTELY possible that you could find THEIR host (domain name lookup) and talk those people into extracting your client from the server backups that almost all do.

        Not very likely - and they might want cash - but if you are looking at a week's work - it might be worth it to at least ask.
        Signature

        Cheers,
        Kathy

        {{ DiscussionBoard.errors[2272243].message }}
  • Profile picture of the author wsylvester
    if you search google with the "site:<sitename>" depending on the number of pages you should get googles recent index of the site. It's painful but you can view each of the cached pages. Let this be a reminder for all of us to always keep backups of your source files.
    {{ DiscussionBoard.errors[2272083].message }}
  • Profile picture of the author Rembo
    There is NO way you can recreate php files from html (read: parsed) files. php is a scripting language and the whole point of using it is because it can dynamically create customized html pages.

    Most ISPs will create a backup before deleting. It is common sense and also common courtesy. They *must* also have some backups for the situations that their servers have a failure. It *can't* be that in such cases their clients data would be destroyed.

    As for the infected PHP files, I created an Excel application Grep & Replace that can assist you in removing the infections from the PHP files. I have a newer version than posted online but I haven't completely finished it yet. I want to make a few more enhancements before I put it online but the version posted can surely help you.

    Good luck,

    Rembo
    Signature
    Smarter Affiliate Money. Work Smarter, Earn More.
    {{ DiscussionBoard.errors[2274635].message }}
  • Profile picture of the author Mark Riddle
    Thanks Folks

    The site is back up and going ~!

    Mark Riddle
    Signature
    Today isn't Yesterday, - Products are everywhere if your eyes are Tuned!
    {{ DiscussionBoard.errors[2283943].message }}

Trending Topics