aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ntlmssp.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2012-02-11 02:03:20 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2012-02-11 02:03:20 +0000
commit9b24fe28222320e5556ba60e0f4f21b8aa71d0f0 (patch)
tree3bd980cf05a3e4fdba5e6a640320151d3b717cbd /epan/dissectors/packet-ntlmssp.c
parent30e8d6371d9e76d7ee303d462878a7f3bfb3011b (diff)
NTLM make it easier to activate/deactivate debugging code in NTLM
from Matthieu Patou <mat@matws.net> svn path=/trunk/; revision=40955
Diffstat (limited to 'epan/dissectors/packet-ntlmssp.c')
-rw-r--r--epan/dissectors/packet-ntlmssp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c
index 9afe8778d4..6d199e4ed7 100644
--- a/epan/dissectors/packet-ntlmssp.c
+++ b/epan/dissectors/packet-ntlmssp.c
@@ -25,7 +25,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
+// Just set me to activate debug #define DEBUG_NTLMSSP
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -578,15 +578,19 @@ create_ntlmssp_v2_key(const char *nt_password _U_, const guint8 *serverchallenge
return;
}
while (i < nb_pass ) {
- /*fprintf(stderr,"Turn %d, ",i);*/
+ #ifdef DEBUG_NTLMSSP
+ fprintf(stderr,"Turn %d, ",i);
+ #endif
memcpy(nt_password_hash,pass_list[i].md4,NTLMSSP_KEY_LEN);
- /*printnbyte(nt_password_hash,NTLMSSP_KEY_LEN,"Current NT password hash: ","\n");*/
+ printnbyte(nt_password_hash,NTLMSSP_KEY_LEN,"Current NT password hash: ","\n");
i++;
/* ntowf computation */
memset(buf,0,512);
memcpy(buf,user_uppercase,user_len*2);
memcpy(buf+user_len*2,domain_name_unicode,domain_len*2);
md5_hmac(buf,domain_len*2+user_len*2,nt_password_hash,NTLMSSP_KEY_LEN,ntowf);
+ printnbyte(ntowf,NTLMSSP_KEY_LEN,"NTOWF: ","\n");
+
/* LM response */
memset(buf,0,512);
memcpy(buf,serverchallenge,8);