[Tutorial] Random Process

Results 1 to 11 of 11
  1. #1
    Novice RootAs is offline
    MemberRank
    Jul 2017 Join Date
    localhostLocation
    4Posts

    wink [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);


  2. #2
    Account Upgraded | Title Enabled! Returnerzx is offline
    MemberRank
    Apr 2011 Join Date
    236Posts

    Re: [Tutorial] Random Process

    Don't Delete file exe for rename exit game ?

  3. #3
    Valued Member asd4129 is offline
    MemberRank
    Dec 2012 Join Date
    Loose, Germany,Location
    146Posts

    Re: [Tutorial] Random Process

    Quote Originally Posted by Returnerzx View Post
    Don't Delete file exe for rename exit game ?
    Every time starting game different exe name

  4. #4
    Member loveme006 is offline
    MemberRank
    Dec 2013 Join Date
    57Posts

    Re: [Tutorial] Random Process

    How to remove .exe Auto after game

  5. #5
    Proficient Member Burak DatLife is offline
    MemberRank
    Jan 2015 Join Date
    inetpub/wwwrootLocation
    173Posts

    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 )

  6. #6
    Member loveme006 is offline
    MemberRank
    Dec 2013 Join Date
    57Posts

    Re: [Tutorial] Random Process

    Quote Originally Posted by Burak DatLife View Post
    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

  7. #7
    Account Upgraded | Title Enabled! IKaruzI15 is offline
    MemberRank
    May 2017 Join Date
    197Posts

    Re: [Tutorial] Random Process

    Useless...

  8. #8
    ¿ aLca is offline
    MemberRank
    Apr 2013 Join Date
    /dev/nullLocation
    548Posts

    Re: [Tutorial] Random Process

    Quote Originally Posted by IKaruzI15 View Post
    Useless...
    Nope. It's just what i need right now, no more easy antipause the process on startup. :P

  9. #9
    ¿ aLca is offline
    MemberRank
    Apr 2013 Join Date
    /dev/nullLocation
    548Posts

    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 CUpdaterupdater)

    Add above
     
    void gen_random
    (char *s, const int len) {
        static const 
    char alphanum[] =
            
    "0123456789"
            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
            "abcdefghijklmnopqrstuvwxyz"
    ;
     
        for (
    int i 0len; ++i) {
            
    s[i] = alphanum[rand() % (sizeof(alphanum) - 1)];
        }
     
        
    s[len] = 0;
    }
     
    static const 
    char alphanum[] = "abcdefghijklmnopqrstuvwxyz";
    int stringLength sizeof(alphanum) - 1char gen_random() { return alphanum[rand() % stringLength]; }
     
    Search for

    char GAME_START_PARAM[2048];
     
    add below

    srand
    (time(0));    std::string Strlastnamenewname;    const char LASTNAME, *NEWNAME;    for (unsigned int i 010; ++i)    { Str += gen_random(); }    lastname "MiniA.exe";    newname Str ".exe";    LASTNAME lastname.c_str();    NEWNAME newname.c_str();    rename(LASTNAMENEWNAME);
     
    Search for

    int err = (int)ShellExecute(NULL"open"GAME_EXE_NAMEGAME_START_PARAMNULLSW_SHOW);
     
    Replace with;
     
    int err = (int)ShellExecute(NULL"open"NEWNAMEGAME_START_PARAMNULLSW_SHOW); 



    @MentaL, serious, fix ur text editor. Everything is totaly fucked up after press "Edit"...
    Last edited by aLca; 01-02-19 at 01:30 AM. Reason: This text editor is such cancer, jesus...

  10. #10
    ...[ White Rabbit ]... MentaL is offline
      Administrator  Rank
    Jan 2001 Join Date
    31,625Posts

    Re: [Tutorial] Random Process

    Quote Originally Posted by aLca View Post
    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

    https://nopaste.xyz/?2418eb1f8601b5d...uNLwLnlDRVcpw=

    @MentaL, serious, fix ur text editor. Everything is totaly fucked up after press "Edit"...
    The joys of chrome, try editing your local editor on the control panel options.

  11. #11
    ¿ aLca is offline
    MemberRank
    Apr 2013 Join Date
    /dev/nullLocation
    548Posts

    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 <boolstruct STATIC_ASSERT_FAILURE;
        
    template <> struct STATIC_ASSERT_FAILURE<true> { enum value }; };

        
    template<int xstruct static_assert_test{};
    }
    #define COMPILE_ASSERT(x) \
        
    typedef ::assert_static::static_assert_test<\
        
    sizeof(::assert_static::STATIC_ASSERT_FAILURE< (bool)( ) >)>\
        
    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. :)



Advertisement