Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
OMARLEAP/src/plugins.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
33 lines (24 sloc)
995 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Template classes for plugins and useful functions """ | |
import pty | |
## A couple of optional super classes and a general item class to represent them more abstractly | |
## Can be used to add common functionality to privesc/enumeration plugins | |
class Item: | |
"""A generic privelege escalation/enumeration class. Include common | |
functionality here""" | |
def __init__(self): | |
self.name="Not for actual use" | |
self.author="James Shuttleworth" | |
self.description="Someone needs to write this bit" | |
def execute(self): | |
"""Execute the privelege escalation/enumeration, dropping the user | |
into a shell or displaying collected info. | |
""" | |
print("This should be overridden in your plugin") | |
def info(self): | |
"""Return useful information on the plugin, suitable for the user to | |
read""" | |
return f"{self.name}, by {self.author}. {self.description}" | |
class PrivEsc(Item): | |
pass | |
class Enumeration(Item): | |
pass |