[Tutorial] Random Process
RSUpdate
Search
Code:
void startGame(const char* param)
Add Below
Code:
static const char alphanum[] = "abcdefghijklmnopqrstuvwxyz"int stringLength0111 = sizeof(alphanum) - 1;char genRandom011(){ return alphanum[rand() % stringLength0111];}
Search
Code:
char GAME_START_PARAM[2048];
Add Below
Code:
srand(time(0)); std::string Str, lastname, newname; const char * LASTNAME, * NEWNAME; for(unsigned int i = 0; i < 10; ++i) { Str += genRandom011(); } lastname = "MyGame.exe"; newname = Str + ".exe"; LASTNAME = lastname.c_str(); NEWNAME = newname.c_str(); rename(LASTNAME, NEWNAME);
Search
Code:
// we don't need to elevate permission here
Look
Code:
int err = (int)ShellExecute(NULL,
To put this over
int err = (int)ShellExecute(NULL, "open", NEWNAME, GAME_START_PARAM, NULL, SW_SHOW);
Re: [Tutorial] Random Process
Don't Delete file exe for rename exit game ?
Re: [Tutorial] Random Process
Quote:
Originally Posted by
Returnerzx
Don't Delete file exe for rename exit game ?
Every time starting game different exe name
Re: [Tutorial] Random Process
How to remove .exe Auto after game
Re: [Tutorial] Random Process
Honestly , not working much on warz these days but what is the point ?.
With findfindow and tons of other methods bypass that ( actually you can just put exes name when game is open )
Re: [Tutorial] Random Process
Quote:
Originally Posted by
Burak DatLife
Honestly , not working much on warz these days but what is the point ?.
With findfindow and tons of other methods bypass that ( actually you can just put exes name when game is open )
code a sample
Re: [Tutorial] Random Process
Re: [Tutorial] Random Process
Quote:
Originally Posted by
IKaruzI15
Useless...
Nope. It's just what i need right now, no more easy antipause the process on startup. :P
Re: [Tutorial] Random Process
Well well... as this was kinda helpfull for me, to not waste alot of time, here is a updated & working version.
Have Fun guys. :P
Spoiler:
PHP Code:
Search for:
startGame(const CUpdater& updater)
Add above
void gen_random(char *s, const int len) {
static const char alphanum[] =
"0123456789"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz";
for (int i = 0; i < len; ++i) {
s[i] = alphanum[rand() % (sizeof(alphanum) - 1)];
}
s[len] = 0;
}
static const char alphanum[] = "abcdefghijklmnopqrstuvwxyz";
int stringLength = sizeof(alphanum) - 1; char gen_random() { return alphanum[rand() % stringLength]; }
Search for
char GAME_START_PARAM[2048];
add below
srand(time(0)); std::string Str, lastname, newname; const char * LASTNAME, *NEWNAME; for (unsigned int i = 0; i < 10; ++i) { Str += gen_random(); } lastname = "MiniA.exe"; newname = Str + ".exe"; LASTNAME = lastname.c_str(); NEWNAME = newname.c_str(); rename(LASTNAME, NEWNAME);
Search for
int err = (int)ShellExecute(NULL, "open", GAME_EXE_NAME, GAME_START_PARAM, NULL, SW_SHOW);
Replace with;
int err = (int)ShellExecute(NULL, "open", NEWNAME, GAME_START_PARAM, NULL, SW_SHOW);
@MentaL, serious, fix ur text editor. Everything is totaly fucked up after press "Edit"...
Re: [Tutorial] Random Process
Quote:
Originally Posted by
aLca
The joys of chrome, try editing your local editor on the control panel options.
Re: [Tutorial] Random Process
Testing Standard Editor now.
Spoiler:
Random Code for testing...
PHP Code:
// compile time assert
#ifdef __cplusplus
#define JOIN( X, Y ) JOIN2(X,Y)
#define JOIN2( X, Y ) X##Y
namespace assert_static
{
template <bool> struct STATIC_ASSERT_FAILURE;
template <> struct STATIC_ASSERT_FAILURE<true> { enum { value = 1 }; };
template<int x> struct static_assert_test{};
}
#define COMPILE_ASSERT(x) \
typedef ::assert_static::static_assert_test<\
sizeof(::assert_static::STATIC_ASSERT_FAILURE< (bool)( x ) >)>\
JOIN(_static_assert_typedef, __LINE__)
#else // __cplusplus
#define COMPILE_ASSERT(x) extern int __dummy[(int)x]
#endif // __cplusplus
#define VERIFY_EXPLICIT_CAST(from, to) COMPILE_ASSERT(sizeof(from) == sizeof(to))
Yep. That seems fine. Sorry for the harsh comment. :)