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()
Exemple #2
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()
Exemple #3
0
def prep_sectors():

    add_sector_objects()
Exemple #4
0
def prep_sectors():

    add_sector_objects()