Raised This Month: $32 Target: $400
 8% 

Orpheu: How to make signatures (of bytes)


Post New Thread Reply   
 
Thread Tools Display Modes
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-20-2012 , 04:45   Re: Orpheu: How to make signatures (of bytes)
Reply With Quote #41

You forget , et put spaces when you should not in the signature :

Try :

Code:
{
    "name" : "SV_SendServerinfo",
    "library" : "engine",
    "identifiers":
    [
        {
            "os" : "windows",
            "mod" : "cstrike",
            "value" : [0x55,0x8B,0xEC,0x81,0xEC,0x04,0x08,"*","*",0xD9,0x05,0x28,0x56,0xE5,0x01,0xD8]
        },
        {
            "os"    : "linux",
            "mod"   : "cstrike",
            "value" : "SV_SendServerinfo"
        }
    ]
}
__________________
Arkshine is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 04-20-2012 , 04:59   Re: Orpheu: How to make signatures (of bytes)
Reply With Quote #42

"class name must be equal to folder name"
how to fix it ?
forgive me I learning .
__________________
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 04-20-2012 , 05:04   Re: Orpheu: How to make signatures (of bytes)
Reply With Quote #43

Don't remember the error exactly ; this file should be put inside functions/ at the root (not in a sub-directory).
If not about parsing, show your code so.
__________________

Last edited by Arkshine; 04-20-2012 at 05:05.
Arkshine is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 04-20-2012 , 05:12   Re: Orpheu: How to make signatures (of bytes)
Reply With Quote #44

OK , I will try to explain it clear.

try to hook function is "SV_SendServerinfo"
and I found the windows version line here
Code:
.text:01D968E0 55                                            push    ebp
.text:01D968E1 8B EC                                         mov     ebp, esp
.text:01D968E3 81 EC 04 08 00 00                             sub     esp, 804h
.text:01D968E9 D9 05 28 56 E5 01                             fld     flt_1E55628
.text:01D968EF D8 1D AC E0 E2 01                             fcomp   ds:flt_1E2E0AC
.text:01D968F5 53                                            push    ebx
.text:01D968F6 56                                            push    esi
.text:01D968F7 8B 75 08                                      mov     esi, [ebp+arg_0]
.text:01D968FA 57                                            push    edi
.text:01D968FB DF E0                                         fnstsw  ax
.text:01D968FD F6 C4 44                                      test    ah, 44h
.text:01D96900 7A 09                                         jp      short loc_1D9690B
.text:01D96902 83 3D C8 62 13 02 01                          cmp     dword_21362C8, 1
.text:01D96909 7E 41                                         jle     short loc_1D9694C
correct me if I'm wrong.

and my signature is
Code:
{
    "name" : "SV_SendServerinfo",
    "library" : "engine",
    "identifiers":
    [
        {
            "os" : "windows",
            "mod" : "cstrike",
            "value" : [0x55, 0x8B, 0xEC, 0x81, 0xEC, 0x04, 0x08, "*", "*", 0xD9, 0x05, 0x28, 0x56, 0xE5, 0x01, 0xD8]
        },
        {
            "os"    : "linux",
            "mod"   : "cstrike",
            "value" : "SV_SendServerinfo"
        }
    ]
}
signature name is "SV_SendServerinfo"

folder is "cstrike\addons\amxmodx\configs\orpheu\functi ons"

and the problem is "signature is not found"
__________________
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 04-20-2012 , 05:39   Re: Orpheu: How to make signatures (of bytes)
Reply With Quote #45

Try this one :

Code:
[0x55,0x8B,"*",0x81,"*","*","*","*","*",0xD9,"*","*","*","*","*",0xD8,"*","*","*","*","*",0x53,0x56,0x8B,"*","*",0x57]
__________________
Arkshine is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 04-20-2012 , 08:46   Re: Orpheu: How to make signatures (of bytes)
Reply With Quote #46

Yeah , got it !
1.why ?
2.what type argument dose this function pass ? how to find it ?
__________________
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 04-20-2012 , 10:19   Re: Orpheu: How to make signatures (of bytes)
Reply With Quote #47

1. Why what ? If you're talking about why my signature works is because you don't have really understood my tutorial and you don't have put enough "*" for instructions/value which can change. If you want a rule more simple : keep always the first byte, and keep when e*x are used ; others you can put a *.

2. By guessing/searching. It seems to have 2 args. Both pointer. First not sure, it seems an address of a string is passed and second it's client_t* client for sure. It makes me think you did not add the args in the signature.
__________________
Arkshine is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 04-20-2012 , 10:26   Re: Orpheu: How to make signatures (of bytes)
Reply With Quote #48

I think I know something,because I have found a new function like this, and done it !
Code:
{
    "name" : "SV_DropClient",
    "library" : "engine",
    "arguments" :
    [
        {
            "type" : "int"
        },
        {
            "type" : "int"
        },
        {
            "type" : "char *"
        },
        {
            "type" : "char"
        }
    ],
    "identifiers":
    [
        {
            "os" : "windows",
            "mod" : "cstrike",
            "value" : [0x55,0x8B,"*",0x81,"*","*","*","*","*",0x8B,"*","*",0x53,0x56,0x8D,"*","*",0x57,0x50]
        },
        {
            "os" : "linux",
            "mod" : "cstrike",
            "value" : "SV_DropClient"
        }
    ]
}
like you said, there was much to learn
thx man !

edited:
Code:
#include <amxmodx> #include <orpheu> public plugin_init() {     register_plugin("", "", "")       OrpheuRegisterHook(OrpheuGetFunction("SV_DropClient"), "Hook_SV_DropClient") } public OrpheuHookReturn:Hook_SV_DropClient(a, b, c[], d) {     server_print("%i, %i, %s, %c", a, b, c, d); }

use this code and get this at the console
Code:
115283104, 0, Client sent 'drop', <
__________________
QQ:116268742

Last edited by K.K.Lv; 04-20-2012 at 10:34.
K.K.Lv is offline
Send a message via MSN to K.K.Lv
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-20-2012 , 11:55   Re: Orpheu: How to make signatures (of bytes)
Reply With Quote #49

Quote:
Originally Posted by K.K.Lv View Post
Yeah , got it !
1.why ?
2.what type argument dose this function pass ? how to find it ?
This is from an old hlds version
Code:
//sends things like gravity, part of this is IDable from SV_New
void SV_SendServerinfo(sizebuf_t * buffer, client_t * ptrClient) {

   char tempstr[0x80]; //Ought to be enough for now.
   unsigned int var808;
   CRC32_t var814;
   unsigned int var_filesize;
   BYTE * LoadedFile;

   int i;

   if(global_svs.allocated_client_slots > 1 || cvar_developer.value != 0) {

      MSG_WriteByte(buffer, 8);
      //This doesn't look like good, quality, correct functionality to me.
      /*
      Q_snprintf(array800, sizeof(array800)-1, "%c\nOSHLDS BUILD %d SERVER (%i CRC)\nServer # %i\n",
              2, build_number(), 0, global_svs.ServerCount);
      array800[sizeof(array800)-1] = '\0';
      MSG_WriteString(buffer, array800);
      */

      //Meanwhile, this is messy, but should be faster.
      //The -1 +1s are all in place to prevent us from writing a null until the very end.
      #define __SVSERVERWELCOME_1 "\x02" "\nOSHLDS VER "
      #define __SVSERVERWELCOME_2 " BUILT " __DATE__ "--" __TIME__ "\nServer # "
      MSG_WriteBuf(buffer, sizeof(__SVSERVERWELCOME_1)-1, __SVSERVERWELCOME_1);

      i = sprintf(tempstr, "%u", build_number());
      MSG_WriteBuf(buffer, i, tempstr);
      MSG_WriteBuf(buffer, sizeof(__SVSERVERWELCOME_2)-1, __SVSERVERWELCOME_2);

      i = sprintf(tempstr, "%u\n", global_svs.ServerCount);
      MSG_WriteBuf(buffer, i+1, tempstr);
   }

   MSG_WriteByte(buffer, 0x0B);
   MSG_WriteLong(buffer, 0x2E);
   MSG_WriteLong(buffer, global_svs.ServerCount);

   var808 = NUM_FOR_EDICT(ptrClient->padding4A84) - 1;
   var814 = global_sv.map_CRC;

   COM_Munge3((char *)(&var814), 4, (0xFF - var808) & 0xFF); //Yeah, looks like we're munging an int...

   MSG_WriteLong(buffer, var814);
   MSG_WriteBuf(buffer, 0x10, global_sv.usedpadding);
   //I'm guessing that means "player X of Y".
   MSG_WriteByte(buffer, global_svs.allocated_client_slots);
   MSG_WriteByte(buffer, var808);

   if(cvar_deathmatch.value == 0 || cvar_coop.value != 0) {
      MSG_WriteByte(buffer, 1);
   }
   else {
      MSG_WriteByte(buffer, 0);
   }

   COM_GetGameDirSize(tempstr, sizeof(tempstr));
   MSG_WriteString(buffer, tempstr);
   MSG_WriteString(buffer, cvar_hostname.string);
   MSG_WriteString(buffer, global_sv.name4);

   LoadedFile = COM_LoadFileForMe(cvar_mapcyclefile.string, &var_filesize);

   if(LoadedFile != NULL) {
      if(var_filesize != 0) {
         MSG_WriteString(buffer, LoadedFile);
      }
      else {
         MSG_WriteString(buffer, "mapcycle failure");
      }
      COM_FreeFile(LoadedFile);
   }
   else {
      MSG_WriteString(buffer, "mapcycle failure");
   }

   MSG_WriteByte(buffer, global_svs.paddingE8);
   if(global_svs.paddingE8 != 0) {

      MSG_WriteByte(buffer, 4);
      MSG_WriteBuf(buffer, 4, &(sUpdateIPAddress.ip)); //That's the ADDRESS, or a pointer to object.padding4
      MSG_WriteBuf(buffer, 0x10, &global_svs.module80[1].buf10);
   }
   MSG_WriteByte(buffer, 0x36);
   MSG_WriteString(buffer, com_clientfallback); //This was always an empty string for us.  What does it do otherwise?
   MSG_WriteByte(buffer, allow_cheats);

   SV_WriteDeltaDescriptionsToClient(buffer);
   SV_SetMoveVars();
   SV_WriteMovevarsToClient(buffer);

   MSG_WriteByte(buffer, 0x20);
   MSG_WriteByte(buffer, gGlobalVariables.cdAudioTrack);
   MSG_WriteByte(buffer, gGlobalVariables.cdAudioTrack);
   MSG_WriteByte(buffer, 0x05);

   MSG_WriteShort(buffer, NUM_FOR_EDICT(ptrClient->padding4A84));

   ptrClient->padding04 = 0;
   ptrClient->padding08 = 0;
   ptrClient->padding0C_connected = 1;
}
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 04-20-2012 , 12:30   Re: Orpheu: How to make signatures (of bytes)
Reply With Quote #50

where dose you get it connor ?
__________________
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 05:38.


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