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

Was this helpful?

  1. Modules
  2. Module Development

Python Modules

Python modules are not much different from PowerShell modules in terms of the yaml schema. The differences for Python come in with the script, script_path, script_end, and option formatters.

A python script doesn't have an option_format_string. Instead, options are injected into the script directly using mustache templating. An example of this is the python module say.

options:
  - name: Agent
    description: Agent to run module on.
    required: true
    value: ''
  - name: Text
    description:
    required: true
    value: 'The text to speak.'
  - name: Voice
    description: The voice to use.
    required: true
    value: 'alex'
script: run_command('say -v {{ Voice }} {{ Text }}')

Python modules also support the advanced.custom_generate method of generating the script. Python modules can be used with script OR script_path and will ignore script_end, option_format_string, and option_format_string_boolean.

PreviousPowerShell ModulesNextC# Modules

Last updated 3 years ago

Was this helpful?