Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 13.10.2006, 18:54   #1
Pole
Архивный участник
 
Join Date: Feb 2006
Posts: 10
Default

Quote:
Originally Posted by poltomb View Post
PHP Code:
$new_pword = random_password($_new_passlength);
$encrypt_pword = encrypt($new_pword); 
If you use that, you will have some bugged encrypted password like :

0x0ffffff890ffffffcb0ffffffd40ffffffba0ffffff030ff ffffa00ffffffde0ffffffc60fffffff30ffffff6a0ffffff4 c0ffffff4c0ffffff810ffffff1b0ffffff3d0ffffff3d

and not :

0xb18e86b70a7a3ea99c052323ee745252

so i recommand to include the generation and encryption in a while till the lenght is ok :

PHP Code:
$encrypt_pword = "";
while(
strlen($encrypt_pword)!=34){
   
$new_pword = random_password($_new_passlength);
   
$encrypt_pword = encrypt($new_pword);
} 
Pole is offline  
Old 13.10.2006, 20:59   #2
poltomb
Архивный участник
 
Join Date: Sep 2006
Posts: 81
Default

well, I took that encrypt password method right out of L2CP (php). I'll check to be sure I copied and pasted the right code.
poltomb is offline  
Old 13.10.2006, 21:05   #3
Pole
Архивный участник
 
Join Date: Feb 2006
Posts: 10
Default

Quote:
Originally Posted by poltomb View Post
well, I took that encrypt password method right out of L2CP (php). I'll check to be sure I copied and pasted the right code.
yes, but the encrypt function of L2CP is bugged, wanna see ?

PHP Code:
$_new_passlength          = 8;                 // Length: of the random password
set_time_limit(900);
$i=1;
while(
$i<10000){
  
$i++;
  
$encrypt_pword = "";
  
$new_pword = random_password($_new_passlength);
  
$encrypt_pword = encrypt($new_pword);


  if (
strlen($encrypt_pword)!=34){
    echo(
"$i\t$new_pword\t");
    echo(
"$encrypt_pword\n");
  }
} 
Pole is offline  
Old 13.10.2006, 22:43   #4
poltomb
Архивный участник
 
Join Date: Sep 2006
Posts: 81
Default

i see what you mean...hmmm methinks ill need to look for a new function...
poltomb is offline  
Old 16.10.2006, 15:41   #5
poltomb
Архивный участник
 
Join Date: Sep 2006
Posts: 81
Default

Quote:
Originally Posted by Pole View Post
If you use that, you will have some bugged encrypted password like :

0x0ffffff890ffffffcb0ffffffd40ffffffba0ffffff030ff ffffa00ffffffde0ffffffc60fffffff30ffffff6a0ffffff4 c0ffffff4c0ffffff810ffffff1b0ffffff3d0ffffff3d

and not :

0xb18e86b70a7a3ea99c052323ee745252

so i recommand to include the generation and encryption in a while till the lenght is ok :

PHP Code:
$encrypt_pword = "";
while(
strlen($encrypt_pword)!=34){
   
$new_pword = random_password($_new_passlength);
   
$encrypt_pword = encrypt($new_pword);
} 
I am wonderin if endianness is the problem with the encode function. On a windows box, the script works fine, but on a linux box, the output is similar to the one you have. Anyone got any suggestions?
poltomb is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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. The time now is 18:51.