sandsifter icon indicating copy to clipboard operation
sandsifter copied to clipboard

Unable to run under Arch

Open ghost opened this issue 7 years ago • 6 comments

Hi,

I'm trying to test sandsifter on Arch. After manually specifying python2, I get:

$> sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t
Traceback (most recent call last):
  File "./sifter.py", line 842, in <module>
    main()
  File "./sifter.py", line 817, in main
    arch = re.search(r".*(..)-bit.*", injector_bitness).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

Please let me know if you need any more info or testing.

ghost avatar Jul 28 '17 07:07 ghost

Same error here, Ubuntu 17.04 (anaconda python installation)

esquire900 avatar Jul 28 '17 08:07 esquire900

Same here, centos 7

sokoow avatar Jul 28 '17 08:07 sokoow

Ok I found out why, you need to download capstone from git, then compile it, and then run make inside sifter directory. This will compile the injector and then all works well.

sokoow avatar Jul 28 '17 08:07 sokoow

@sokoow : I've installed capstone-git but I can't run make because I encounter #2 .

$> make
cc  -c injector.c -o injector.o -Wall
injector.c:321:93: warning: excess elements in array initializer
 00,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
 ff,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 -l:libcapstone.a -o injector -pthread
/usr/bin/ld: cannot find -l:libcapstone.a
collect2: error: ld returned 1 exit status
make: *** [Makefile:35: injector] Error 1

ghost avatar Jul 28 '17 08:07 ghost

it compiled fine for me under centos7 :/

sokoow avatar Jul 28 '17 08:07 sokoow

On Ubuntu, the necessary libraries are packaged:

sudo apt install python-capstone libcapstone-dev
make
sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t

FauxFaux avatar Jul 28 '17 15:07 FauxFaux