back-end/threats_monitoring/webBasedAttacks1.py
def add_data(dict_list):
    """ Receives a list of dictionaries and add time of crawling related data. Then returns them back
        @param
            dict_list:  (list)  a list of dictionaries. Each contains an IP field
        @return
            dict_list:  (list)  a list of enriched data dictionaries
    """
    for dict_entry in dict_list:

        datetime_utc_cti_string = datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')
        datetime_utc_cti = datetime.strptime(datetime_utc_cti_string, '%Y-%m-%d %H:%M:%S')
        timestamp_utc_cti = datetime_utc_cti.timestamp()

        dict_entry["Category"] = "WebBasedAttacks"
        dict_entry["Entity-Type"] = "IP"
        dict_entry["TimestampUTC-CTI"] = timestamp_utc_cti
        dict_entry["mongoDate-CTI"] = datetime_utc_cti
        dict_entry["DatetimeUTC-CTI"] = datetime_utc_cti_string

    return dict_list
 Receives a list of dictionaries and add time of crawling related data. Then returns them back
        @param
            dict_list:  (list)  a list of dictionaries. Each contains an IP field
        @return
            dict_list:  (list)  a list of enriched data dictionaries
    
Receives a list of dictionaries and add time of crawling related data. Then returns them back
@param
dict_list:  (list)  a list of dictionaries. Each contains an IP field
@return
dict_list:  (list)  a list of enriched data dictionaries
Receives a list of dictionaries and add time of crawling related data . Then returns them back @param dict_list : ( list ) a list of dictionaries . Each contains an IP field @return dict_list : ( list ) a list of enriched data dictionaries
def add_data(dict_list):
    for dict_entry in dict_list:
        datetime_utc_cti_string = datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')
        datetime_utc_cti = datetime.strptime(datetime_utc_cti_string, '%Y-%m-%d %H:%M:%S')
        timestamp_utc_cti = datetime_utc_cti.timestamp()
        dict_entry["Category"] = "WebBasedAttacks"
        dict_entry["Entity-Type"] = "IP"
        dict_entry["TimestampUTC-CTI"] = timestamp_utc_cti
        dict_entry["mongoDate-CTI"] = datetime_utc_cti
        dict_entry["DatetimeUTC-CTI"] = datetime_utc_cti_string
    return dict_list
def add_data ( dict_list ) : for dict_entry in dict_list : datetime_utc_cti_string = datetime . utcnow ( ) . strftime ( '%Y-%m-%d %H:%M:%S' ) datetime_utc_cti = datetime . strptime ( datetime_utc_cti_string , '%Y-%m-%d %H:%M:%S' ) timestamp_utc_cti = datetime_utc_cti . timestamp ( ) dict_entry [ "Category" ] = "WebBasedAttacks" dict_entry [ "Entity-Type" ] = "IP" dict_entry [ "TimestampUTC-CTI" ] = timestamp_utc_cti dict_entry [ "mongoDate-CTI" ] = datetime_utc_cti dict_entry [ "DatetimeUTC-CTI" ] = datetime_utc_cti_string return dict_list
Receives a list of dictionaries and add time of crawling related data.
Receives a list of dictionaries and add time of crawling related data .
""" Receives a list of dictionaries and add time of crawling related data. Then returns them back
        @param
            dict_list:  (list)  a list of dictionaries. Each contains an IP field
        @return
            dict_list:  (list)  a list of enriched data dictionaries
    """
dict_list