mirror of https://github.com/n1nj4sec/pupy.git
Updated Writing a module (markdown)
parent
651c495816
commit
cbddc65172
|
@ -12,23 +12,23 @@ def MessageBox(text, title):
|
|||
```
|
||||
then, simply create a module to load our package and call the function remotely
|
||||
```python
|
||||
from pupylib.PupyModule import *
|
||||
|
||||
__class_name__="MsgBoxPopup"
|
||||
|
||||
@compatibility("windows")
|
||||
class MsgBoxPopup(PupyModule):
|
||||
""" Pop up a custom message box """
|
||||
dependencies=["pupwinutils.msgbox"]
|
||||
|
||||
def init_argparse(self):
|
||||
self.arg_parser = PupyArgumentParser(prog="msgbox", description=self.__doc__)
|
||||
self.arg_parser.add_argument('--title', help='msgbox title')
|
||||
self.arg_parser.add_argument('text', help='text to print in the msgbox :)')
|
||||
|
||||
@windows_only
|
||||
def is_compatible(self):
|
||||
pass
|
||||
|
||||
def run(self, args):
|
||||
self.client.load_package("pupwinutils.msgbox")
|
||||
self.client.conn.modules['pupwinutils.msgbox'].MessageBox(args.text, args.title)
|
||||
self.log("message box popped !")
|
||||
|
||||
```
|
||||
and that's it, we have a fully functional module :)
|
||||
|
||||
|
|
Loading…
Reference in New Issue