Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SiteMonitor


Jack_mcs

Recommended Posts

Jack, does Site Monitor support regex or wild cards in the list of directories not to monitor?

No, there's not anything in the code for that to work. I'm not sure how it could be a benefit though. Can you explain a situation where it could be used so I can understand the reason better?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

No, there's not anything in the code for that to work. I'm not sure how it could be a benefit though. Can you explain a situation where it could be used so I can understand the reason better?

Sure, phpThumb has a cache directory that has dynamically created sub-directories. Many, many of them.

 

If regex or wildcards do not work perhaps I could move the phpThumb cache directory outside of the catalog directory.

Edited by mdtaylorlrim

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Do you mean this?:

 

/* function microtime_float() //just used for testing{ list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);} */

 

Take that out of the sitemonitor_functions.php?

 

Sorry Jack, do you mean this?

Link to comment
Share on other sites

Sure, phpThumb has a cache directory that has dynamically created sub-directories. Many, many of them.

 

If regex or wildcards do not work perhaps I could move the phpThumb cache directory outside of the catalog directory.

If you are wanting to exclude those directories from monitoring, just enter the main directory, phpThumb, and all of the sub-directories will be skipped. If you want to exclude only certain ones, you can enter the names, even if they don't exist, providing you know what the names will be. But other than that, I can't think of how else to limit certain ones, as the code is now.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Yes.

 

Right that eventually got the configure page to work, but on the admin page I am getting a few errors when I press the update buttons. Here is what I am getting:

 

Delete Reference File

Execute Sitemonitor

Manually Execute Sitemonitor

 

Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: No such file or directory in mysite.com/admin/includes/functions/sitemonitor_functions.php on line 162

 

Warning: readdir(): supplied argument is not a valid Directory resource in mysite.com/admin/includes/functions/sitemonitor_functions.php on line 164

Reference file creation failed.

 

The Manually Check for Hacked Files (of which it has found 10!) seems to be working fine.

Link to comment
Share on other sites

No, there's not anything in the code for that to work. I'm not sure how it could be a benefit though. Can you explain a situation where it could be used so I can understand the reason better?

 

 

Sure, phpThumb has a cache directory that has dynamically created sub-directories. Many, many of them.

 

If regex or wildcards do not work perhaps I could move the phpThumb cache directory outside of the catalog directory.

Actually, it will not add sub-directories to the list. When you select a sub-directory the page refreshes but the sub-directory is not added to the list. It is like it was *meant* to effectively exclude all directories in the path, but it does not.

 

I'm gonna try and add a few of the sub directories by hand and see if they are excluded. I'm sure they are, but adding the dozens of sub-directories is going to be tedious...

Edited by mdtaylorlrim

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Warning: opendir(/home/username/public_html) [function.opendir]:

Is the username of your account username? If not, please try changing the settings to match your site.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Actually, it will not add sub-directories to the list. When you select a sub-directory the page refreshes but the sub-directory is not added to the list. It is like it was *meant* to effectively exclude all directories in the path, but it does not.

It won't let you add a sub-directory if one of its parents is already in the list, though you should get a warning about that. Otherwise, there shouldn't be an issue with adding sub-directories.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

It won't let you add a sub-directory if one of its parents is already in the list, though you should get a warning about that. Otherwise, there shouldn't be an issue with adding sub-directories.

Then I do not understand... why not?

 

If having a parent directory does not also exclude sub-directories why should it not allow you to add it to the list? I need to sub-directories excluded as well, and it does not. Or else I have something set wrong. When I asked above about wild cards and regex it was because the parent directory is included in the list, but the sub-directories are not excluded from monitoring, and I need them to be.

 

Are we on the same page yet? What did I not understand?

 

 

Back to what my original question should have been. If I have a directory excluded, and all sub-directories also excluded by default?

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

That's the way it is supposed to work. I haven't tested it in a while but that's how it always has worked for me. If you exclude some directory, any sub-directory located within it will also be excluded. Maybe it doesn't work that way with the phpThmb directory due to the directories being generated on the fly. Although that really shouldn't come into play as long as the parent is listed. You might want to try setup up some test directory with a few products and sub-directories. Then exclude the parent and make a change to one of the files. If it catches it, then something is not right.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

That's the way it is supposed to work. I haven't tested it in a while but that's how it always has worked for me. If you exclude some directory, any sub-directory located within it will also be excluded. Maybe it doesn't work that way with the phpThmb directory due to the directories being generated on the fly. Although that really shouldn't come into play as long as the parent is listed. You might want to try setup up some test directory with a few products and sub-directories. Then exclude the parent and make a change to one of the files. If it catches it, then something is not right.

Will do. Let you know tomorrow.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Is the username of your account username? If not, please try changing the settings to match your site.

 

Ah I see. It had my details for FTP in it, but I don;t know why it said username instead. All is working now! :)

 

I have got these potential hacked files:

 

admin/includes/classes/nusoap.php

admin/includes/javascript/tiny_mce/plugins/paste/js/pasteword.js

admin/includes/javascript/tiny_mce/plugins/template/template.htm

admin/includes/javascript/tiny_mce/themes/advanced/js/about.js

