Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SiteMonitor


Jack_mcs

Recommended Posts

the htaccess I can see I have to download latest osc and take that copy of the file for the imaghes directory

 

 

I couldnt find it in the downloaded contribution files at all, think I have found it in sitemonitor_functions.php seen post.

 

struggling at the moment, how do I know when I have covered all my sites files?

Getting better with mods but no programmer am I.

Link to comment
Share on other sites

the htaccess I can see I have to download latest osc and take that copy of the file for the imaghes directory

 

 

I couldnt find it in the downloaded contribution files at all, think I have found it in sitemonitor_functions.php seen post.

 

struggling at the moment, how do I know when I have covered all my sites files?

 

got it sorted i think

Getting better with mods but no programmer am I.

Link to comment
Share on other sites

Ahh, I wasn't aware someone had uploaded a different version. Too bad that person chose to muddy the contribution waters. It happens all to often, unfortunately. This version is for both versions of oscommerce so the other will just tend to confuse people. Thanks for pointing that out since I'm sure it will come up again.

The other version does refer to previous versions and probably had it written somewhere and I missed it. So Sorry, my Bad. Although, opening up the catalog folder and seeing the choice is much better.

But as you mentioned, if someone has the same problem as I had, hopefully they can find this thread.

Link to comment
Share on other sites

What are the instructions for upgrading? I have v2.7 and want to upgrade to 2.9.

I'm not an expert at this but try copying the the V2.9 files over the old ones. Make sure the code to be inserted the other 3 files are the same in both versions too.

Link to comment
Share on other sites

What are the instructions for upgrading? I have v2.7 and want to upgrade to 2.9.

You could try using the update files included in the contribution.

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

A new version has been uploaded containing the following changes:

 

- Added an option to the configure settings to delete log files after a set number of days.

- Added a log reader.

- Changed filter code so sitemonitor files are ignored in a scan.

- Changed code that checks for possible hacker files in the images directory (suggested by user burt).

- Changed the setting that add error checking to false since too many sites were having problems with it.

- Corrected instructions for creatnig cron jobs (found by user csiemons).

- Declared a variable at the beginning of sitemonitor_admin.php to prevent a missing variable warning.

- Fixed coding mistake in sitemonitor_hacker_cron.php that prevented the reference file that was causing the array_flip error.

 

Hi Jack,

 

Thanks for the new version. I noticed the sitemonitor_hacker_cron job is sending the email report to the store owner's email address from the store configuration and not the email address in the sitemonitor_configuration file. My store owner has no clue about this report. Is there any fix for this to use the config file email address? I also wanted to point out the sitemonitor_hacker_excludes.txt is not used, it uses sitemonitor_hacker_excludes_0.txt

 

Thanks,

Chuck

Link to comment
Share on other sites

Hi Jack,

 

Thanks for the new version. I noticed the sitemonitor_hacker_cron job is sending the email report to the store owner's email address from the store configuration and not the email address in the sitemonitor_configuration file. My store owner has no clue about this report. Is there any fix for this to use the config file email address? I also wanted to point out the sitemonitor_hacker_excludes.txt is not used, it uses sitemonitor_hacker_excludes_0.txt

 

Thanks,

Chuck

I seem to recall someone else mentioning the email problem. I forgot to add that to the list of changes. I'll do that with the next version. But in the meantime, you can edit the hacker file. Change

mail($config['email_address'], $subject, $results, $configuration['store_name']);

to

mail('[email protected]', $subject, $results, $configuration['store_name']);

Thanks for mentioning the mistake with the file.

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 seem to recall someone else mentioning the email problem. I forgot to add that to the list of changes. I'll do that with the next version. But in the meantime, you can edit the hacker file. Change

mail($config['email_address'], $subject, $results, $configuration['store_name']);

to

mail('[email protected]', $subject, $results, $configuration['store_name']);

Thanks for mentioning the mistake with the file.

 

Thanks Jack. That worked. One minor change (at least for my host) is that the email address needed to be in double-quotes:

mail("[email protected]", $subject, $results, $configuration['store_name']);

Thanks again for all your help,

Chuck

Link to comment
Share on other sites

Hi Jack!

 

Great contrib. !!! You are the man!

 

But, whats wrong?

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/livpapc/public_html/loja/admin/sitemonitor_admin.php on line 66

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/livpapc/public_html/loja/admin/sitemonitor_admin.php on line 66

WARNING: The file_manager.php file in admin is a security risk. It should be deleted.

 

 

??

 

Sorry my english. I am brazilian!

 

God bless you!

Link to comment
Share on other sites

Hi Jack!

 

Great contrib. !!! You are the man!

 

But, whats wrong?

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/livpapc/public_html/loja/admin/sitemonitor_admin.php on line 66

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/livpapc/public_html/loja/admin/sitemonitor_admin.php on line 66

WARNING: The file_manager.php file in admin is a security risk. It should be deleted.

Try changing this line

  $invalidFiles = array_merge(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'),glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.txt'));

to

  $invalidFiles = array_merge((array)glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'),(array)glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.txt'));

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,

 

Great contrib from you. I use your other contribs from you as well.

 

I have set up sitemonitor, put cron jobs etc. all is fine.

 

I have a question:

