modules/utils.js
/**
 * Returns true of the url is excluded from scanning
 **/
Returns true of the url is excluded from scanning
Returns true of the url is excluded from scanning
function isUrlExcluded(url) {
    if (!isUrlSchemeSupported(url)) {
        return true;
    }
    var secplugsPattern = /^((http|https):\/\/(www.|)secplugs.com(\/[^\n]*|))$/;
    if (secplugsPattern.test(url)) {
        return true;
    }
    var localIPPattern = /^(http|https):\/\/((127)|(10)|(172\.(1[6-9]|2[0-9]|3[0-1]))|(192\.168))\./;
    if (localIPPattern.test(url)) {
        return true;
    }
    return false;
}
function isUrlExcluded ( url ) { if ( ! isUrlSchemeSupported ( url ) ) { return true ; } var secplugsPattern = / ^((http|https):\/\/(www.|)secplugs.com(\/[^\n]*|))$ / ; if ( secplugsPattern . test ( url ) ) { return true ; } var localIPPattern = / ^(http|https):\/\/((127)|(10)|(172\.(1[6-9]|2[0-9]|3[0-1]))|(192\.168))\. / ; if ( localIPPattern . test ( url ) ) { return true ; } return false ; }
Returns true of the url is excluded from scanning
Returns true of the url is excluded from scanning
// Check its a valid scheme // Check its not secplugs.com // Check its not a local ip addesss // Ok to scan