update

n1nj4sec 2016-01-19 20:10:44 +01:00
parent 6c559187fe
commit d5a62b6956
2 changed files with 57 additions and 0 deletions

10
Installation.md Normal file

@ -0,0 +1,10 @@
On kali linux 2.0 you just needs the following dependencies :
#Installation
```bash
pip install rpyc
pip install pefile
pip install pycrypto
pip install yaml
```
##Troubleshooting
If you have some issues with rpyc while running the server on windows, take a look at issue #25, @deathfantasy made a fix

47
Writing-a-module.md Normal file

@ -0,0 +1,47 @@
#Writing a MsgBox module
First of all write the function/class you want to import on the remote client
in the example we create the file pupy/packages/windows/all/pupwinutils/msgbox.py
```python
import ctypes
import threading
def MessageBox(text, title):
t=threading.Thread(target=ctypes.windll.user32.MessageBoxA, args=(None, text, title, 0))
t.daemon=True
t.start()
```
then, simply create a module to load our package and call the function remotely
```python
class MsgBoxPopup(PupyModule):
""" Pop up a custom message box """
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 :)
```bash
>> run msgbox -h
usage: msgbox [-h] [--title TITLE] text
Pop up a custom message box
positional arguments:
text text to print in the msgbox :)
optional arguments:
-h, --help show this help message and exit
--title TITLE msgbox title
```