skip to Main Content

I have been through quite a lot of ideas, from testing for /admin/ to looking for cookies. But as far as I can see from the documentation, the admin path can be changed. And a few sites I have known to be osCommerce have not had the cookie I expected set.

Is there a certain file or something I can look for, does the robots.txt almost always contain a certain line? Basically I am looking for the most fool proof solution to identify the two CMS.

3

Answers


  1. I know only Magento, but there is a way to test if a site is a magento.

    It work on the vast majority of case.

    In magento there are some default repertory that should exist on every magento installation, these directory are forbidden (403) but they exist (not a 404). So just need to test them and you’ll have your answer.

    Of course some people can rename these directory (but very very rare) and some other homemade website should have the same naming convention, but it’s more rare if possible).

    Just try your webite/app/design/adminhtml/default/default/layout

    If you have a 403 it’s a Magento.

    Another tip for Magento is the uri of product images, but some extensions can change this. Generally URI are like this :

    yourwebsite/media/catalog/product/cache/[0-9A-F]/image/[random Hexadecimal]/x*/y**/myimage.jpg

    x* first letter of image name
    y* second letter of image name

    if image have that name it’s a Magento.

    Kind regards,

    Login or Signup to reply.
  2. If you want to test by searching for files/directories, look for app/code/core/Mage to test if a website is based on Magento. This directory contains core Magento files and cannot be changed/deleted.

    Login or Signup to reply.
  3. For osCommerce you could test for the presences of the actual PHP files:

    <?php
    
    $files = array('account_history.php','account_history_info.php','account_newsletters.php','account_notifications.php','account_password.php','address_book.php','address_book_process.php','advanced_search.php','advanced_search_result.php','checkout_confirmation.php','checkout_payment.php','checkout_payment_address.php','checkout_process.php','checkout_shipping.php','checkout_shipping_address.php','checkout_success.php','conditions.php','contact_us.php','cookie_usage.php','create_account.php','create_account_success.php','download.php','index.php','info_shopping_cart.php','login.php','logoff.php','opensearch.php','password_forgotten.php','password_reset.php','popup_image.php','popup_search_help.php','privacy.php','product_info.php','product_reviews.php','product_reviews_info.php','product_reviews_write.php','products_new.php','redirect.php','reviews.php','shipping.php','shopping_cart.php','specials.php','ssl_check.php','stylesheet.css','tell_a_friend.php');
    $nofound = 0;
    foreach ($files as $file)
    {
            if (false == file_get_contents('http://www.example.com/' . $file)) {
                    //echo $file . "n"
                    $notfound++;
            }
    
    }
    
    if ($notfound > 3){
            echo "Properly not osCommerce";
    } else {
            echo "Properly osCommerce";
    }
    
    ?>
    

    It might take some time to figure out the correct number of files that is allowed not to be present in the installation.

    I guess you could come up with something similar for Magento?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search