iagox86 / dnscat2

BSD 3-Clause "New" or "Revised" License
3.4k stars 599 forks source link

Client Compilation fails on Apple Silicon #187

Open RiRa12621 opened 9 months ago

RiRa12621 commented 9 months ago

Description

Compiling the client using the make command fails on apple Silicon based Macs

How to reproduce

Expected behaviour

Compiles the client

Observed behaviour

$ make
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o controller/packet.o controller/packet.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o controller/session.o controller/session.c
controller/session.c:187:22: warning: expression which evaluates to zero treated as a null pointer constant of type 'uint8_t *' (aka 'unsigned char *') [-Wnon-literal-null-conversion]
              return FALSE;
                     ^~~~~
1 warning generated.
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o controller/controller.o controller/controller.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o drivers/driver.o drivers/driver.c
cc -c --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g -o drivers/command/driver_command.o drivers/command/driver_command.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o drivers/command/command_packet.o drivers/command/command_packet.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o drivers/driver_console.o drivers/driver_console.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o drivers/driver_exec.o drivers/driver_exec.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o drivers/driver_ping.o drivers/driver_ping.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o libs/buffer.o libs/buffer.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o libs/crypto/encryptor.o libs/crypto/encryptor.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o libs/crypto/micro-ecc/uECC.o libs/crypto/micro-ecc/uECC.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o libs/crypto/salsa20.o libs/crypto/salsa20.c
cc --std=c89 -I. -Wall -D_DEFAULT_SOURCE  -Wformat -Wformat-security -g   -c -o libs/crypto/sha3.o libs/crypto/sha3.c
In file included from libs/crypto/sha3.c:22:
libs/crypto/byte_order.h:59:3: error: "Can't detect CPU architechture"
# error "Can't detect CPU architechture"
  ^
1 error generated.
make: *** [libs/crypto/sha3.o] Error 1

Environment

$ uname -a
Darwin F7MQJ63XL2 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:43:05 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6020 arm64

Apple MacBook Pro M2 Max, MacOS Sonoma 14.0 (23A344)