Created
August 7, 2017 18:52
-
-
Save acammack-r7/aac49ba6c2af1bd3132aee8d76ed6b68 to your computer and use it in GitHub Desktop.
Demo capture server for Metasploit Framework's external modules, sans DB reporting for now
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
#!/usr/bin/env python2.7 | |
from metasploit import module | |
import time | |
metadata = { | |
'name': 'Test Module', | |
'description': ''' | |
This is a test module | |
''', | |
'authors': ['Adam Cammack <adam_cammack@rapid7.com>'], | |
'references': [], | |
'type': 'capture_server', | |
'options': { | |
'times': {'type': 'int', 'description': 'Number of times to log \'TEST\'', 'required': True, 'default': 5} | |
} | |
} | |
def start_server(args): | |
for _ in range(int(args['times'])): | |
module.log('TEST') | |
time.sleep(5) | |
if __name__ == '__main__': | |
module.run(metadata, start_server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment