View Single Post
Old 04-08-2005, 10:22 PM   #3
Zeno
Member
 
Join Date: Jan 2005
Location: Saratoga, NY
Home MUD: Bleached InuYasha Galaxy
Posts: 189
Zeno is on a distinguished road
Send a message via AIM to Zeno Send a message via MSN to Zeno Send a message via Yahoo to Zeno
Sure. With the switch to MD5 using Samson's snippet, I'm pretty sure the password checks are fine.

[code] case CON_GET_OLD_PASSWORD;
write_to_buffer( d, "\n\r", 2 );

if( ch->pcdata->version < 4 )
{
if( str_cmp( crypt( argument, ch->pcdata->pwd ), ch->pcdata->pwd ) )
{
write_to_buffer( d, "Wrong password, disconnecting.\n\r", 0 );
sprintf( log_buf, "%s; arg; %s, crypt-arg; %s crypt-pass; %s", ch->name, argument, crypt(argument,ch->name ), c$
to_channel( log_buf, CHANNEL_MONITOR, "Monitor", LEVEL_SUPREME );
sprintf( log_buf, "%s@%s wrong password.", d->character->name, d->host );
log_string_plus( log_buf, LOG_COMM, sysdata.log_level );
/* clear descriptor pointer to get rid of bug message in log */
d->character->desc = NULL;
close_socket( d, FALSE );
return;
}
}
else
{
/* This if check is what you will want to keep once it is no longer necessary to convert pfiles */
if( str_cmp( smaug_crypt( argument ), ch->pcdata->pwd ) )
{
write_to_buffer( d, "Wrong password, disconnecting.\n\r", 0 );
sprintf( log_buf, "%s; arg; %s, md5-arg; %s md5-pass; %s", ch->name, argument, smaug_crypt(argument ), ch->pcda$
to_channel( log_buf, CHANNEL_MONITOR, "Monitor", LEVEL_SUPREME );
sprintf( log_buf, "%s@%s wrong password.", d->character->name, d->host );
log_string_plus( log_buf, LOG_COMM, sysdata.log_level );
/* clear descriptor pointer to get rid of bug message in log */
d->character->desc = NULL;
close_socket( d, FALSE );
return;
}
}
[/quote]
Zeno is offline   Reply With Quote