back-end/threats_monitoring/webBasedAttacks1.py
def model_as_json(html_values):
    """ This function processes splits information from the indicator and models it on dictionaries.
        @param
            html_values:    (str or None)   a string that contains scraped information
        @return
            ip_dict:        (list)          a list of dictionaries. Each contains an IP field
    """
    ip_dict = []
    header = ["IP"]

    # each row is an IP address.
    for ip_address in html_values.split('\n'):
        # new list row each row. Lives in this for scope (what a sort life)
        my_list = list([])
        # append values
        my_list.append(ip_address)
        # zip header and current row in a dictionary
        # then append it to the list
        ip_dict.append(dict(zip(header, my_list)))

    return ip_dict
 This function processes splits information from the indicator and models it on dictionaries.
        @param
            html_values:    (str or None)   a string that contains scraped information
        @return
            ip_dict:        (list)          a list of dictionaries. Each contains an IP field
    
This function processes splits information from the indicator and models it on dictionaries.
@param
html_values:    (str or None)   a string that contains scraped information
@return
ip_dict:        (list)          a list of dictionaries. Each contains an IP field
This function processes splits information from the indicator and models it on dictionaries . @param html_values : ( str or None ) a string that contains scraped information @return ip_dict : ( list ) a list of dictionaries . Each contains an IP field
def model_as_json(html_values):
    ip_dict = []
    header = ["IP"]
    for ip_address in html_values.split('\n'):
        my_list = list([])
        my_list.append(ip_address)
        ip_dict.append(dict(zip(header, my_list)))
    return ip_dict
def model_as_json ( html_values ) : ip_dict = [ ] header = [ "IP" ] for ip_address in html_values . split ( '\n' ) : my_list = list ( [ ] ) my_list . append ( ip_address ) ip_dict . append ( dict ( zip ( header , my_list ) ) ) return ip_dict
This function processes splits information from the indicator and models it on dictionaries.
This function processes splits information from the indicator and models it on dictionaries .
""" This function processes splits information from the indicator and models it on dictionaries.
        @param
            html_values:    (str or None)   a string that contains scraped information
        @return
            ip_dict:        (list)          a list of dictionaries. Each contains an IP field
    """ # each row is an IP address.
 # new list row each row. Lives in this for scope (what a sort life)
 # append values
 # zip header and current row in a dictionary
 # then append it to the list

html_values