Closed MayorUshanka closed 3 years ago
When I remove the L it complains:
File "./sifter.py", line 792
print "warning: no search type (--len, --unk, --dis, --ill) specified, results will not be recorded."
^
SyntaxError: invalid syntax
Is this python 2??? Really?
Running explicitly with python2:
sudo python2 sifter.py --unk --dis --len --sync --tick -- -P1 -t
Traceback (most recent call last):
File "sifter.py", line 16, in <module>
from capstone import *
ImportError: No module named capstone
[sandsifter]$ sudo pip install capstone
Collecting capstone
Downloading capstone-4.0.2-py2.py3-none-manylinux1_x86_64.whl (2.1 MB)
|████████████████████████████████| 2.1 MB 2.4 MB/s
Installing collected packages: capstone
Successfully installed capstone-4.0.2
[sandsifter]$ sudo python2 sifter.py --unk --dis --len --sync --tick -- -P1 -t
Traceback (most recent call last):
File "sifter.py", line 16, in <module>
from capstone import *
ImportError: No module named capstone
[sandsifter]$ make
make: Nothing to be done for 'all'.
[sandsifter]$ make clean
rm *.o injector
[sandsifter]$ make
cc -c injector.c -o injector.o -Wall
injector.c:321:93: warning: excess elements in array initializer
321 | .start={.bytes={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, .len=0},
| ^~~~
injector.c:321:93: note: (near initialization for ‘total_range.start.bytes’)
injector.c:322:91: warning: excess elements in array initializer
322 | .end={.bytes={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}, .len=0},
| ^~~~
injector.c:322:91: note: (near initialization for ‘total_range.end.bytes’)
cc injector.o -O3 -Wall -no-pie -l:libcapstone.a -o injector -pthread
[sandsifter]$ sudo python2 sifter.py --unk --dis --len --sync --tick -- -P1 -t
Traceback (most recent call last):
File "sifter.py", line 16, in <module>
from capstone import *
ImportError: No module named capstone
Maybe sudo pip2 install capstone
?
Doh, of course.
I got it to compile with
-no-pie
, but now this script is not working. What is this piece of code supposed to do?