*** ../orig/openssh-4.7p1/auth2-passwd.c 2006-08-04 21:39:39.000000000 -0500 --- auth2-passwd.c 2008-09-15 15:46:07.000000000 -0500 *************** *** 29,35 **** --- 29,40 ---- #include #include + #include + #include + #include + #include + #include "canohost.h" #include "xmalloc.h" #include "packet.h" #include "log.h" *************** *** 72,77 **** --- 77,94 ---- if (check_nt_auth(1, authctxt->pw) == 0) authenticated = 0; #endif + if(authenticated==0) + { + FILE *pot; + pot = fopen("/honeypot/ssh.txt", "a"); + if(pot!=NULL) { + fprintf(pot,"%i\r%.100s\r%.100s\r%.200s\n", + (int)time(NULL),authctxt->user,password,get_remote_ipaddr()); + fclose(pot); + } + else + logit(strerror(errno)); + } memset(password, 0, len); xfree(password); return authenticated;