cli/streamingphish/streamingphish/features.py
def _fe_check_phishing_similarity_words(self, sample):
        """
        Takes a list of words from the FQDN (split by special characters) and checks them
        for similarity against words commonly disguised as phishing words. This method only
        searches for a distance of 1.
            i.e. 'pavpal' = 1 for 'paypal', 'verifycation' = 1 for 'verification',
                'app1eid' = 1 for 'appleid'.

        Args:
            sample (dictionary): Info about the sample being analyzed i.e. subdomain, tld, fqdn

        Returns:
            result (dictionary): Keys are feature names, values are feature scores.
        """
        result = OrderedDict()

        for key in self._similarity_words:
            result[key + "_lev_1"] = 0

            for word in sample['fqdn_words']:
                if distance(word, key) == 1:
                    result[key + "_lev_1"] = 1

        return result

        Takes a list of words from the FQDN (split by special characters) and checks them
        for similarity against words commonly disguised as phishing words. This method only
        searches for a distance of 1.
            i.e. 'pavpal' = 1 for 'paypal', 'verifycation' = 1 for 'verification',
                'app1eid' = 1 for 'appleid'.

        Args:
            sample (dictionary): Info about the sample being analyzed i.e. subdomain, tld, fqdn

        Returns:
            result (dictionary): Keys are feature names, values are feature scores.
        
Takes a list of words from the FQDN (split by special characters) and checks them
for similarity against words commonly disguised as phishing words. This method only
searches for a distance of 1.
Takes a list of words from the FQDN ( split by special characters ) and checks them for similarity against words commonly disguised as phishing words . This method only searches for a distance of 1 .
def _fe_check_phishing_similarity_words(self, sample):
        result = OrderedDict()
        for key in self._similarity_words:
            result[key + "_lev_1"] = 0
            for word in sample['fqdn_words']:
                if distance(word, key) == 1:
                    result[key + "_lev_1"] = 1
        return result
def _fe_check_phishing_similarity_words ( self , sample ) : result = OrderedDict ( ) for key in self . _similarity_words : result [ key + "_lev_1" ] = 0 for word in sample [ 'fqdn_words' ] : if distance ( word , key ) == 1 : result [ key + "_lev_1" ] = 1 return result
Takes a list of words from the FQDN (split by special characters) and checks them
for similarity against words commonly disguised as phishing words.
Takes a list of words from the FQDN ( split by special characters ) and checks them for similarity against words commonly disguised as phishing words .
"""
        Takes a list of words from the FQDN (split by special characters) and checks them
        for similarity against words commonly disguised as phishing words. This method only
        searches for a distance of 1.
            i.e. 'pavpal' = 1 for 'paypal', 'verifycation' = 1 for 'verification',
                'app1eid' = 1 for 'appleid'.

        Args:
            sample (dictionary): Info about the sample being analyzed i.e. subdomain, tld, fqdn

        Returns:
            result (dictionary): Keys are feature names, values are feature scores.
        """
result (dictionary): Keys are feature names, values are feature scores.
result ( dictionary ) : Keys are feature names values are feature scores .
self
sample
Info about the sample being analyzed i.e. subdomain, tld, fqdn
Info about the sample being analyzed i . e . subdomain tld fqdn