afl_frida: Add AFL_FRIDA_TEST_INPUT env to debug input
@@ -196,6 +196,7 @@ int main(int argc, char** argv) {
// END STEP 2
+ if (!getenv("AFL_FRIDA_TEST_INPUT")) {
gum_init_embedded();
if (!gum_stalker_is_supported()) {
@@ -290,6 +291,13 @@ int main(int argc, char** argv) {
g_object_unref(transformer);
gum_deinit_embedded();
+ } else {
+ char buf[8*1024] = {0};
+ int count = read(0, buf, sizeof(buf));
+ buf[8*1024-1] = '\0';
+ (*o_function)(buf, count);
+ }
+
return 0;
}
