1 #include "md4.h"
2 #include "des.h"
3 #include <memory.h>
4 #include <string.h>
5 #include <stdlib.h>
6 #include <ctype.h>
7 
8 typedef short int16;
9 typedef int int32;
10 typedef unsigned short uint16;
11 typedef unsigned int uint32;
12 typedef unsigned char uchar;
13 
14 #define MAX_STRING 255
15 #define MAX_WORD 128
16 #define LMPASSWDLEN 14
17 #define NTPASSWDLEN 128
18 
19 #define CVAL(buf,pos) (((unsigned char *)(buf))[pos])
20 #define PVAL(buf,pos) ((unsigned)CVAL(buf,pos))
21 #define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
22 /* #define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16) */
23 #define SSVALX(buf,pos,val) (CVAL(buf,pos)=(val)&0xFF,CVAL(buf,pos+1)=(val)>>8)
24 #define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
25 #define SVALS(buf,pos) ((int16)SVAL(buf,pos))
26 #define IVALS(buf,pos) ((int32)IVAL(buf,pos))
27 #define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16)(val)))
28 /* #define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32)(val))) */
29 #define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
30 #define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val)))
31 
32 
33 #define IVAL(buf,pos) (*(uint32 *)((char *)(buf) + (pos)))
34 #define SIVAL(buf,pos,val) IVAL(buf,pos)=((uint32)(val))
35 
36 struct user_struct {
37 	int  pwdumpval;
38 	char username[128];
39 	char lmhash[32];
40 	char foo[4]; /* placeholder */
41 	char nthash[32];
42 	char lmhashb[16];
43 	char bar[4]; /* placeholder */
44 	unsigned long nthashb[4];
45 	char lmpasswd[14];
46 	char ntpasswd[128];
47 	char server_chall[8];
48 	char lmresp_b[24];
49 	char ntresp_b[24];
50 	int under7;
51 	char first_half[7];
52 	char second_half[7];
53 	int lmdone;
54 	int ntdone;
55 	int already_printed;
56 	struct user_struct *previous;
57 	struct user_struct *next;
58 };
59 
60