DirectoryIterator and Hacked Website


Posted on 16th Feb 2014 07:03 pm by admin

Hi Everyone.

My problem:
Some one has been sneaking in to my website hidden Iframes. I've changed passwords & reset permissions to read, but then the permissions get changed to include write and they inject the IFRAMES. I go through this process daily and am tired of it.

The challenge:
To write a script that scans the files for permission changes and email me the results.

The solution:
This is what I have so far:

$it = new RecursiveDirectoryIterator("/home/content/e/n/v/<website name>/html/");
foreach(new RecursiveIteratorIterator($it) as $file) {
echo $file . "n"; echo date ("F d Y H:i:s.", filemtime($file)); echo substr(sprintf('%o', fileperms($file)), -4);
echo "<br/>";
}


I know the ultimate challenge is to secure the website, but until I can figure out how I need a mechanism to
help me cope.

Thanks

No comments posted yet

Your Answer:

Login to answer
155 Like 19 Dislike
Previous forums Next forums
Other forums

Windows Authentication
I have a website which is windows authenticated.
now i want something more on this application.<

PayPal Redirect Issue
When I have my paypal button set so that is redirects to http://empiremarketing.ca/order.php,it work

IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with

xml element exists
Code: [Select]<?xml version="1.0"?>
<Addresses>
<

Something like an INI editor or a DelimitedText-Editor
Hi all,

Am very, very, very new to PHP and not sure if I should be posting this to a Javascri

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Standard DES encryption script?
Can anybody point me to a tutorial or a short script that shows how to encrypt some text with salt i

Not connecting to DB using ruby, error:env.c:257:in oci8lib.so: ORA-12154:
Hi All,

I am trying to connect to the database server from the client server using ruby and f

Calling strings from other php class
I have test1.php{
$string1;
$string2;
....
... //10 strings in this class <

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash