-
Notifications
You must be signed in to change notification settings - Fork 14
/
moneyshot.py
executable file
·66 lines (52 loc) · 1.7 KB
/
moneyshot.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/python
import sys
import colors, outputter, codelibrary, codeparameters
import lolsled, builder, pattern, rop, rop_arm, fmt
import shell, rep, dwords, dumpsym, dumpelf, elfwrap
def banner():
asquee = """
__ __ ______.___ __ _____._ __._______._ __ ____._________
/ \ / \/ __ | \| |/ ___| \/ /\ ___/ | |/ __ \__ __/
/ ' \ / | |\ | _|_\ /__\ \| | / | | |
/___\ / \_____|__| \__|______||__||______/|__|__|\_____| |__|
\/ _____\\ """
sys.stderr.write(colors.bold() + colors.fg('cyan') + asquee + colors.end() + "\n\n")
def usage():
print ""
print " usage: moneyshot <action> [options]\n"
print " actions:"
print " * list - list shellcodes"
print " * build - build shellcodes"
print " * pattern - build patterns"
print " * lolsled - build a lolsled"
print " * format - format input"
print " * fmt - formatstring helper"
print " * rop - ROP helper"
print " * rop-arm - ARM ROP helper"
print " * rep - String repeater"
print " * dwords - binary format dwords"
print " * dumpsym - dump symbols for given binary"
print " * dumpelf - dump information for given binary"
if len(sys.argv) == 1:
banner()
usage()
exit()
action = sys.argv[1]
valid_actions = [
"list", "build", "pattern", "lolsled", "format", "fmt",
"rop", "rop-arm", "rep", "dwords", "dumpsym", "dumpelf",
"elfwrap"
]
if action not in valid_actions:
banner()
usage()
exit()
action = action.replace("-", "_")
if action == "list":
action = "codelibrary"
if action == "format":
action = "outputter"
if action == "build":
action = "builder"
globals()[ action ].main(sys.argv[2:])
exit()