LogoLogo
EmpireStarkillerBlogDiscord
  • Empire
  • Quickstart
    • Installation
    • Server
  • Starkiller
    • Introduction
    • Agent Tasks
  • Listeners
    • Dropbox
    • OneDrive
    • HTTP
    • Malleable C2
  • Stagers
    • multi_generate_agent
  • Plugins
    • Development
      • Imports
      • Lifecycle Hooks
      • Execution
      • Hooks and Filters
      • Plugin Tasks
      • Notifications
      • Database Usage
      • Settings
      • Migration
  • Modules
    • Autorun Modules
    • Module Development
      • PowerShell Modules
      • Python Modules
      • C# Modules
      • BOF Modules
  • Agents
    • Python
      • Main Agent Class
      • Stage Class
      • Packet Handler Class
      • Extended Packet Handler Class
    • Go
      • Main Agent Class
      • Packet Handler Class
      • Main.go Template
    • Staging
  • RESTful API
  • Settings
    • Logging
    • Bypasses
    • IP Filtering
Powered by GitBook
On this page
  • on_load
  • on_unload
  • on_start
  • on_stop

Was this helpful?

  1. Plugins
  2. Development

Lifecycle Hooks

on_load

The on_load function is called when the plugin is loaded into memory.

@override
def on_load(self, db):
    print("Plugin loaded")

on_unload

The on_unload function is called when the plugin is unloaded from memory.

@override
def on_unload(self, db):
    print("Plugin unloaded")

on_start

The on_start function is called when the plugin is started.

@override
def on_start(self, db):
    print("Plugin started")

on_stop

The on_stop function is called when the plugin is stopped.

@override
def on_stop(self, db):
    print("Plugin stopped")
PreviousImportsNextExecution

Last updated 1 month ago

Was this helpful?