Skip to content

Commit 28359a3

Browse files
authored
Add files via upload
1 parent 3ee80ed commit 28359a3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

shellcodeFormatter.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
file = open("payload.bin", 'rb')
2+
contents = file.read()
3+
file.close()
4+
5+
shellcode = []
6+
for b in range(len(contents)):
7+
test = contents[b]
8+
shellcode.append("{:02x}".format(test))
9+
10+
output = "BYTE payload[] = {"
11+
12+
count = 0
13+
for x in shellcode:
14+
if count < len(shellcode)-1:
15+
output += "0x{},".format(x)
16+
else:
17+
output += "0x{}".format(x)
18+
count += 1
19+
20+
output += "};"
21+
22+
print(output)

0 commit comments

Comments
 (0)