Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/JoeyJiao/AFL
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyJiao committed Dec 20, 2019
2 parents 327eb39 + 75d6ee4 commit 1970cbc
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 2 deletions.
140 changes: 140 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
cc_defaults {
name: "afl-defaults",

cflags: [
"-funroll-loops",
"-Wno-pointer-sign",
"-Wno-pointer-arith",
"-Wno-sign-compare",
"-Wno-unused-parameter",
"-Wno-unused-function",
"-Wno-format",
"-Wno-user-defined-warnings",
"-DUSE_TRACE_PC=1",
"-DBIN_PATH=\"out/host/linux-x86/bin\"",
"-DDOC_PATH=\"out/host/linux-x86/shared/doc/afl\"",
"-D__USE_GNU",
],
}

cc_binary {
name: "afl-fuzz",
static_executable: true,
host_supported: true,

defaults: [
"afl-defaults",
],

srcs: [
"afl-fuzz.c",
],
}

cc_binary {
name: "afl-showmap",
static_executable: true,
host_supported: true,

defaults: [
"afl-defaults",
],

srcs: [
"afl-showmap.c",
],
}

cc_binary {
name: "afl-tmin",
static_executable: true,
host_supported: true,

defaults: [
"afl-defaults",
],

srcs: [
"afl-tmin.c",
],
}

cc_binary {
name: "afl-analyze",
static_executable: true,
host_supported: true,

defaults: [
"afl-defaults",
],

srcs: [
"afl-analyze.c",
],
}

cc_binary {
name: "afl-gotcpu",
static_executable: true,
host_supported: true,

defaults: [
"afl-defaults",
],

srcs: [
"afl-gotcpu.c",
],
}

cc_binary_host {
name: "afl-clang-fast",
static_executable: true,

defaults: [
"afl-defaults",
],

cflags: [
"-D__ANDROID__",
"-DAFL_PATH=\"out/host/linux-x86/lib64\"",
],

srcs: [
"llvm_mode/afl-clang-fast.c",
],
}

cc_binary_host {
name: "afl-clang-fast++",
static_executable: true,

defaults: [
"afl-defaults",
],

cflags: [
"-D__ANDROID__",
"-DAFL_PATH=\"out/host/linux-x86/lib64\"",
],

srcs: [
"llvm_mode/afl-clang-fast.c",
],
}

cc_library_static {
name: "afl-llvm-rt",
compile_multilib: "both",
vendor_available: true,
host_supported: true,
recovery_available: true,

defaults: [
"afl-defaults",
],

srcs: [
"llvm_mode/afl-llvm-rt.o.c",
],
}
2 changes: 1 addition & 1 deletion afl-gotcpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ int main(int argc, char** argv) {

if (util_perc < 110) {

SAYF(" Core #%u: " cLGN "AVAILABLE\n" cRST, i);
SAYF(" Core #%u: " cLGN "AVAILABLE " cRST "(%u%%)\n", i, util_perc);
exit(0);

} else if (util_perc < 250) {
Expand Down
238 changes: 238 additions & 0 deletions dictionaries/regexp.dict
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
#
# AFL dictionary for JS regex
# ---------------------------
#
# Contains various regular expressions.
#
# Created by Yang Guo <[email protected]>
#
"?"
"abc"
"()"
"[]"
"abc|def"
"abc|def|ghi"
"^xxx$"
"ab\\b\\d\\bcd"
"\\w|\\d"
"a*?"
"abc+"
"abc+?"
"xyz?"
"xyz??"
"xyz{0,1}"
"xyz{0,1}?"
"xyz{93}"
"xyz{1,32}"
"xyz{1,32}?"
"xyz{1,}"
"xyz{1,}?"
"a\\fb\\nc\\rd\\te\\vf"
"a\\nb\\bc"
"(?:foo)"
"(?: foo )"
"foo|(bar|baz)|quux"
"foo(?=bar)baz"
"foo(?!bar)baz"
"foo(?<=bar)baz"
"foo(?<!bar)baz"
"()"
"(?=)"
"[]"
"[x]"
"[xyz]"
"[a-zA-Z0-9]"
"[-123]"
"[^123]"
"]"
"}"
"[a-b-c]"
"[x\\dz]"
"[\\d-z]"
"[\\d-\\d]"
"[z-\\d]"
"\\cj\\cJ\\ci\\cI\\ck\\cK"
"\\c!"
"\\c_"
"\\c~"
"[\\c!]"
"[\\c_]"
"[\\c~]"
"[\\ca]"
"[\\cz]"
"[\\cA]"
"[\\cZ]"
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"{z}"
"{1z}"
"{12,"
"{12,3b"
"a"
"abc"
"a[bc]d"
"a|bc"
"ab|c"
"a||bc"
"(?:ab)"
"(?:ab|cde)"
"(?:ab)|cde"
"(ab)"
"(ab|cde)"
"(ab)\\1"
"(ab|cde)\\1"
"(?:ab)?"
"(?:ab)+"
"a?"
"a+"
"a??"
"a*?"
"a+?"
"(?:a?)?"
"(?:a+)?"
"(?:a?)+"
"(?:a*)+"
"(?:a+)+"
"(?:a?)*"
"(?:a*)*"
"(?:a+)*"
"a{0}"
"(?:a+){0,0}"
"a*b"
"a+b"
"a*b|c"
"a+b|c"
"(?:a{5,1000000}){3,1000000}"
"(?:ab){4,7}"
"a\\bc"
"a\\sc"
"a\\Sc"
"a(?=b)c"
"a(?=bbb|bb)c"
"a(?!bbb|bb)c"
"\xe2\x81\xa3"
"[\xe2\x81\xa3]"
"\xed\xb0\x80"
"\xed\xa0\x80"
"(\xed\xb0\x80)\x01"
"((\xed\xa0\x80))\x02"
"\xf0\x9f\x92\xa9"
"\x01"
"\x0f"
"[-\xf0\x9f\x92\xa9]+"
"[\xf0\x9f\x92\xa9-\xf4\x8f\xbf\xbf]"
"(?<=)"
"(?<=a)"
"(?<!)"
"(?<!a)"
"(?<a>)"
"(?<a>.)"
"(?<a>.)\\k<a>"
"\\p{Script=Greek}"
"\\P{sc=Greek}"
"\\p{Script_Extensions=Greek}"
"\\P{scx=Greek}"
"\\p{General_Category=Decimal_Number}"
"\\P{gc=Decimal_Number}"
"\\p{gc=Nd}"
"\\P{Decimal_Number}"
"\\p{Nd}"
"\\P{Any}"
"\\p{Changes_When_NFKC_Casefolded}"
Loading

0 comments on commit 1970cbc

Please sign in to comment.