#include #include #include #include #include #include #include #include "includes.h" #undef strcpy #undef strcat #ifndef CONFIGFILE #define CONFIGFILE "/etc/smb/smb.conf" #endif #ifdef _BSD_ extern char *sys_errlist[]; # define raise(s) kill(getpid(),(s)) # define strerror(e) sys_errlist[(e)] #endif extern char *optarg; extern int optind, opterr, optopt; void usage(char *name); void fatalError(char *name,char *str); void usage(char *name) { fprintf(stderr, "usage: %s [-c cpass] [-q] pass...\n",name); exit(-1); } main(int argc, char **argv, char **envp) { unsigned char nt_p16[16], p16[16]; char nt_p32[33], p32[33]; char p[66]; char *servicesf = CONFIGFILE; int i; char chars[]="!\"#$%&'()*+,-./0123456789:;<=>?@" "[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; char *I,*J,*K; char pass[8]; /* memset(nt_p16, '\0', 16);*/ /* memset(nt_p32, '\0', 33);*/ /* memset(p16, '\0', 16);*/ /* memset(p32, '\0', 33);*/ TimeInit(); charset_initialise(); lp_load(servicesf,1,0,0); codepage_initialise(lp_client_code_page()); /* pass[1]=0x00;*/ /* pass[2]=0x00;*/ pass[3]=0x00; for(I=chars; I