Hooks and Filters
Hooks and Filters
from sqlalchemy.orm import Session
from empire.server.core.hooks import hooks
from empire.server.core.db import models
def my_hook(db: Session, agent: models.Agent):
"""
print to the console whenever an agent checks in.
"""
print(f'New Agent Check in! Name: {agent.name}')
hooks.register_hook(hooks.AFTER_AGENT_CHECKIN_HOOK, 'checkin_logger_hook', my_hook)Real World Examples
Last updated
Was this helpful?