if any file has system word it gets flagged as possible hacker code. Is it advisable to change the function a bit and check for system( with an opening bracket trimming all spaces between system and opening bracket? that way simple words like system wont get flagged, reducing the number of files to check greatly

 

Thanks.

Link to comment
Share on other sites

Hi Jack,

 

One more question. If some files were flagged as hack suspect and I put them in the ignore list, if those files really get hacked then does it mean it wont be flagged? The only way out would be to determine the file size difference?

 

Thanks.

Link to comment
Share on other sites

Hi Jack,

 

Great contrib from you. I use your other contribs from you as well.

 

I have set up sitemonitor, put cron jobs etc. all is fine.

 

I have a question:

if any file has system word it gets flagged as possible hacker code. Is it advisable to change the function a bit and check for system( with an opening bracket trimming all spaces between system and opening bracket? that way simple words like system wont get flagged, reducing the number of files to check greatly

 

Thanks.

In theory, that sounds like a good idea. But it won't catch code like

system
(

That may not ever occur but if it does, the hacker code gets by. You could do a search for the next character after system, no matter where it is, and if it is a (, then flag it. But once you start coding like that, you have to start asking if you are covering everything. What happens if a hacker does this?

$array[] = 'system';
$array[] = 'exec';
foreach ($array as $try_function) 
 $try_function();

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

One more question. If some files were flagged as hack suspect and I put them in the ignore list, if those files really get hacked then does it mean it wont be flagged? The only way out would be to determine the file size difference?

The ignore list is only for the hacker test. The regular SiteMonitor code will find the change.

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

My sitemonitor report tells me 173 files suspected as hacked. Do I have to go through all 173 files and compare them with the originals to see if it is OK? That is an awful lot of files.

No, you don't have to.

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,

 

I've set up the cron job and I get an email saying:-

 

/bin/sh: home/www/ (myurl) .com.au/buy/admin/sitemonitor.php: Permission denied

 

I've checked my .htaccess files but don't know how to fix it.

 

If this problem has been discussed before, let me know and I'll look for it.

 

Cheers,

Christina

Link to comment
Share on other sites

Hi Jack,

 

I've set up the cron job and I get an email saying:-

 

/bin/sh: home/www/ (myurl) .com.au/buy/admin/sitemonitor.php: Permission denied

 

I've checked my .htaccess files but don't know how to fix it.

 

If this problem has been discussed before, let me know and I'll look for it.

If you can run Sitemonitor manually then the problem is with your cron job syntax. You will need to ask your host about that since that syntax can vary with the host.

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, great contribution. I setup the cron job and the below syntax works great for the hacker test code.

 

/web/cgi-bin/php5 "$HOME/html/username/sitemonitor_hacker_cron.php"

 

but when I try using syntax below to run the run the normal file check code, I get errors. Should I be using some other syntax? I am using Godaddy's cron job. I am not sure if I am calling it correctly.

 

/web/cgi-bin/php5 "$HOME/html/username/sitemonitor.php?instance=0

 

Below is the errors recieved.

 

/bin/sh: -c: line 1: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 2: syntax error: unexpected end of file

 

Thanks

Link to comment
Share on other sites

but when I try using syntax below to run the run the normal file check code, I get errors. Should I be using some other syntax? I am using Godaddy's cron job. I am not sure if I am calling it correctly.

 

/web/cgi-bin/php5 "$HOME/html/username/sitemonitor.php?instance=0

 

Below is the errors recieved.

 

/bin/sh: -c: line 1: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 2: syntax error: unexpected end of file

You're missing a " in the second one.It should be

/web/cgi-bin/php5 "$HOME/html/username/sitemonitor.php?instance=0"

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

Hello,

 

On the shop of a partner he installed SiteMonito also.

But he got a error now Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in /www/htdocs__///__includes/functions/sitemonitor_functions.php on line 148

 

I think some permissions are not good becasue he has 644 on many files inside the admin

 

how to solve this?

 

Regards,

 

jasper

 

Hi, can you share how you fixed this problem? I am having the same issure.

 

Thanks

Link to comment
Share on other sites

You're missing a " in the second one.It should be

/web/cgi-bin/php5 "$HOME/html/username/sitemonitor.php?instance=0"

 

Thank you, i did miss the ". But now I get the following:

 

Status: 404 Not Found
Content-type: text/html

No input file specified.

 

What can I do to fix this part.

 

Thanks

Link to comment
Share on other sites

Thank you, i did miss the ". But now I get the following:

 

Status: 404 Not Found
Content-type: text/html

No input file specified.

 

What can I do to fix this part.

 

Thanks

Try running it manually by going to http://your_domain.com/admin/sitemonitor.php?instance=0. If it runs, something is wrong with your cron job. If not, you are probably missing a required file. If you haven't ran it initially after installation, that might happen.

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

Try running it manually by going to http://your_domain.com/admin/sitemonitor.php?instance=0. If it runs, something is wrong with your cron job. If not, you are probably missing a required file. If you haven't ran it initially after installation, that might happen.

Thanks for your help on this Jack. I ran that and that worked. My admin directory is password protected. Is it possible that this is the reason it didn't work from the cron job? To access my admin directory I must first enter the user name and password before I was able to run http://your_domain.com/admin/sitemonitor.php?instance=0.

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...