summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/HPMDataCheck.h30
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc6
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc12
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc3
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc80
5 files changed, 116 insertions, 15 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index d92591501..e24ec04b8 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -344,23 +344,23 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#define LOGIN_LCLIF_H
#endif // LOGIN_LCLIF_H
#ifdef LOGIN_LCLIF_P_H
+ { "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_OTP", sizeof(struct PACKET_CA_LOGIN_OTP), 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 },
{ "lclif_interface_dbs", sizeof(struct lclif_interface_dbs), SERVER_TYPE_LOGIN },
{ "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_OTP", sizeof(struct packet_CA_LOGIN_OTP), 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
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index ea1aa85a4..eb81ed693 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -4072,6 +4072,10 @@ typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) (
typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_LOGIN_OTP) (int *fd, struct login_session_data **sd);
typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_LOGIN_OTP) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
+typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) (int *fd, struct login_session_data **sd);
+typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
+typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_OTP_CODE) (int *fd, struct login_session_data **sd);
+typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_OTP_CODE) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_REQ_HASH) (int *fd, struct login_session_data **sd);
typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_REQ_HASH) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_CHARSERVERCONNECT) (int *fd, struct login_session_data **sd);
@@ -4354,6 +4358,8 @@ typedef bool (*HPMHOOK_pre_login_client_login) (int *fd, struct login_session_da
typedef bool (*HPMHOOK_post_login_client_login) (bool retVal___, int fd, struct login_session_data *sd);
typedef bool (*HPMHOOK_pre_login_client_login_otp) (int *fd, struct login_session_data **sd);
typedef bool (*HPMHOOK_post_login_client_login_otp) (bool retVal___, int fd, struct login_session_data *sd);
+typedef void (*HPMHOOK_pre_login_client_login_mobile_otp_request) (int *fd, struct login_session_data **sd);
+typedef void (*HPMHOOK_post_login_client_login_mobile_otp_request) (int fd, struct login_session_data *sd);
typedef void (*HPMHOOK_pre_login_char_server_connection_status) (int *fd, struct login_session_data **sd, uint8 *status);
typedef void (*HPMHOOK_post_login_char_server_connection_status) (int fd, struct login_session_data *sd, uint8 status);
typedef void (*HPMHOOK_pre_login_parse_request_connection) (int *fd, struct login_session_data **sd, const char **ip, uint32 *ipl);
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index 35dea3ce7..20607bdfd 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -204,6 +204,10 @@ struct {
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post;
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre;
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_OTP_post;
+ struct HPMHookPoint *HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre;
+ struct HPMHookPoint *HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post;
+ struct HPMHookPoint *HP_PRIV__lclif_parse_CA_OTP_CODE_pre;
+ struct HPMHookPoint *HP_PRIV__lclif_parse_CA_OTP_CODE_post;
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_REQ_HASH_pre;
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_REQ_HASH_post;
struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre;
@@ -436,6 +440,8 @@ struct {
struct HPMHookPoint *HP_login_client_login_post;
struct HPMHookPoint *HP_login_client_login_otp_pre;
struct HPMHookPoint *HP_login_client_login_otp_post;
+ struct HPMHookPoint *HP_login_client_login_mobile_otp_request_pre;
+ struct HPMHookPoint *HP_login_client_login_mobile_otp_request_post;
struct HPMHookPoint *HP_login_char_server_connection_status_pre;
struct HPMHookPoint *HP_login_char_server_connection_status_post;
struct HPMHookPoint *HP_login_parse_request_connection_pre;
@@ -997,6 +1003,10 @@ struct {
int HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post;
int HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre;
int HP_PRIV__lclif_parse_CA_LOGIN_OTP_post;
+ int HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre;
+ int HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post;
+ int HP_PRIV__lclif_parse_CA_OTP_CODE_pre;
+ int HP_PRIV__lclif_parse_CA_OTP_CODE_post;
int HP_PRIV__lclif_parse_CA_REQ_HASH_pre;
int HP_PRIV__lclif_parse_CA_REQ_HASH_post;
int HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre;
@@ -1229,6 +1239,8 @@ struct {
int HP_login_client_login_post;
int HP_login_client_login_otp_pre;
int HP_login_client_login_otp_post;
+ int HP_login_client_login_mobile_otp_request_pre;
+ int HP_login_client_login_mobile_otp_request_post;
int HP_login_char_server_connection_status_pre;
int HP_login_char_server_connection_status_post;
int HP_login_parse_request_connection_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index b03162550..20667f45f 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -126,6 +126,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(lclif->p->parse_CA_LOGIN_HAN, HP_PRIV__lclif_parse_CA_LOGIN_HAN) },
{ HP_POP(lclif->p->parse_CA_SSO_LOGIN_REQ, HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) },
{ HP_POP(lclif->p->parse_CA_LOGIN_OTP, HP_PRIV__lclif_parse_CA_LOGIN_OTP) },
+ { HP_POP(lclif->p->parse_CA_ACK_MOBILE_OTP, HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) },
+ { HP_POP(lclif->p->parse_CA_OTP_CODE, HP_PRIV__lclif_parse_CA_OTP_CODE) },
{ HP_POP(lclif->p->parse_CA_REQ_HASH, HP_PRIV__lclif_parse_CA_REQ_HASH) },
{ HP_POP(lclif->p->parse_CA_CHARSERVERCONNECT, HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT) },
/* libconfig_interface */
@@ -244,6 +246,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(login->auth_failed, HP_login_auth_failed) },
{ HP_POP(login->client_login, HP_login_client_login) },
{ HP_POP(login->client_login_otp, HP_login_client_login_otp) },
+ { HP_POP(login->client_login_mobile_otp_request, HP_login_client_login_mobile_otp_request) },
{ HP_POP(login->char_server_connection_status, HP_login_char_server_connection_status) },
{ HP_POP(login->parse_request_connection, HP_login_parse_request_connection) },
{ HP_POP(login->config_set_defaults, HP_login_config_set_defaults) },
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index c4359a2ad..f556c621d 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -2409,6 +2409,60 @@ enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_OTP(int fd, struct login_sess
}
return retVal___;
}
+enum parsefunc_rcode HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP(int fd, struct login_session_data *sd) {
+ int hIndex = 0;
+ enum parsefunc_rcode retVal___ = PACKET_UNKNOWN;
+ if (HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre > 0) {
+ enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_ACK_MOBILE_OTP(fd, sd);
+ }
+ if (HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post > 0) {
+ enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fd, sd);
+ }
+ }
+ return retVal___;
+}
+enum parsefunc_rcode HP_PRIV__lclif_parse_CA_OTP_CODE(int fd, struct login_session_data *sd) {
+ int hIndex = 0;
+ enum parsefunc_rcode retVal___ = PACKET_UNKNOWN;
+ if (HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_pre > 0) {
+ enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_OTP_CODE_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_OTP_CODE(fd, sd);
+ }
+ if (HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_post > 0) {
+ enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_OTP_CODE_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, fd, sd);
+ }
+ }
+ return retVal___;
+}
enum parsefunc_rcode HP_PRIV__lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd) {
int hIndex = 0;
enum parsefunc_rcode retVal___ = PACKET_UNKNOWN;
@@ -5521,6 +5575,32 @@ bool HP_login_client_login_otp(int fd, struct login_session_data *sd) {
}
return retVal___;
}
+void HP_login_client_login_mobile_otp_request(int fd, struct login_session_data *sd) {
+ int hIndex = 0;
+ if (HPMHooks.count.HP_login_client_login_mobile_otp_request_pre > 0) {
+ void (*preHookFunc) (int *fd, struct login_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_mobile_otp_request_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_login_client_login_mobile_otp_request_pre[hIndex].func;
+ preHookFunc(&fd, &sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.login.client_login_mobile_otp_request(fd, sd);
+ }
+ if (HPMHooks.count.HP_login_client_login_mobile_otp_request_post > 0) {
+ void (*postHookFunc) (int fd, struct login_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_mobile_otp_request_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_login_client_login_mobile_otp_request_post[hIndex].func;
+ postHookFunc(fd, sd);
+ }
+ }
+ return;
+}
void HP_login_char_server_connection_status(int fd, struct login_session_data *sd, uint8 status) {
int hIndex = 0;
if (HPMHooks.count.HP_login_char_server_connection_status_pre > 0) {