summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/HPMDataCheck.h19
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc13
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc43
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.sources.inc1
5 files changed, 67 insertions, 13 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 048855edb..d68fa117a 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -276,6 +276,25 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define LOGIN_LCLIF_H
#endif // LOGIN_LCLIF_H
+ #ifdef LOGIN_LCLIF_P_H
+ { "lclif_interface_private", sizeof(struct lclif_interface_private), SERVER_TYPE_LOGIN },
+ { "packet_AC_ACCEPT_LOGIN", sizeof(struct packet_AC_ACCEPT_LOGIN), SERVER_TYPE_LOGIN },
+ { "packet_AC_REFUSE_LOGIN", sizeof(struct packet_AC_REFUSE_LOGIN), SERVER_TYPE_LOGIN },
+ { "packet_AC_REFUSE_LOGIN_R2", sizeof(struct packet_AC_REFUSE_LOGIN_R2), SERVER_TYPE_LOGIN },
+ { "packet_CA_CHARSERVERCONNECT", sizeof(struct packet_CA_CHARSERVERCONNECT), SERVER_TYPE_LOGIN },
+ { "packet_CA_CONNECT_INFO_CHANGED", sizeof(struct packet_CA_CONNECT_INFO_CHANGED), SERVER_TYPE_LOGIN },
+ { "packet_CA_EXE_HASHCHECK", sizeof(struct packet_CA_EXE_HASHCHECK), SERVER_TYPE_LOGIN },
+ { "packet_CA_LOGIN", sizeof(struct packet_CA_LOGIN), SERVER_TYPE_LOGIN },
+ { "packet_CA_LOGIN2", sizeof(struct packet_CA_LOGIN2), SERVER_TYPE_LOGIN },
+ { "packet_CA_LOGIN3", sizeof(struct packet_CA_LOGIN3), SERVER_TYPE_LOGIN },
+ { "packet_CA_LOGIN4", sizeof(struct packet_CA_LOGIN4), SERVER_TYPE_LOGIN },
+ { "packet_CA_LOGIN_HAN", sizeof(struct packet_CA_LOGIN_HAN), SERVER_TYPE_LOGIN },
+ { "packet_CA_LOGIN_PCBANG", sizeof(struct packet_CA_LOGIN_PCBANG), SERVER_TYPE_LOGIN },
+ { "packet_CA_SSO_LOGIN_REQ", sizeof(struct packet_CA_SSO_LOGIN_REQ), SERVER_TYPE_LOGIN },
+ { "packet_SC_NOTIFY_BAN", sizeof(struct packet_SC_NOTIFY_BAN), SERVER_TYPE_LOGIN },
+ #else
+ #define LOGIN_LCLIF_P_H
+ #endif // LOGIN_LCLIF_P_H
#ifdef LOGIN_LOGIN_H
{ "Login_Config", sizeof(struct Login_Config), SERVER_TYPE_LOGIN },
{ "client_hash_node", sizeof(struct client_hash_node), SERVER_TYPE_LOGIN },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index 537c88936..9775b94e4 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -110,8 +110,10 @@ struct {
struct HPMHookPoint *HP_lclif_parse_packet_post;
struct HPMHookPoint *HP_lclif_parse_pre;
struct HPMHookPoint *HP_lclif_parse_post;
- struct HPMHookPoint *HP_lclif_parse_sub_pre;
- struct HPMHookPoint *HP_lclif_parse_sub_post;
+ struct HPMHookPoint *HP_PRIV__lclif_packetdb_loaddb_pre;
+ struct HPMHookPoint *HP_PRIV__lclif_packetdb_loaddb_post;
+ struct HPMHookPoint *HP_PRIV__lclif_parse_sub_pre;
+ struct HPMHookPoint *HP_PRIV__lclif_parse_sub_post;
struct HPMHookPoint *HP_libconfig_read_pre;
struct HPMHookPoint *HP_libconfig_read_post;
struct HPMHookPoint *HP_libconfig_write_pre;
@@ -719,8 +721,10 @@ struct {
int HP_lclif_parse_packet_post;
int HP_lclif_parse_pre;
int HP_lclif_parse_post;
- int HP_lclif_parse_sub_pre;
- int HP_lclif_parse_sub_post;
+ int HP_PRIV__lclif_packetdb_loaddb_pre;
+ int HP_PRIV__lclif_packetdb_loaddb_post;
+ int HP_PRIV__lclif_parse_sub_pre;
+ int HP_PRIV__lclif_parse_sub_post;
int HP_libconfig_read_pre;
int HP_libconfig_read_post;
int HP_libconfig_write_pre;
@@ -1248,6 +1252,7 @@ struct {
struct core_interface core;
struct db_interface DB;
struct lclif_interface lclif;
+ struct lclif_interface_private PRIV__lclif;
struct libconfig_interface libconfig;
struct login_interface login;
struct malloc_interface iMalloc;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index a5adac2d0..bcfebf443 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -72,7 +72,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(lclif->packet, HP_lclif_packet) },
{ HP_POP(lclif->parse_packet, HP_lclif_parse_packet) },
{ HP_POP(lclif->parse, HP_lclif_parse) },
- { HP_POP(lclif->parse_sub, HP_lclif_parse_sub) },
+/* lclif_interface_private */
+ { HP_POP(lclif->p->packetdb_loaddb, HP_PRIV__lclif_packetdb_loaddb) },
+ { HP_POP(lclif->p->parse_sub, HP_PRIV__lclif_parse_sub) },
/* libconfig_interface */
{ HP_POP(libconfig->read, HP_libconfig_read) },
{ HP_POP(libconfig->write, HP_libconfig_write) },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index b7ff2b77b..81d31c99e 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -1182,14 +1182,41 @@ int HP_lclif_parse(int fd) {
}
return retVal___;
}
-enum parsefunc_rcode HP_lclif_parse_sub(int fd, struct login_session_data *sd) {
+/* lclif_interface_private */
+void HP_PRIV__lclif_packetdb_loaddb(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_PRIV__lclif_packetdb_loaddb_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.PRIV__lclif.packetdb_loaddb();
+ }
+ if( HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_PRIV__lclif_packetdb_loaddb_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+enum parsefunc_rcode HP_PRIV__lclif_parse_sub(int fd, struct login_session_data *sd) {
int hIndex = 0;
enum parsefunc_rcode retVal___ = PACKET_UNKNOWN;
- if( HPMHooks.count.HP_lclif_parse_sub_pre ) {
+ if( HPMHooks.count.HP_PRIV__lclif_parse_sub_pre ) {
enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data *sd);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_sub_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_lclif_parse_sub_pre[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_sub_pre[hIndex].func;
retVal___ = preHookFunc(&fd, sd);
}
if( *HPMforce_return ) {
@@ -1198,12 +1225,12 @@ enum parsefunc_rcode HP_lclif_parse_sub(int fd, struct login_session_data *sd) {
}
}
{
- retVal___ = HPMHooks.source.lclif.parse_sub(fd, sd);
+ retVal___ = HPMHooks.source.PRIV__lclif.parse_sub(fd, sd);
}
- if( HPMHooks.count.HP_lclif_parse_sub_post ) {
+ if( HPMHooks.count.HP_PRIV__lclif_parse_sub_post ) {
enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int *fd, struct login_session_data *sd);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_sub_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_lclif_parse_sub_post[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_sub_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &fd, sd);
}
}
diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
index 871facdc1..1c1927619 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
@@ -29,6 +29,7 @@ memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface));
memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface));
memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface));
memcpy(&HPMHooks.source.lclif, lclif, sizeof(struct lclif_interface));
+memcpy(&HPMHooks.source.PRIV__lclif, lclif->p, sizeof(struct lclif_interface_private));
memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface));
memcpy(&HPMHooks.source.login, login, sizeof(struct login_interface));
memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface));