-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPylibemu.py
More file actions
29 lines (28 loc) · 993 Bytes
/
Pylibemu.py
File metadata and controls
29 lines (28 loc) · 993 Bytes
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
#!/usr/bin/python
import sys
import pylibemu
print "************Shellcode Emulation********************"
print"Wellcome to the Python Emulaton section"
def greet():
print
greet = "Author: Bikash Dash (www.vulnerableghost.com)"
print "\t\t"+"*"*(len(greet)+18)
print "\t\t"+"*\t"+greet+"\t\t*"
print "\t\t"+"*"*(len(greet)+18)
def emu():
data = ""
try:
for line in sys.stdin.readlines():
# if len(sys.argv)<1:
# print "enter the input in hex format(/x format)%s",input
# sys.exit(0)
data += line
except e:
print "error"
print "[+]testing data of size %dB......"% (len(data))
emu = pylibemu.Emulator()
offset = emu.shellcode_getpc_test(data)
if offset >=0:
print "[+] IS SHELLCODE!"
else:
print "[-] IS Not A SHELLCODE"