From 21df0346db1f141b8b2ef495ef91a2f56e23bbc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AD=B1=E5=91=A8XiaoZhou?= Date: Sat, 8 Nov 2025 19:25:09 +0800 Subject: [PATCH] [Update] Read Config --- includes/JuiceAgent/JuiceAgent.h | 12 +- includes/tinytoml/toml.h | 2050 ++++++++++++++++++++++++++++++ src/agent/libagent.cpp | 60 +- 3 files changed, 2116 insertions(+), 6 deletions(-) create mode 100644 includes/tinytoml/toml.h diff --git a/includes/JuiceAgent/JuiceAgent.h b/includes/JuiceAgent/JuiceAgent.h index 4ee91a5..fccdec6 100644 --- a/includes/JuiceAgent/JuiceAgent.h +++ b/includes/JuiceAgent/JuiceAgent.h @@ -4,8 +4,18 @@ #define INJECT_PATH_MAX 4096 typedef struct InjectParams{ - char JuiceLoaderJarPath[INJECT_PATH_MAX]; char ConfigDir[INJECT_PATH_MAX]; } InjectParams; +typedef struct _InjectionInfo { + char BootstrapAPIPath[INJECT_PATH_MAX]; + char JuiceLoaderJarPath[INJECT_PATH_MAX]; + char EntryJarPath[INJECT_PATH_MAX]; + char EntryClass[INJECT_PATH_MAX]; + char EntryMethod[INJECT_PATH_MAX]; + char InjectionDir[INJECT_PATH_MAX]; +} InjectionInfoType; + +extern InjectionInfoType InjectionInfo; + #endif // JUICEAGENT_H \ No newline at end of file diff --git a/includes/tinytoml/toml.h b/includes/tinytoml/toml.h new file mode 100644 index 0000000..1765d0e --- /dev/null +++ b/includes/tinytoml/toml.h @@ -0,0 +1,2050 @@ +#ifndef TINYTOML_H_ +#define TINYTOML_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace toml { + +// ---------------------------------------------------------------------- +// Declarations + +class Value; +typedef std::chrono::system_clock::time_point Time; +typedef std::vector Array; +typedef std::map Table; + +namespace internal { +template struct call_traits_value { + typedef T return_type; +}; +template struct call_traits_ref { + typedef const T& return_type; +}; +} // namespace internal + +template struct call_traits; +template<> struct call_traits : public internal::call_traits_value {}; +template<> struct call_traits : public internal::call_traits_value {}; +template<> struct call_traits : public internal::call_traits_value {}; +template<> struct call_traits : public internal::call_traits_value {}; +template<> struct call_traits : public internal::call_traits_ref {}; +template<> struct call_traits