From ad05eb4f2e531f5a9aec6f27d2f69fd53b6525ac Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 13 Mar 2016 19:57:54 +0100 Subject: HPM Hooks Update Signed-off-by: Haru --- src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 53 ++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'src/plugins/HPMHooking/HPMHooking_char.Hooks.inc') diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index b1f2f58b7..df995eee9 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -5100,6 +5100,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; +} /* geoip_interface */ const char* HP_geoip_getcountry(uint32 ipnum) { int hIndex = 0; -- cgit v1.2.3-60-g2f50