Raised This Month: $ Target: $400
 0% 

any difference between the Orpheu and chooker ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-06-2013 , 09:08   any difference between the Orpheu and chooker ?
Reply With Quote #1

As the title,
Orpheu code and the signature:

Code:
#include <amxmodx> #include <orpheu> #define PLUGIN_NAME "NewPlugin" #define PLUGIN_VERSION  "0.1" #define PLUGIN_AUTHOR   "LittleKu-Lv" public plugin_precache() {     OrpheuRegisterHook(OrpheuGetFunction("SetProgressBarTime", "CBasePlayer"), "OnSetProgressBarTime"); } public plugin_init() {     register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR) } public OrpheuHookReturn:OnSetProgressBarTime(id, iTime) {     return OrpheuSupercede; }

Code:
{
	"name" : "SetProgressBarTime",
	"class" : "CBasePlayer",
	"library" : "mod",
	"arguments" : 
	[
		{
			"type" : "int"
		}
	],
	"identifiers":
	[
		{
			"os"    : "windows",
			"mod"   : "cstrike",
			"value" : [0x51,0x53,0x55,0x56,0x57,0x8B,"*","*","*",0x33,"*",0x3B,"*",0x8B,"*",0x74],
		},
		{
			"os"    : "linux",
			"mod"   : "cstrike",
			"value" : "_ZN11CBasePlayer18SetProgressBarTimeEi"
		}
	]
}
chooker code:
Code:
#include "amxxmodule.h" #include "chooker.h" CHooker     HookerClass; CHooker*    Hooker = &HookerClass; #ifdef _WIN32     #define DUMMY_VAL 0     typedef int DUMMY;     typedef void    ( __fastcall *FuncSetProgressBarTime )  ( void*, DUMMY, int );     void __fastcall FuncSetProgressBarTime_Hook( void* pvPlayer, DUMMY, int iTime ); #else     typedef void    ( *FuncSetProgressBarTime ) ( void*, int );     void FuncSetProgressBarTime_Hook( void* pvPlayer, int iTime ); #endif CFunc*              FuncSetProgressBarTimeHook = NULL; FuncSetProgressBarTime  FuncSetProgressBarTimeOrig = NULL; #ifdef _WIN32     void __fastcall FuncSetProgressBarTime_Hook( void* pvPlayer, DUMMY, int iTime ) #else     void FuncSetProgressBarTime_Hook( void* pvPlayer, int iTime ) #endif     {             if( FuncSetProgressBarTimeHook->Restore() )             {                 FuncSetProgressBarTimeOrig( pvPlayer, DUMMY_VAL, iTime );                 FuncSetProgressBarTimeHook->Patch();             }             printf("\n\t\tSet Progress Bar Time .iTime is %i\n", iTime);     }     void OnMetaAttach() {     #ifdef _WIN32         FuncSetProgressBarTimeOrig = Hooker->MemorySearch< FuncSetProgressBarTime >( "0x51,0x53,0x55,0x56,0x57,0x8B,*,*,*,0x33,*,0x3B,*,0x8B,*,0x74", ( void* )MDLL_Spawn, FALSE );     #else         FuncSetProgressBarTimeOrig = Hooker->MemorySearch< FuncSetProgressBarTime>( "_ZN11CBasePlayer18SetProgressBarTimeEi", ( void* )MDLL_Spawn, TRUE );     #endif     FuncSetProgressBarTimeHook = Hooker->CreateHook( ( void* )FuncSetProgressBarTimeOrig, ( void* )FuncSetProgressBarTime_Hook, TRUE );     printf( "\n %s v%s - by %s.\n -\n", MODULE_NAME, MODULE_VERSION, MODULE_AUTHOR );     if( !FuncSetProgressBarTimeOrig )         printf( " Signature/symbol could not be found.\n\n" );     else if( !FuncSetProgressBarTimeHook )         printf( " Hook creation failed.\n\n" );     else         printf( " Loaded with success.\n\n" ); }

and the problem is chooker can find the function, but the Orpheu log a error message .
anything did I wrong ?
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-06-2013 , 10:34   Re: any difference between the Orpheu and chooker ?
Reply With Quote #2

And we have to guess what error you're talking about ?
__________________
Arkshine is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-06-2013 , 11:01   Re: any difference between the Orpheu and chooker ?
Reply With Quote #3

Sorry for my bad,
Orpheu log error message is :
Code:
[ORPHEU] Function "CBasePlayer::SetProgressBarTime" not found
L 06/06/2013 - 20:39:26: [AMXX] Run time error 10 (plugin "test.amxx") (native "OrpheuGetFunction") - debug not enabled!
L 06/06/2013 - 20:39:26: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 06/06/2013 - 20:42:58: Start of error session.
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-06-2013 , 12:20   Re: any difference between the Orpheu and chooker ?
Reply With Quote #4

Paste or attach the orpheu log file generated when you hit "orpheu config". It should say the file is not formatted properly.

Actually, looking at your copy-paste, in "..0x74]," the "," should be removed.

Always checking the output of the config parsing.
__________________

Last edited by Arkshine; 06-06-2013 at 12:23.
Arkshine is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-06-2013 , 13:26   Re: any difference between the Orpheu and chooker ?
Reply With Quote #5

the problem still exist !
Code:
                Parsing folder "CBasePlayer" started
                        Parsing file "SetProgressBarTime" started
                                Argument type "int" validated
                                Searching for signature "[0x51][0x53][0x55][0x56][0x57](...)" ... NOT FOUND
                        Parsing file "SetProgressBarTime" ended
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Old 06-06-2013, 14:34
Arkshine
This message has been deleted by Arkshine. Reason: nvm
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-06-2013 , 14:42   Re: any difference between the Orpheu and chooker ?
Reply With Quote #7

Code:
[0x51,0x53,0x55,0x56,0x57,0x8B,"*","*","*",0x33,"*",0x3B]
or
Code:
"0x51,0x53,0x55,0x56,0x57,0x8B,*,*,*,0x33,*,0x3B"
__________________

Last edited by Arkshine; 06-06-2013 at 14:42.
Arkshine is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-06-2013 , 21:37   Re: any difference between the Orpheu and chooker ?
Reply With Quote #8

problem has been solved.
not the signature.I just made ​​a stupid mistake.
all of the cod above are find !
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode