Added binkp MD5 password crypt

This commit is contained in:
Michiel Broek
2003-07-06 20:37:58 +00:00
parent 42b0fd381b
commit 7021a07b4d
12 changed files with 770 additions and 91 deletions

View File

@@ -456,43 +456,44 @@ unsigned long sequencer()
char *printable(char *s, int l)
{
int len;
char *p;
int len;
char *p;
if (pbuff)
free(pbuff);
pbuff=NULL;
if (pbuff)
free(pbuff);
pbuff=NULL;
if (s == NULL)
return (char *)"(null)";
if (s == NULL)
return (char *)"(null)";
if (l > 0)
len=l;
else if (l == 0)
len=strlen(s);
else {
len=strlen(s);
if (len > -l)
len=-l;
}
if (l > 0)
len=l;
else if (l == 0)
len=strlen(s);
else {
len=strlen(s);
if (len > -l)
len=-l;
}
pbuff=(char*)xmalloc(len*4+1);
p=pbuff;
while (len--) {
if (*(unsigned char*)s >= ' ')
*p++=*s;
else switch (*s) {
case '\\': *p++='\\'; *p++='\\'; break;
case '\r': *p++='\\'; *p++='r'; break;
case '\n': *p++='\\'; *p++='n'; break;
case '\t': *p++='\\'; *p++='t'; break;
case '\b': *p++='\\'; *p++='b'; break;
default: sprintf(p,"\\%03o",*s); p+=4; break;
}
s++;
}
*p='\0';
return pbuff;
pbuff=(char*)xmalloc(len*4+1);
p=pbuff;
while (len--) {
if (isprint(*(unsigned char*)s))
*p++=*s;
else
switch (*s) {
case '\\': *p++='\\'; *p++='\\'; break;
case '\r': *p++='\\'; *p++='r'; break;
case '\n': *p++='\\'; *p++='n'; break;
case '\t': *p++='\\'; *p++='t'; break;
case '\b': *p++='\\'; *p++='b'; break;
default: sprintf(p,"\\%02x",*s); p+=3; break;
}
s++;
}
*p='\0';
return pbuff;
}

View File

@@ -717,7 +717,7 @@ struct sysconfig {
long dialdelay; /* Delay between calls */
unsigned NoFreqs : 1; /* Don't allow requests */
unsigned NoCall : 1; /* Don't call */
unsigned xNoHold : 1;
unsigned NoMD5 : 1; /* Don't do MD5 */
unsigned xNoPUA : 1;
unsigned NoEMSI : 1; /* Don't do EMSI */
unsigned NoWazoo : 1; /* Don't do Yooho/2U2 */