cli/streamingphish/streamingphish/features.py
def _fe_brand_presence(self, sample):
        """
        Checks for brands targeted by phishing in subdomain (likely phishing) and in domain
        + TLD (not phishing).

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

        Retuns:
            result (dictionary): Keys are feature names, values are feature scores.
        """
        result = OrderedDict()
        for item in self._brands:
            result["{}_brand_subdomain".format(item)] = 1 if item in sample['subdomain'] else 0
            result["{}_brand_domain".format(item)] = 1 if item in sample['domain'] else 0

        return result

        Checks for brands targeted by phishing in subdomain (likely phishing) and in domain
        + TLD (not phishing).

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

        Retuns:
            result (dictionary): Keys are feature names, values are feature scores.
        
Checks for brands targeted by phishing in subdomain (likely phishing) and in domain
+ TLD (not phishing).
Checks for brands targeted by phishing in subdomain ( likely phishing ) and in domain + TLD ( not phishing ) .
def _fe_brand_presence(self, sample):
        result = OrderedDict()
        for item in self._brands:
            result["{}_brand_subdomain".format(item)] = 1 if item in sample['subdomain'] else 0
            result["{}_brand_domain".format(item)] = 1 if item in sample['domain'] else 0
        return result
def _fe_brand_presence ( self , sample ) : result = OrderedDict ( ) for item in self . _brands : result [ "{}_brand_subdomain" . format ( item ) ] = 1 if item in sample [ 'subdomain' ] else 0 result [ "{}_brand_domain" . format ( item ) ] = 1 if item in sample [ 'domain' ] else 0 return result
Checks for brands targeted by phishing in subdomain (likely phishing) and in domain
+ TLD (not phishing).
Checks for brands targeted by phishing in subdomain ( likely phishing ) and in domain + TLD ( not phishing ) .
"""
        Checks for brands targeted by phishing in subdomain (likely phishing) and in domain
        + TLD (not phishing).

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

        Retuns:
            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