diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-11-15 17:51:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-12-12 21:18:05 +0300 |
commit | 5964302e6cd5a8cceda5b7fd3cb85f8081815d7d (patch) | |
tree | 3b03e9daec8e84df2127a271c799a8ecaea23380 /src/plugins/HPMHooking | |
parent | 175de7f89d615491f2aa3a2d6bdd3f08bb24ae49 (diff) | |
download | hercules-5964302e6cd5a8cceda5b7fd3cb85f8081815d7d.tar.gz hercules-5964302e6cd5a8cceda5b7fd3cb85f8081815d7d.tar.bz2 hercules-5964302e6cd5a8cceda5b7fd3cb85f8081815d7d.tar.xz hercules-5964302e6cd5a8cceda5b7fd3cb85f8081815d7d.zip |
Update HPM.
Diffstat (limited to 'src/plugins/HPMHooking')
4 files changed, 101 insertions, 0 deletions
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) { |