-
Notifications
You must be signed in to change notification settings - Fork 313
/
payload_generator
executable file
·49 lines (35 loc) · 1.14 KB
/
payload_generator
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env python
import base64
import string
import random
import sys
from argparse import ArgumentParser
from core.payloads import ScheduledPayload
def set_options():
parser = ArgumentParser()
parser.add_argument('--delay',
dest='delay',
type=int,
default=180,
help='Set the timed payload delay in seconds.')
parser.add_argument('--command',
dest='command',
required=True,
type=str,
help='The command to run on the target machine.')
parser.add_argument('--args',
dest='args',
required=True,
type=str,
help='Arguments passed to the command specified using the --comand flag.')
args = parser.parse_args()
options = args.__dict__
return options
if __name__ == '__main__':
options = set_options()
s = ScheduledPayload(options['command'],
options['args'],
delay=options['delay'])
print
print
print(s.execute())