Comments (5)
Yeah, with latest version everything is ok, thanks!
from sandsifter.
Use clang and make sure you're linking libcapstone.
~/sandsifter# make
clang -c injector.c -o injector.o -Wall
injector.c:320:93: warning: excess elements in array initializer
.start={.bytes={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, .len=0},
^~~~
injector.c:321:91: warning: excess elements in array initializer
.end={.bytes={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}, .len=0},
^~~~
2 warnings generated.
clang injector.o -O3 -Wall -l:libcapstone.a -o injector -pthread
~/sandsifter#
from sandsifter.
clang -c injector.c -o injector.o -Wall
works fine but
clang injector.o -O3 -Wall -l:libcapstone.a -o injector -pthread
gives error:
Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/i586-linux-gnu/4.9
Found candidate GCC installation: /usr/bin/../lib/gcc/i586-linux-gnu/4.9.2
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.4
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.2
Found candidate GCC installation: /usr/lib/gcc/i586-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/i586-linux-gnu/4.9.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Selected multilib: .;@m64
"/usr/bin/ld" --hash-style=both --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o injector /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/crtbegin.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/usr/lib/x86_64-linux-gnu/../../lib64 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../.. -L/usr/lib/llvm-3.5/bin/../lib -L/lib -L/usr/lib injector.o -l:libcapstone.a -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/crtend.o /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crtn.o
injector.o: In function `print_asm':
injector.c:(.text+0x9ee): undefined reference to `cs_disasm_iter'
injector.o: In function `give_result':
injector.c:(.text+0x21f7): undefined reference to `cs_disasm_iter'
injector.o: In function `main':
injector.c:(.text+0x327c): undefined reference to `cs_malloc'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
from sandsifter.
Your libcapstone-dev package or local build of Capstone is up to date?
from sandsifter.
I've get it from deb repo. Let me try to build it locally.
from sandsifter.
Related Issues (20)
- Run on 80386 Debian within emulator? HOT 13
- Feature request: Add support for GPUs HOT 1
- have some sort of versioning information
- make fails with injector.c:817:2: error: impossible constraint in ‘asm’ HOT 1
- summarize.py crashes HOT 2
- Resizing terminal window crashes summarize.py
- how to analysis the instructions from sandsifter
- compile error ubuntu 17.04 HOT 1
- I don't understand this.
- File "./sifter.py", line 817, in main arch = re.search(r".*(..)-bit.*", injector_bitness).group(1) HOT 5
- How to install this on Pentium II w/o FPU Debian without internet connection? HOT 12
- mmap_min_addr 0 instead of sudo
- Does not compile HOT 2
- File "./sifter.py", line 196 HOT 4
- injector.c:65:11: fatal error : capstone/capstone.h: No such file or directory HOT 1
- relocation R_X86_64_32S against symbol `dummy_stack' can not be used when making a PIE object... HOT 4
- Disclosure of the "halt catch fire" bug HOT 1
- Injector overflowed sigaltstack
- Make issue on ubuntu. HOT 4
- Found a fork that builds and runs on modern machines HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sandsifter.