back-end/threats_monitoring/botscout.py
def model_as_json(bot_entries):
    """ Casts a list of lists into a list of modeled dictionaries. New data format is JSON-like and suitable for MongoDB
        @param
            bot_entries     (list)      list of sub-lists
        @returns
            json_list       (list)      list of modeled dictionaries
    """

    json_list = []

    for bot_entry in bot_entries:
        json_object = {
            "_id": bot_entry[2],
            "Category": "Botnets",
            "Entity-Type": "IP",
            "IP": bot_entry[0],
            "Botscout-id": bot_entry[2],
            "Bot-Name": bot_entry[4],
            "Email": bot_entry[5],
            "TimestampUTC": bot_entry[6],
            "mongoDate": bot_entry[7],
            "DatetimeUTC": bot_entry[8],
            "TimestampUTC-CTI": bot_entry[9],
            "mongoDate-CTI": bot_entry[10],
            "DatetimeUTC-CTI": bot_entry[11],
            "Country": bot_entry[1],
        }

        json_list.append(json_object)

    return json_list
 Casts a list of lists into a list of modeled dictionaries. New data format is JSON-like and suitable for MongoDB
        @param
            bot_entries     (list)      list of sub-lists
        @returns
            json_list       (list)      list of modeled dictionaries
    
Casts a list of lists into a list of modeled dictionaries. New data format is JSON-like and suitable for MongoDB
@param
bot_entries     (list)      list of sub-lists
@returns
json_list       (list)      list of modeled dictionaries
Casts a list of lists into a list of modeled dictionaries . New data format is JSON - like and suitable for MongoDB @param bot_entries ( list ) list of sub - lists @returns json_list ( list ) list of modeled dictionaries
def model_as_json(bot_entries):
    json_list = []
    for bot_entry in bot_entries:
        json_object = {
            "_id": bot_entry[2],
            "Category": "Botnets",
            "Entity-Type": "IP",
            "IP": bot_entry[0],
            "Botscout-id": bot_entry[2],
            "Bot-Name": bot_entry[4],
            "Email": bot_entry[5],
            "TimestampUTC": bot_entry[6],
            "mongoDate": bot_entry[7],
            "DatetimeUTC": bot_entry[8],
            "TimestampUTC-CTI": bot_entry[9],
            "mongoDate-CTI": bot_entry[10],
            "DatetimeUTC-CTI": bot_entry[11],
            "Country": bot_entry[1],
        }
        json_list.append(json_object)
    return json_list
def model_as_json ( bot_entries ) : json_list = [ ] for bot_entry in bot_entries : json_object = { "_id" : bot_entry [ 2 ] , "Category" : "Botnets" , "Entity-Type" : "IP" , "IP" : bot_entry [ 0 ] , "Botscout-id" : bot_entry [ 2 ] , "Bot-Name" : bot_entry [ 4 ] , "Email" : bot_entry [ 5 ] , "TimestampUTC" : bot_entry [ 6 ] , "mongoDate" : bot_entry [ 7 ] , "DatetimeUTC" : bot_entry [ 8 ] , "TimestampUTC-CTI" : bot_entry [ 9 ] , "mongoDate-CTI" : bot_entry [ 10 ] , "DatetimeUTC-CTI" : bot_entry [ 11 ] , "Country" : bot_entry [ 1 ] , } json_list . append ( json_object ) return json_list
Casts a list of lists into a list of modeled dictionaries.
Casts a list of lists into a list of modeled dictionaries .
""" Casts a list of lists into a list of modeled dictionaries. New data format is JSON-like and suitable for MongoDB
        @param
            bot_entries     (list)      list of sub-lists
        @returns
            json_list       (list)      list of modeled dictionaries
    """
bot_entries