forked from threat9/routersploit
-
Notifications
You must be signed in to change notification settings - Fork 3
/
rsf.py
executable file
·35 lines (26 loc) · 1 KB
/
rsf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python2
from __future__ import print_function
import argparse
import logging.handlers
from routersploit.interpreter import RoutersploitInterpreter
from routersploit.utils import create_exploit
log_handler = logging.handlers.RotatingFileHandler(filename='routersploit.log', maxBytes=500000)
log_formatter = logging.Formatter('%(asctime)s %(levelname)s %(name)s %(message)s')
log_handler.setFormatter(log_formatter)
LOGGER = logging.getLogger()
LOGGER.setLevel(logging.DEBUG)
LOGGER.addHandler(log_handler)
parser = argparse.ArgumentParser(description='RouterSploit - Router Exploitation Framework')
parser.add_argument('-a',
'--add-exploit',
metavar='exploit_path',
help='Add exploit using default template.')
def routersploit():
rsf = RoutersploitInterpreter()
rsf.start()
if __name__ == "__main__":
args = parser.parse_args()
if args.add_exploit:
create_exploit(args.add_exploit)
else:
routersploit()