fpicker icon indicating copy to clipboard operation
fpicker copied to clipboard

Linux make fpicker-linux frid-core.h fault

Open ZERO-A-ONE opened this issue 1 year ago • 0 comments

My current directory structure is:

syc@ubuntu:~/Downloads/fpicker-main$ tree ./
./
├── aflpp-ios.patch
├── assets
│   └── fpicker_logo.png
├── examples
│   ├── protocol_example
│   │   ├── in
│   │   │   └── 1
│   │   ├── protocol_example.c
│   │   ├── README.md
│   │   ├── test-fuzzer.js
│   │   └── wisec21_tutorial_frida_fuzzing.pdf
│   ├── test
│   │   ├── in
│   │   │   ├── 0
│   │   │   └── 1
│   │   ├── Makefile
│   │   ├── test.c
│   │   └── test-fuzzer.js
│   └── test-network
│       ├── in
│       │   ├── 0
│       │   └── 1
│       ├── Makefile
│       ├── test-network.c
│       └── test-network-fuzzer.js
├── fp_afl_mode.c
├── fp_communication.c
├── fpicker.c
├── fpicker.h
├── fp_standalone_mode.c
├── frida-core-linux.h
├── harness
│   ├── darwin-shm.js
│   ├── fuzzer.js
│   └── stalker-instrumentation.js
├── libfrida-core-linux.a
├── LICENSE
├── Makefile
└── README.md

A compile error occurs, indicating that there is no frida-core.h

syc@ubuntu:~/Downloads/fpicker-main$ make fpicker-linux
cc -fPIC -m64 -ffunction-sections -fdata-sections -Wall -Wno-format -Os -pipe -g3 fpicker.c fp_communication.c fp_standalone_mode.c fp_afl_mode.c -o fpicker -L. -lfrida-core-linux -ldl -lm -lresolv -lrt -Wl,--export-dynamic -Wl,--gc-sections,-z,noexecstack -pthread
fpicker.c:2:10: fatal error: frida-core.h: No such file or directory
    2 | #include "frida-core.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
In file included from /usr/include/string.h:495,
                 from frida-core-linux.h:22131,
                 from fpicker.h:2,
                 from fp_communication.c:1:
In function ‘strncpy’,
    inlined from ‘create_communication_map’ at fp_communication.c:257:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 12 bytes from a string of the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:11: fpicker-linux] Error 1

I can compile it successfully if I re-patch it (frida-core-devkit-15.2.2-linux-x86_64)

./
├── aflpp-ios.patch
├── assets
│   └── fpicker_logo.png
├── examples
│   ├── protocol_example
│   │   ├── in
│   │   │   └── 1
│   │   ├── protocol_example.c
│   │   ├── README.md
│   │   ├── test-fuzzer.js
│   │   └── wisec21_tutorial_frida_fuzzing.pdf
│   ├── test
│   │   ├── in
│   │   │   ├── 0
│   │   │   └── 1
│   │   ├── Makefile
│   │   ├── test.c
│   │   └── test-fuzzer.js
│   └── test-network
│       ├── in
│       │   ├── 0
│       │   └── 1
│       ├── Makefile
│       ├── test-network.c
│       └── test-network-fuzzer.js
├── fp_afl_mode.c
├── fp_communication.c
├── fpicker.c
├── fpicker.h
├── fp_standalone_mode.c
├── frida-core.h
├── frida-core-linux.h
├── harness
│   ├── darwin-shm.js
│   ├── fuzzer.js
│   └── stalker-instrumentation.js
├── libfrida-core-linux.a
├── LICENSE
├── Makefile
└── README.md

syc@ubuntu:~/Downloads/fpicker-main$ make fpicker-linux
cc -fPIC -m64 -ffunction-sections -fdata-sections -Wall -Wno-format -Os -pipe -g3 fpicker.c fp_communication.c fp_standalone_mode.c fp_afl_mode.c -o fpicker -L. -lfrida-core-linux -ldl -lm -lresolv -lrt -Wl,--export-dynamic -Wl,--gc-sections,-z,noexecstack -pthread
In file included from /usr/include/string.h:495,
                 from frida-core-linux.h:22131,
                 from fpicker.h:2,
                 from fp_communication.c:1:
In function ‘strncpy’,
    inlined from ‘create_communication_map’ at fp_communication.c:257:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 12 bytes from a string of the same length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Is this right?

ZERO-A-ONE avatar Apr 15 '23 15:04 ZERO-A-ONE