>heres something pointless i made up in about 10 seconds. dont
>know if you
>can use it or not.
>
>void do_fpass( CHAR_DATA *ch, char *argument )
>{
> char arg[MAX_STRING_LENGTH];
>
> argument = one_argument(argument, arg);
>
> printf_to_char(ch, "Those two arguments encrypted result
>in: %s\n\r",
> crypt(arg, argument));
>
> return;
>}
What on earth would you use this in a mud for?
You don't do any string checking, what happens when argument is longer than
2 characters?
According to the crypt man page:
salt is a two-character string chosen from the set
[a-zA-Z0-9./]. This string is used to perturb the algo--
rithm in one of 4096 different ways.
I think you should make sure no more than 2 characters are passed to crypt
in the 'salt' parameter. (It might do it, but it's better safe than sorry).
And I'm dying to know what legitimate use this has in your mud.
BTW, what happens if you only pass one argument?
Or more than 2?