mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 02:58:08 +00:00
code format
This commit is contained in:
@ -27,9 +27,9 @@
|
||||
#define __AFLCOMMON_H
|
||||
#include "types.h"
|
||||
|
||||
extern u8 *target_path; /* Path to target binary */
|
||||
extern u8* target_path; /* Path to target binary */
|
||||
|
||||
void detect_file_args(char **argv, u8 *prog_in);
|
||||
void detect_file_args(char** argv, u8* prog_in);
|
||||
|
||||
char** get_qemu_argv(u8* own_loc, char** argv, int argc);
|
||||
char** get_wine_argv(u8* own_loc, char** argv, int argc);
|
||||
|
@ -1 +1,2 @@
|
||||
|
||||
|
||||
|
@ -760,7 +760,8 @@ static void usage(u8* argv0) {
|
||||
" -m megs - memory limit for child process (%d MB)\n"
|
||||
" -Q - use binary-only instrumentation (QEMU mode)\n"
|
||||
" -U - use unicorn-based instrumentation (Unicorn mode)\n"
|
||||
" -W - use qemu-based instrumentation with Wine (Wine mode)\n\n"
|
||||
" -W - use qemu-based instrumentation with Wine (Wine "
|
||||
"mode)\n\n"
|
||||
|
||||
"Analysis settings:\n\n"
|
||||
|
||||
@ -834,7 +835,8 @@ static void find_binary(u8* fname) {
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
s32 opt;
|
||||
u8 mem_limit_given = 0, timeout_given = 0, qemu_mode = 0, unicorn_mode = 0, use_wine = 0;
|
||||
u8 mem_limit_given = 0, timeout_given = 0, qemu_mode = 0, unicorn_mode = 0,
|
||||
use_wine = 0;
|
||||
char** use_argv;
|
||||
|
||||
doc_path = access(DOC_PATH, F_OK) ? "docs" : DOC_PATH;
|
||||
@ -970,6 +972,7 @@ int main(int argc, char** argv) {
|
||||
use_argv = get_qemu_argv(argv[0], argv + optind, argc - optind);
|
||||
|
||||
} else
|
||||
|
||||
use_argv = argv + optind;
|
||||
|
||||
SAYF("\n");
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
u8 *target_path; /* Path to target binary */
|
||||
u8* target_path; /* Path to target binary */
|
||||
|
||||
void detect_file_args(char** argv, u8* prog_in) {
|
||||
|
||||
@ -97,7 +97,6 @@ void detect_file_args(char** argv, u8* prog_in) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Rewrite argv for QEMU. */
|
||||
|
||||
char** get_qemu_argv(u8* own_loc, char** argv, int argc) {
|
||||
@ -234,7 +233,7 @@ char** get_wine_argv(u8* own_loc, char** argv, int argc) {
|
||||
|
||||
ck_free(own_copy);
|
||||
|
||||
u8 *ncp = BIN_PATH "/afl-qemu-trace";
|
||||
u8* ncp = BIN_PATH "/afl-qemu-trace";
|
||||
|
||||
if (!access(ncp, X_OK)) {
|
||||
|
||||
@ -263,10 +262,10 @@ char** get_wine_argv(u8* own_loc, char** argv, int argc) {
|
||||
" instrumented at compile time with afl-gcc. It is also possible to "
|
||||
"use it as a\n"
|
||||
" traditional \"dumb\" fuzzer by specifying '-n' in the command "
|
||||
"line.\n", ncp);
|
||||
"line.\n",
|
||||
ncp);
|
||||
|
||||
FATAL("Failed to locate '%s'.", ncp);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -132,8 +132,8 @@ int main(int argc, char** argv) {
|
||||
gettimeofday(&tv, &tz);
|
||||
init_seed = tv.tv_sec ^ tv.tv_usec ^ getpid();
|
||||
|
||||
while ((opt = getopt(argc, argv, "+i:o:f:m:t:T:dnCB:S:M:x:QUWe:p:s:V:E:L:h")) >
|
||||
0)
|
||||
while ((opt = getopt(argc, argv,
|
||||
"+i:o:f:m:t:T:dnCB:S:M:x:QUWe:p:s:V:E:L:h")) > 0)
|
||||
|
||||
switch (opt) {
|
||||
|
||||
@ -728,6 +728,7 @@ int main(int argc, char** argv) {
|
||||
use_argv = get_qemu_argv(argv[0], argv + optind, argc - optind);
|
||||
|
||||
} else
|
||||
|
||||
use_argv = argv + optind;
|
||||
|
||||
perform_dry_run(use_argv);
|
||||
|
@ -498,7 +498,8 @@ static void find_binary(u8* fname) {
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
s32 opt;
|
||||
u8 mem_limit_given = 0, timeout_given = 0, qemu_mode = 0, unicorn_mode = 0, use_wine = 0;
|
||||
u8 mem_limit_given = 0, timeout_given = 0, qemu_mode = 0, unicorn_mode = 0,
|
||||
use_wine = 0;
|
||||
u32 tcnt = 0;
|
||||
char** use_argv;
|
||||
|
||||
@ -678,6 +679,7 @@ int main(int argc, char** argv) {
|
||||
use_argv = get_qemu_argv(argv[0], argv + optind, argc - optind);
|
||||
|
||||
} else
|
||||
|
||||
use_argv = argv + optind;
|
||||
|
||||
run_target(use_argv);
|
||||
|
@ -934,7 +934,8 @@ static void usage(u8* argv0) {
|
||||
" -m megs - memory limit for child process (%d MB)\n"
|
||||
" -Q - use binary-only instrumentation (QEMU mode)\n"
|
||||
" -U - use unicorn-based instrumentation (Unicorn mode)\n"
|
||||
" -W - use qemu-based instrumentation with Wine (Wine mode)\n\n"
|
||||
" -W - use qemu-based instrumentation with Wine (Wine "
|
||||
"mode)\n\n"
|
||||
" (Not necessary, here for consistency with other afl-* "
|
||||
"tools)\n\n"
|
||||
|
||||
@ -1025,7 +1026,8 @@ static void read_bitmap(u8* fname) {
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
s32 opt;
|
||||
u8 mem_limit_given = 0, timeout_given = 0, qemu_mode = 0, unicorn_mode = 0, use_wine = 0;
|
||||
u8 mem_limit_given = 0, timeout_given = 0, qemu_mode = 0, unicorn_mode = 0,
|
||||
use_wine = 0;
|
||||
char** use_argv;
|
||||
|
||||
doc_path = access(DOC_PATH, F_OK) ? "docs" : DOC_PATH;
|
||||
@ -1191,6 +1193,7 @@ int main(int argc, char** argv) {
|
||||
use_argv = get_qemu_argv(argv[0], argv + optind, argc - optind);
|
||||
|
||||
} else
|
||||
|
||||
use_argv = argv + optind;
|
||||
|
||||
exact_mode = !!getenv("AFL_TMIN_EXACT");
|
||||
|
Reference in New Issue
Block a user