📄 test_hash.c
字号:
/* This file is part of Ophcrack (Time-Memory-Trade-Off-crack). Ophcrack is a Lanmanager/NTLM hash cracker based on the faster time-memory trade-off using rainbow tables. Created with the help of: Maxime Mueller, Luca Wullschleger, Claude Hochreutiner and Andreas Huber. Copyright 2004 Philippe Oechslin Ophcrack is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Ophcrack is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Ophcrack; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/#include <stdio.h>#include "make_hash.h"#include <string.h>#include <ctype.h>static char rcsid[] = "$Id: test_hash.c,v 1.0 2004/07/09 12:54:15 oechslin Exp $";/* * $Log: test_hash.c,v $ * Revision 1.0 2004/07/09 12:54:15 oechslin * Initial revision * * */int main(int argc, char **argv){ unsigned char pw[15]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},hash[15], in1[8], in2[8]={0,0,0,0,0,0,0,0}; unsigned char hash1[8], hash2[8]; int i; int pad = 0; if (argc == 1) argv[1]="\0"; strcpy(pw,argv[1]); for (i=0; i<7 ; i++) { if (!pad) { in1[i] = (unsigned char)toupper(argv[1][i]); if (argv[1][i]==0) pad = 1; } else in1[i]=0; } if (strlen(argv[1])>7) { pad = 0; for (i=0; i<7 ; i++) { if (!pad) { in2[i] = (unsigned char)toupper(argv[1][i+7]); if (argv[1][i+7]==0) pad = 1; } else in2[i]=0; } } make_hash(in1,hash1); make_hash(in2,hash2); for (i=0; i<8; i++) printf("%02hhx",hash1[i]); for (i=0; i<8; i++) printf("%02hhx",hash2[i]); printf(":"); make_nthash(pw,hash); for (i=0; i<16; i++) printf("%02hhx",hash[i]); printf("\n"); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -