View previous topic :: View next topic |
Author |
Message |
Yu-Haxxx How do I cheat?
Reputation: 0
Joined: 17 Aug 2016 Posts: 8 Location: dddd
|
|
Back to top |
|
 |
ulysse31 Master Cheater
Reputation: 2
Joined: 19 Mar 2015 Posts: 324 Location: Paris
|
Posted: Tue Aug 23, 2016 6:10 am Post subject: |
|
|
Probably because the argument "HERE" has the wrong value when the function is called.
This ought to be in the general programming forum section.
You ought to post the compiling error, or mention that this is a run-time problem.
|
|
Back to top |
|
 |
Yu-Haxxx How do I cheat?
Reputation: 0
Joined: 17 Aug 2016 Posts: 8 Location: dddd
|
Posted: Tue Aug 23, 2016 6:29 am Post subject: |
|
|
ulysse3131 wrote: | Probably because the argument "HERE" has the wrong value when the function is called.
This ought to be in the general programming forum section.
You ought to post the compiling error, or mention that this is a run-time problem. |
i mean like this:
this works:
Code: |
const char* stringg = "exit";
DWORD execute()
{
__asm
{
push stringg
push 0x00
call dword ptr ds:[0x0055011]
}
}
int main()
{
execute();
return true;} |
but this one not work:
Code: | const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
__asm
{
push stringg
push 0x0055011
call dword ptr ds:[HERE]
}
}
int main()
{
DWORD eee = 0x00000;
execute(DWORD eee);
return true;}
|
_________________
ddddd |
|
Back to top |
|
 |
ulysse31 Master Cheater
Reputation: 2
Joined: 19 Mar 2015 Posts: 324 Location: Paris
|
Posted: Tue Aug 23, 2016 6:45 am Post subject: |
|
|
Yu-Haxxx wrote: | ulysse3131 wrote: | Probably because the argument "HERE" has the wrong value when the function is called.
This ought to be in the general programming forum section.
You ought to post the compiling error, or mention that this is a run-time problem. |
i mean like this:
this works:
Code: |
const char* stringg = "exit";
DWORD execute()
{
__asm
{
push stringg
push 0x00
call dword ptr ds:[0x0055011]
}
}
int main()
{
execute();
return true;} |
but this one not work:
Code: | const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
__asm
{
push stringg
push 0x0055011
call dword ptr ds:[HERE]
}
}
int main()
{
DWORD eee = 0x00000;
execute(DWORD eee);
return true;}
|
|
So that's like I said, the arguement HERE has the wrong value when the function is called.
When it works, the value that matters is 0x0055011.
You replace this value by HERE, you initialize here with 0 and you never assign 0x0055011 to HERE therefore your code does not work.
Aside from that, while returning true to an int compiles, it's bad style, returns 1 is better.
Also, you should have a compile time error because
Code: | execute(DWORD eee); |
is not valid c++. Replace by
This is what should work :
Code: | const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
__asm
{
push stringg
push 0x00
call dword ptr ds:[HERE]
}
}
int main()
{
DWORD eee = 0x0055011;
execute( eee);
return 1;} |
Edit :
I hadn't looked the whole thing closely enough, there was also a missunderstanding on how your arguments mix together. fixed it.
|
|
Back to top |
|
 |
Yu-Haxxx How do I cheat?
Reputation: 0
Joined: 17 Aug 2016 Posts: 8 Location: dddd
|
Posted: Tue Aug 23, 2016 7:32 am Post subject: |
|
|
ulysse3131 wrote: | Yu-Haxxx wrote: | ulysse3131 wrote: | Probably because the argument "HERE" has the wrong value when the function is called.
This ought to be in the general programming forum section.
You ought to post the compiling error, or mention that this is a run-time problem. |
i mean like this:
this works:
Code: |
const char* stringg = "exit";
DWORD execute()
{
__asm
{
push stringg
push 0x00
call dword ptr ds:[0x0055011]
}
}
int main()
{
execute();
return true;} |
but this one not work:
Code: | const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
__asm
{
push stringg
push 0x0055011
call dword ptr ds:[HERE]
}
}
int main()
{
DWORD eee = 0x00000;
execute(DWORD eee);
return true;}
|
|
So that's like I said, the arguement HERE has the wrong value when the function is called.
When it works, the value that matters is 0x0055011.
You replace this value by HERE, you initialize here with 0 and you never assign 0x0055011 to HERE therefore your code does not work.
Aside from that, while returning true to an int compiles, it's bad style, returns 1 is better.
Also, you should have a compile time error because
Code: | execute(DWORD eee); |
is not valid c++. Replace by
This is what should work :
Code: | const char* stringg = "exit";
DWORD execute(DWORD HERE)
{
__asm
{
push stringg
push 0x00
call dword ptr ds:[HERE]
}
}
int main()
{
DWORD eee = 0x0055011;
execute( eee);
return 1;} |
Edit :
I hadn't looked the whole thing closely enough, there was also a missunderstanding on how your arguments mix together. fixed it. |
it's give crash!
full code:
Code: |
DWORD execute(DWORD HERE )
{
__asm
{
push command
push 0x00
call dword ptr ds:[HERE]
}
}
DWORD WINAPI Watek( LPVOID )
{
/////////
while(1)
{
DWORD HERE = 0x0055011;
execute(HERE);
Sleep(300);
}
return 1;
}
int DllMain(_In_ void * _HDllHandle, _In_ unsigned _Reason, _In_opt_ void * _Reserved)
{
if(DLL_PROCESS_ATTACH== _Reason)
{
CreateThread(NULL, NULL, Watek, NULL, NULL, NULL);
}
return 1;
} |
_________________
ddddd |
|
Back to top |
|
 |
ulysse31 Master Cheater
Reputation: 2
Joined: 19 Mar 2015 Posts: 324 Location: Paris
|
Posted: Tue Aug 23, 2016 8:41 am Post subject: |
|
|
what's up with command ?
1/ you don't provide definition of command so it cannot be full code.
2/ it used to be :
const char* stringg = "exit";
|
|
Back to top |
|
 |
Yu-Haxxx How do I cheat?
Reputation: 0
Joined: 17 Aug 2016 Posts: 8 Location: dddd
|
Posted: Tue Aug 23, 2016 9:23 am Post subject: |
|
|
ulysse3131 wrote: | what's up with command ?
1/ you don't provide definition of command so it cannot be full code.
2/ it used to be :
const char* stringg = "exit"; |
its the same
const char* command = "exit"
it's still not work Why?
_________________
ddddd |
|
Back to top |
|
 |
ulysse31 Master Cheater
Reputation: 2
Joined: 19 Mar 2015 Posts: 324 Location: Paris
|
Posted: Tue Aug 23, 2016 9:39 am Post subject: |
|
|
You say that this :
Code: | DWORD execute(DWORD HERE )
{
__asm
{
push command
push 0x00
call dword ptr ds:[HERE]
}
}
DWORD WINAPI Watek( LPVOID )
{
/////////
while(1)
{
DWORD HERE = 0x0055011;
execute(HERE);
Sleep(300);
}
return 1;
}
int DllMain(_In_ void * _HDllHandle, _In_ unsigned _Reason, _In_opt_ void * _Reserved)
{
if(DLL_PROCESS_ATTACH== _Reason)
{
CreateThread(NULL, NULL, Watek, NULL, NULL, NULL);
}
return 1;
} |
gives crash but that this :
Quote: | DWORD execute()
{
__asm
{
push command
push 0x00
call dword ptr ds:[0x0055011]
}
}
DWORD WINAPI Watek( LPVOID )
{
/////////
while(1)
{
execute();
Sleep(300);
}
return 1;
}
int DllMain(_In_ void * _HDllHandle, _In_ unsigned _Reason, _In_opt_ void * _Reserved)
{
if(DLL_PROCESS_ATTACH== _Reason)
{
CreateThread(NULL, NULL, Watek, NULL, NULL, NULL);
}
return 1;
} |
works good ? (last code is supposedly your original working code)
|
|
Back to top |
|
 |
Yu-Haxxx How do I cheat?
Reputation: 0
Joined: 17 Aug 2016 Posts: 8 Location: dddd
|
|
Back to top |
|
 |
|