Esempio n. 1
0
    print("created Linfell-c payload")
    await register_default_profile_operation(admin, operation)
    print("Successfully finished initial setup")


async def mark_profiles_as_not_running():
    all_profiles = await db_objects.execute(
        C2Profile.select().where(C2Profile.running == True))
    for profile in all_profiles:
        profile.running = False
        await db_objects.update(profile)
    return


apfell.static('/static/apfell-dark.png',
              './app/static/apfell_cropped_dark.png',
              name='apfell-dark')
apfell.static('/favicon.ico', './app/static/favicon.png', name='favicon')
apfell.static('/static/apfell-white.png',
              './app/static/apfell_cropped.png',
              name='apfell-white')
apfell.static('/strict_time.png',
              './app/static/strict_time.png',
              name='strict_time')
apfell.static('/grouped_output.png',
              './app/static/grouped_output.png',
              name='grouped_output')
apfell.static('/no_cmd_output.png',
              './app/static/no_cmd_output.png',
              name='no_cmd_output')
apfell.static('/gear_med.png',
Esempio n. 2
0
                                             {"username": admin.username})
    print("Generating initial transforms.py file")
    rsp = await write_transforms_to_file()
    if rsp['status'] == 'success':
        rsp2 = await update_all_pt_transform_code()
        if rsp2['status'] == 'success':
            print("Successfully sent transforms to containers")
        else:
            print("Failed to send code to containers: " + rsp2['error'])
    else:
        print("Failed to write transforms to file: " + rsp['error'])
    print("Successfully finished initial setup")


# /static serves out static images and files
apfell.static('/static', './app/static')
apfell.static('/favicon.ico', './app/static/favicon.ico')
# / serves out the payloads we wish to host, make user supply a path they want to use, or just use file name
apfell.static('/', './app/payloads/operations/_hosting_dir')
apfell.static('/strict_time.png',
              './app/static/strict_time.png',
              name='strict_time')
apfell.static('/grouped_output.png',
              './app/static/grouped_output.png',
              name='grouped_output')
apfell.static('/no_cmd_output.png',
              './app/static/no_cmd_output.png',
              name='no_cmd_output')
apfell.static('/add_comment.png',
              './app/static/add_comment.png',
              name='add_comment')
Esempio n. 3
0
    for ptype in linfell_c['payload_types']:
        await import_payload_type_func(ptype, admin, operation)
    file.close()
    print("created Linfell-c payload")
    file = open('./app/templates/viper.json', 'r')
    viper = js.load(file)  # this is a lot of data and might take a hot second to load
    print("parsed viper payload file")
    for ptype in viper['payload_types']:
        await import_payload_type_func(ptype, admin, operation)
    file.close()
    print("created viper payload")
    await register_default_profile_operation(admin)
    print("Successfully finished initial setup")


apfell.static('/static/apfell-dark.png', './app/static/apfell_cropped_dark.png', name='apfell-dark')
apfell.static('/favicon.ico', './app/static/favicon.png', name='favicon')
apfell.static('/static/apfell-white.png', './app/static/apfell_cropped.png', name='apfell-white')
apfell.static('/strict_time.png', './app/static/strict_time.png', name='strict_time')
apfell.static('/grouped_output.png', './app/static/grouped_output.png', name='grouped_output')
apfell.static('/no_cmd_output.png', './app/static/no_cmd_output.png', name='no_cmd_output')
apfell.static('/gear_med.png', './app/static/Gear-icon_med.png', name='gear_md')
apfell.static('/add_comment.png', './app/static/add_comment.png', name='add_comment')
apfell.static('/static/bootstrap.3.3.7.min.css', './app/static/bootstrap.3.3.7.min.css', name='bootstrap-css')
apfell.static('/static/static_js.js', './app/static/static_js.js', name='static_js')
apfell.static('/static/check-mark.png', './app/static/check-mark.png', name='check-mark')
apfell.static('/static/danger.png', './app/static/danger.png', name='danger')
apfell.static('/static/refresh.png', './app/static/refresh.png', name='refresh')
apfell.static('/static/download.png', './app/static/download.png', name='download')
apfell.static('/static/delete.png', './app/static/delete.png', name='delete')
apfell.static('/static/view.png', './app/static/view.png', name='view')
Esempio n. 4
0
                    else:
                        param['required'] = True
                    await db_objects.get_or_create(CommandParameters, command=command, **param, operator=admin)
                except Exception as e:
                    print(e)
    print("Created all commands and command parameters")
    file.close()


async def mark_profiles_as_not_running():
    all_profiles = await db_objects.execute(C2Profile.select().where(C2Profile.running == True))
    for profile in all_profiles:
        profile.running = False
        await db_objects.update(profile)
    return

apfell.static('/static/apfell-dark.png', './app/static/apfell_cropped_dark.png', name='apfell-dark')
apfell.static('/favicon.ico', './app/static/favicon.png', name='favicon')
apfell.static('/apfell-white.png', './app/static/apfell_cropped.png', name='apfell-white')
apfell.static('/strict_time.png', './app/static/strict_time.png', name='strict_time')
apfell.static('/grouped_output.png', './app/static/grouped_output.png', name='grouped_output')
apfell.static('/no_cmd_output.png', './app/static/no_cmd_output.png', name='no_cmd_output')

# add links to the routes in this file at the bottom
links['index'] = apfell.url_for('index')
links['login'] = links['WEB_BASE'] + "/login"
links['logout'] = apfell.url_for('logout')
links['register'] = links['WEB_BASE'] + "/register"
links['settings'] = apfell.url_for('settings')
links['search'] = apfell.url_for('search')
Esempio n. 5
0
    print("created Linfell-c payload")
    await register_default_profile_operation(admin, operation)
    print("Successfully finished initial setup")


async def mark_profiles_as_not_running():
    all_profiles = await db_objects.execute(
        C2Profile.select().where(C2Profile.running == True))
    for profile in all_profiles:
        profile.running = False
        await db_objects.update(profile)
    return


apfell.static('/static/apfell-dark.png',
              './app/static/apfell_cropped_dark.png',
              name='apfell-dark')
apfell.static('/favicon.ico', './app/static/favicon.png', name='favicon')
apfell.static('/static/apfell-white.png',
              './app/static/apfell_cropped.png',
              name='apfell-white')
apfell.static('/strict_time.png',
              './app/static/strict_time.png',
              name='strict_time')
apfell.static('/grouped_output.png',
              './app/static/grouped_output.png',
              name='grouped_output')
apfell.static('/no_cmd_output.png',
              './app/static/no_cmd_output.png',
              name='no_cmd_output')
apfell.static('/gear_med.png',