Beispiel #1
0
    def handle(self, *args, **options):
        """
        Script Execution.
        """

        drop = options.get('drop')
        if drop:
            print "Dropping enabled. Will drop content before adding!"
        else:
            print "Drop protection enabled. Will not drop existing content!"
        populate_user_roles(drop)
        populate_exploits(drop)
        populate_backdoors(drop)
        populate_indicator_actions(drop)
        populate_raw_data_types(drop)
        # The following will always occur with every run of this script:
        #   - tlds are based off of a Mozilla TLD list so it should never
        #     contain  entries outside of the ones provided.
        #   - object types are based off of the CybOX standard (with very few
        #   exceptions) so we will always repopulate with the list above.
        #   - relationship types are based off of the CybOX standard so we will
        #   always populate with the list above.
        # If you wish to add your own custom relationship types or object types
        # (not recommended), then be sure to add them above so they will be
        # added back if this script were to be used again.
        populate_tlds(drop)
        add_relationship_types(drop)
        add_object_types(drop)
        add_event_types(drop)
        add_sector_objects(drop)
        add_actor_content(drop)
        create_dashboard(drop)
        create_config_if_not_exist()
        create_indexes()
    def handle(self, *args, **options):
        """
        Script Execution.
        """

        drop = options.get('drop')
        if drop:
            print "Dropping enabled. Will drop content before adding!"
        else:
            print "Drop protection enabled. Will not drop existing content!"
        populate_user_roles(drop)
        populate_exploits(drop)
        populate_backdoors(drop)
        populate_indicator_actions(drop)
        populate_raw_data_types(drop)
        # The following will always occur with every run of this script:
        #   - tlds are based off of a Mozilla TLD list so it should never
        #     contain  entries outside of the ones provided.
        #   - object types are based off of the CybOX standard (with very few
        #   exceptions) so we will always repopulate with the list above.
        #   - relationship types are based off of the CybOX standard so we will
        #   always populate with the list above.
        # If you wish to add your own custom relationship types or object types
        # (not recommended), then be sure to add them above so they will be
        # added back if this script were to be used again.
        populate_tlds(drop)
        add_relationship_types(drop)
        add_object_types(drop)
        add_event_types(drop)
        add_sector_objects(drop)
        add_actor_content(drop)
        create_dashboard(drop)
        create_config_if_not_exist()
        create_indexes()
Beispiel #3
0
def prep_indexes():
    """
    Update indexing.
    """

    # Create default indexes.
    from create_indexes import create_indexes
    create_indexes()
Beispiel #4
0
def prep_indexes():
    """
    Update indexing.
    """

    # Create default indexes.
    from create_indexes import create_indexes
    create_indexes()
def create_all_maps():
    create_indexes.create_indexes()
    # Create a set of maps with data grouped by months (whatever the year is: 2019 or 2020)
    create_heatmap('Security Needs', config.security_needs_index_file, 'month')
    create_heatmap('Lighting Needs', config.lighting_needs_index_file, 'month')
    create_heatmap('Connectivity Needs', config.connectivity_needs_index_file,
                   'month')

    #Create a set of maps with data grouped by year-month (less data per time period but provides a better view of history)
    create_heatmap('Security Needs', config.security_needs_index_file,
                   'year-month')
    create_heatmap('Lighting Needs', config.lighting_needs_index_file,
                   'year-month')
    create_heatmap('Connectivity Needs', config.connectivity_needs_index_file,
                   'year-month')
    def handle(self, *args, **options):
        """
        Script Execution.
        """

        drop = options.get('drop')
        if drop:
            print "Dropping enabled. Will drop content before adding!"
        else:
            print "Drop protection enabled. Will not drop existing content!"
        populate_user_roles(drop)
        populate_actions(drop)

        # The following will always occur with every run of this script:
        create_dashboard(drop)
        create_config_if_not_exist()
        create_indexes()
Beispiel #7
0
def process_input_data():

    
    print("#### Step 1/7:  Generating the city grid ################################################")
    utils.generate_city_grid()
    print("#### Step 3/7:  Generating geolocated accommodations input file #########################")
    get_hotels_geodata.get_hotel_geodata(config.city_hotels_input_file_geolocated)
    print("#### Step 2/7:  Generating geolocated accidents input file ##############################")
    get_accidents_geodata.get_accidents_geodata(config.city_accidents_input_file)
    print("#### Step 4/7:  Generating geolocated wifi input file ###################################")
    get_wifi_logs_geodata.get_wifi_logs_geodata(config.city_wifi_input_file_geolocated)
    print("#### Step 5/7:  Generating claims wifi input file #######################################")
    get_claims_geodata.get_claims_geodata(config.city_claims_input_file)
    print("#### Step 6/7:  Recreating connectivity, lighting, security needs indexes ###############")
    create_indexes.create_indexes()
    print("#### Step 7/7:  Generating and displaying the heatmaps ##################################")
    display_heatmap.create_all_maps()
    def handle(self, *args, **options):
        """
        Script Execution.
        """

        drop = options.get('drop')
        if drop:
            print "Dropping enabled. Will drop content before adding!"
        else:
            print "Drop protection enabled. Will not drop existing content!"
        populate_user_roles(drop)
        populate_indicator_actions(drop)
        populate_raw_data_types(drop)
        # The following will always occur with every run of this script:
        #   - tlds are based off of a Mozilla TLD list so it should never
        #     contain  entries outside of the ones provided.
        populate_tlds(drop)
        add_location_objects(drop)
        create_dashboard(drop)
        create_config_if_not_exist()
        create_indexes()
Beispiel #9
0
    def handle(self, *args, **options):
        """
        Script Execution.
        """

        drop = options.get('drop')
        if drop:
            print "Dropping enabled. Will drop content before adding!"
        else:
            print "Drop protection enabled. Will not drop existing content!"
        populate_user_roles(drop)
        populate_indicator_actions(drop)
        populate_raw_data_types(drop)
        # The following will always occur with every run of this script:
        #   - tlds are based off of a Mozilla TLD list so it should never
        #     contain  entries outside of the ones provided.
        populate_tlds(drop)
        add_location_objects(drop)
        create_dashboard(drop)
        create_config_if_not_exist()
        create_indexes()