Does anyone have a working password changer php file for the tad file in DBSRV/Accoun

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Tantra/Web Development jbeitz107 is offline
    MemberRank
    Mar 2012 Join Date
    USALocation
    1,471Posts

    Does anyone have a working password changer php file for the tad file in DBSRV/Accoun

    DBSRV/Account???????? working password changer php code? this is what i have so far with no luck what so ever in the account file but, works in the sql server with no problems. thank you
    $fp = fopen("C:/kathana6/DBSRV/Share/Serv02/new/$UserID.txt","w");
    fwrite($fp,$UserID."\r\n");
    fwrite($fp,$password."\r\n");
    fwrite($fp,"000000\r\n");
    fwrite($fp,$userkey."\r\n");
    $userid = $_SESSION['username'];
    $password2 = strtoupper(md5($newpass));
    $initial=substr($userid,0,1);
    if (ereg("^[a-zA-Z]$",$initial))
    {
    $initial=strtoupper($initial);
    }
    else
    {
    $initial="etc";
    }
    $accdir=("C:\kathana6\DBSRV\Account");
    $f=fopen("./inc/sample.tad", "r");
    $f=@fopen($accdir."\\".$initial."\\".$userid.".TAD",r) or die("Error");
    $acc = @fread($f,7124);
    $demopass=substr($acc,52,32);
    $acc = str_replace($demopass,$password2,$acc);
    $f2=@fopen($accdir."\\".$initial."\\".$userid.".TAD",w);
    @fwrite($f2,$acc) or die("Error");
    @fclose($f);
    fclose($fp);
    Last edited by jbeitz107; 05-11-12 at 03:20 AM.


  2. #2
    Member gundulapek is offline
    MemberRank
    Nov 2011 Join Date
    96Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    your script just need simple adjustment and it will run correctly

  3. #3
    Tantra/Web Development jbeitz107 is offline
    MemberRank
    Mar 2012 Join Date
    USALocation
    1,471Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    can you tell me what i need to change? thanks

  4. #4
    Member gundulapek is offline
    MemberRank
    Nov 2011 Join Date
    96Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    $demopass=substr($acc,52,32);

    with

    $demopass=substr($acc,52,36);

    i think this is the answer

    if still not correct than we should re check it again ^^

  5. #5
    Tantra/Web Development jbeitz107 is offline
    MemberRank
    Mar 2012 Join Date
    USALocation
    1,471Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    this still did not fix the problem.

  6. #6
    Member gundulapek is offline
    MemberRank
    Nov 2011 Join Date
    96Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    php is a hard things for me

    i've made tad extraction tool but in delphi

    here is the image, but i hide username and password for privacy

  7. #7
    Tantra/Web Development jbeitz107 is offline
    MemberRank
    Mar 2012 Join Date
    USALocation
    1,471Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    Quote Originally Posted by gundulapek View Post
    php is a hard things for me

    i've made tad extraction tool but in delphi

    here is the image, but i hide username and password for privacy
    do you have a copy of this tool you can share? also php isn't much more difficult than dos but, the md5 configuration is quite a task to get correct. thanx

  8. #8
    Member gundulapek is offline
    MemberRank
    Nov 2011 Join Date
    96Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    sorry i cant share it due to my contract with neo-zoominc

  9. #9
    Tantra/Web Development jbeitz107 is offline
    MemberRank
    Mar 2012 Join Date
    USALocation
    1,471Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    i see how it is. well see if they would be willing to at least allow a sharing of the password change php code so that i can fix it. thank you.

  10. #10
    Member gundulapek is offline
    MemberRank
    Nov 2011 Join Date
    96Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    just 1 question .. why you need to open sample.dat if you just want to change password?

    Code:
    $userid = $_SESSION['username'];
    $password2 = strtoupper(md5($newpass));
    $initial=substr($userid,0,1);
    // Looking for directory at account folder
    if (ereg("^[a-zA-Z]$",$initial))
    {
       $initial=strtoupper($initial);
    }
    else
    {
       $initial="etc";
    }
    
    
    // Base directory for account
    $accdir=("C:\kathana6\DBSRV\Account");
    
    // Open and read file
    $f=@fopen($accdir."\\".$initial."\\".$userid.".TAD",r) or die("Error");
    $acc = @fread($f,7124);
    
    // Close file
    @fclose($f);
    
    // Read password
    $demopass=substr($acc,51,36); // start from 52th byte for 36 bytes
    
    // Replace old password to new password
    $acc = str_replace($demopass,$password2,$acc);
    
    // Open WRITE
    $f2=@fopen($accdir."\\".$initial."\\".$userid.".TAD",w);
    @fwrite($f2,$acc) or die("Error")
    
    // Clean Up--
    
    fclose($f2);
    Last edited by gundulapek; 09-11-12 at 09:18 AM. Reason: editing code

  11. #11
    Tantra/Web Development jbeitz107 is offline
    MemberRank
    Mar 2012 Join Date
    USALocation
    1,471Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    didn't know if i needed it or not. thanx

    also on another note i get an error in dreamweaver line 102 not sure why this is. but, this is the last line of code you have given me

    nevermind i figured it out lol you are missing semicolon after @fwrite($f2,$acc) or die("Error") LOL

    Awesome help bro!!!!! All works fine now. I can change the password in both the website and the .tad file now with no issues at all.

    Quote Originally Posted by jbeitz107 View Post
    didn't know if i needed it or not. thanx

    also on another note i get an error in dreamweaver line 102 not sure why this is. but, this is the last line of code you have given me

    nevermind i figured it out lol you are missing semicolon after @fwrite($f2,$acc) or die("Error") LOL

    Awesome help bro!!!!! All works fine now. I can change the password in both the website and the .tad file now with no issues at all.
    Ok I know that it is changing the md5 code in the tad file correctly but, why is it when I try to log in that it says Connection to server has failed?

  12. #12
    Member gundulapek is offline
    MemberRank
    Nov 2011 Join Date
    96Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    I don't know if it is a correct code but just try it first ^^
    Code:
    $userid = $_SESSION['username'];
    $password2 = strtoupper(md5($newpass));
    $initial=substr($userid,0,1);
    // Looking for directory at account folder
    if (ereg("^[a-zA-Z]$",$initial))
    {
       $initial=strtoupper($initial);
    }
    else
    {
       $initial="etc";
    }
    
    
    // Base directory for account
    $accdir=("C:\kathana6\DBSRV\Account");
    
    // Open and read file
    $f=@fopen($accdir."\\".$initial."\\".$userid.".TAD",r) or die("Error");
    $acc = @fread($f,7124);
    
    // Close file
    @fclose($f);
    
    // Read password
    $demopass=substr($acc,51,36); // start from 52th byte for 36 bytes
    
    // Formatting password
    $temppass = array (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); // Make sure it is 36 bytes
    for(i=0; i<strlen($password2); i++)
    {
       $temppass[i] = ord($password2[i]); // not sure only ord or ordutf8
    }
    
    // Replace old password to new password
    $acc = str_replace($demopass,$temppass,$acc);
    
    // Open WRITE
    $f2=@fopen($accdir."\\".$initial."\\".$userid.".TAD",w);
    @fwrite($f2,$acc) or die("Error");
    
    // Clean Up--
    
    fclose($f2);

  13. #13
    Tantra/Web Development jbeitz107 is offline
    MemberRank
    Mar 2012 Join Date
    USALocation
    1,471Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    i think your first code is correct other than it deletes more than it should like character name was Drayko and the md5 code was followed by yko which was the last of the character name. anyhow if i haven't said it Thank you for all your help so far.
    also in your new code there is an error on this line but, not sure what it is. perhaps you know what it is
    for(i=0; i<strlen($password2); i++)

  14. #14
    Unknown marcuel is offline
    MemberRank
    Mar 2010 Join Date
    499Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    i will update this link for future use. hehehe

  15. #15
    Tantra/Web Development jbeitz107 is offline
    MemberRank
    Mar 2012 Join Date
    USALocation
    1,471Posts

    Re: Does anyone have a working password changer php file for the tad file in DBSRV/Ac

    good idea it's so good to share lol

    i have been modding the heck out of the zone gamers web template and have it mostly working except the gmadminpanel and the password change so far. it changes the pass for the site with no issues but, still a work in progress for the .tad file lol



Page 1 of 2 12 LastLast

Advertisement