admin/tiny_mce/plugins/paste/js/pasteword.js

admin/tiny_mce/plugins/template/template.htm

admin/tiny_mce/themes/advanced/js/about.js

includes/classes/nusoap.php

includes/classes/seo.class.php

includes/modules/payment/paypal_standard.php

 

What do I do about it once it has found them. I've never heard of the nusoap.php before?

Link to comment
Share on other sites

Ah I see. It had my details for FTP in it, but I don;t know why it said username instead. All is working now! :)

 

I have got these potential hacked files:

Read the thread or note in the admin section of Sitemonitor regarding this.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

That's the way it is supposed to work. I haven't tested it in a while but that's how it always has worked for me. If you exclude some directory, any sub-directory located within it will also be excluded. Maybe it doesn't work that way with the phpThmb directory due to the directories being generated on the fly. Although that really shouldn't come into play as long as the parent is listed. You might want to try setup up some test directory with a few products and sub-directories. Then exclude the parent and make a change to one of the files. If it catches it, then something is not right.

I think you are on to something here Jack. Creating directories and files by hand allows Site Monitor to work the way you intended. If a parent directory is selected, it also includes sub directories.

 

However, using phpThumb (or is it oscThumb? whichever..) although the parent directory, phpThumb/cache is selected I get reports daily of thousands of image files that are added, changed, or deleted, all in the phpThumb/cache directory or one of it's sub directories. It must have something to do with dynamically created files...more importantly, directories.

 

In my tests it DID NOT throw an error for a new directory. It only threw an error for files. Maybe there is a connection?

 

 

I tried to move the phpThumb/cache directory out of the catalog files space but apparently the path is hard coded in the scripts. I'll have to find the code and change it in order to go that route.

 

Anything you can do to solve this in Site Monitor will be appreciated.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

I'll test it when I get the chance. But in the meantime, you might want to verify your sitemonitor_config.php file has that directory listed, like

$excludeList = array("...,"phpThumb",...

Other than that, I can't think of anything else.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I'll test it when I get the chance. But in the meantime, you might want to verify your sitemonitor_config.php file has that directory listed, like

$excludeList = array("...,"phpThumb",...

Other than that, I can't think of anything else.

Yep, it's there, although "phpThumb/cache"

 

Thanks for looking.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

I'll test it when I get the chance. But in the meantime, you might want to verify your sitemonitor_config.php file has that directory listed, like

$excludeList = array("...,"phpThumb",...

Other than that, I can't think of anything else.

The problem I think is that the reference file is built with a recursive model, adding all of the directories and files beneath the parent directory instead of the logic during the scan using a recursive methodology to exclude the sub-directories.

 

This is a good thing should a hacker get in an is able to create a new directory under an excluded directory.

 

To not break a perfectly good contribution I think I will look at moving the oscThumb cache out of the catalog files space.

 

 

Do you agree with this, Jack?

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

  • 2 weeks later...

Hi Jack,

 

Could you tell me if there are settings saved to the database ? I moved a site from one host to the other and site monitor HATES that I did that. So, I deleted the log file but that didn't work, so I uninstalled everything and then reinstalled it from a fresh copy. BUT, the original errors are still there making me thing the configuration is saved in a database table somewhere.

 

These are the errors when I enter the config for sitemonitor:

 

Warning: opendir( /home/content/h/o/l/xxxxxxxx/html/) [function.opendir]: failed to open dir: No such file or directory in /home/content/h/o/l/xxxxxxxxxx/html/admin/includes/functions/sitemonitor_functions.php on line 232

 

Warning: readdir(): supplied argument is not a valid Directory resource in /home/content/h/o/l/xxxxxxxxxxxx/html/admin/includes/functions/sitemonitor_functions.php on line 234

 

Warning: closedir(): supplied argument is not a valid Directory resource in /home/content/h/o/l/xxxxxxxxxxxx/html/admin/includes/functions/sitemonitor_functions.php on line 246

 

 

Thanks

 

Chris

Link to comment
Share on other sites

No, SiteMonitor doesn't use the database at all. It is probably because the configure settings weren't changed. Is teh correct path to your site /home/content/h/o/l/xxxxxxxx/html/?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack,

 

Yes, that is the correct path (minus the xxxxx which reflect the actual folder). Site Monitor was working flawlessly on the previous host, but it does not want to reconfigure for the new host.

 

Do you have any suggestions ?

 

 

 

Chris

Link to comment
Share on other sites

The error is saying the path is incorrect. If you are sure that it is, then there must be something on the server preventing it from being recognized. I suggest you show the error to your host and ask that they look at it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Is it possible for you to amend your original post with frequently asked questions?

 

It seems a number of issues are discussed over and over throughout this thread. Just a suggestion as other than the installation, I see no clear instructions on how exactly to use this contribution.

 

Once I have this installed, I will just press the bottom button in admin>sitemonitor>admin, it tells me of suspected hacked files and I go open them to verify if its actually hacked if it has code similar to one's hacker use, right? Is this understanding correct?

Edited by sarafina

Contributions installed: Purchase without Account / STS/ All Products/ Header Tags Controller

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...