diff options
author | Haru <haru@dotalux.com> | 2016-03-13 19:57:54 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-07-12 20:58:33 +0200 |
commit | ad05eb4f2e531f5a9aec6f27d2f69fd53b6525ac (patch) | |
tree | d71411780996b4351f1ae13c435d8746ac8e989e /src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | |
parent | 1a99077d1cfa1d66b984fec9b956ed8fcd8c4cff (diff) | |
download | hercules-ad05eb4f2e531f5a9aec6f27d2f69fd53b6525ac.tar.gz hercules-ad05eb4f2e531f5a9aec6f27d2f69fd53b6525ac.tar.bz2 hercules-ad05eb4f2e531f5a9aec6f27d2f69fd53b6525ac.tar.xz hercules-ad05eb4f2e531f5a9aec6f27d2f69fd53b6525ac.zip |
HPM Hooks Update
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_login.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_login.Hooks.inc | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index 23e2e2c90..7771ca05d 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -911,6 +911,59 @@ void HP_DB_final(void) { } return; } +/* des_interface */ +void HP_des_decrypt_block(struct des_bit64 *block) { + int hIndex = 0; + if( HPMHooks.count.HP_des_decrypt_block_pre ) { + void (*preHookFunc) (struct des_bit64 **block); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_des_decrypt_block_pre[hIndex].func; + preHookFunc(&block); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.des.decrypt_block(block); + } + if( HPMHooks.count.HP_des_decrypt_block_post ) { + void (*postHookFunc) (struct des_bit64 *block); + for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_des_decrypt_block_post[hIndex].func; + postHookFunc(block); + } + } + return; +} +void HP_des_decrypt(unsigned char *data, size_t size) { + int hIndex = 0; + if( HPMHooks.count.HP_des_decrypt_pre ) { + void (*preHookFunc) (unsigned char **data, size_t *size); + *HPMforce_return = false; + for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_pre; hIndex++ ) { + preHookFunc = HPMHooks.list.HP_des_decrypt_pre[hIndex].func; + preHookFunc(&data, &size); + } + if( *HPMforce_return ) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.des.decrypt(data, size); + } + if( HPMHooks.count.HP_des_decrypt_post ) { + void (*postHookFunc) (unsigned char *data, size_t size); + for(hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_post; hIndex++ ) { + postHookFunc = HPMHooks.list.HP_des_decrypt_post[hIndex].func; + postHookFunc(data, size); + } + } + return; +} /* lclif_interface */ void HP_lclif_init(void) { int hIndex = 0; |