about summary refs log tree commit diff
path: root/frida_mode/src/entry.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-07-19 10:54:12 +0200
committerGitHub <noreply@github.com>2021-07-19 10:54:12 +0200
commit815161827689c339d335233b7b232ac9b120b79b (patch)
tree4e686574ccf1f47cea79fc24514c8455e3a1fbc1 /frida_mode/src/entry.c
parent9321a24e682b5c8bf6278961bd014cb883b87295 (diff)
parentcc57cc5f463e9b79980c2087d19b4a1e1360ec52 (diff)
downloadafl++-815161827689c339d335233b7b232ac9b120b79b.tar.gz
Merge branch 'release' into stable
Diffstat (limited to 'frida_mode/src/entry.c')
-rw-r--r--frida_mode/src/entry.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/frida_mode/src/entry.c b/frida_mode/src/entry.c
index a0ffd028..e71386a0 100644
--- a/frida_mode/src/entry.c
+++ b/frida_mode/src/entry.c
@@ -1,46 +1,35 @@
-#include "frida-gumjs.h"
+#include "frida-gum.h"
 
 #include "debug.h"
 
 #include "entry.h"
 #include "instrument.h"
-#include "persistent.h"
-#include "ranges.h"
 #include "stalker.h"
-#include "stats.h"
 #include "util.h"
 
 extern void __afl_manual_init();
 
-guint64  entry_point = 0;
-gboolean entry_reached = FALSE;
+guint64 entry_start = 0;
 
 static void entry_launch(void) {
 
-  OKF("Entry point reached");
   __afl_manual_init();
 
   /* Child here */
-  instrument_on_fork();
-  stats_on_fork();
-
-}
-
-void entry_config(void) {
-
-  entry_point = util_read_address("AFL_ENTRYPOINT");
+  previous_pc = 0;
 
 }
 
 void entry_init(void) {
 
-  OKF("entry_point: 0x%016" G_GINT64_MODIFIER "X", entry_point);
+  entry_start = util_read_address("AFL_ENTRYPOINT");
+  OKF("entry_point: 0x%016" G_GINT64_MODIFIER "X", entry_start);
 
 }
 
-void entry_start(void) {
+void entry_run(void) {
 
-  if (entry_point == 0) { entry_launch(); }
+  if (entry_start == 0) { entry_launch(); }
 
 }
 
@@ -55,16 +44,6 @@ static void entry_callout(GumCpuContext *cpu_context, gpointer user_data) {
 void entry_prologue(GumStalkerIterator *iterator, GumStalkerOutput *output) {
 
   UNUSED_PARAMETER(output);
-  OKF("AFL_ENTRYPOINT reached");
-
-  if (persistent_start == 0) {
-
-    entry_reached = TRUE;
-    ranges_exclude();
-    stalker_trust();
-
-  }
-
   gum_stalker_iterator_put_callout(iterator, entry_callout, NULL, NULL);
 
 }