资源简介
cowpatty for linux,用于破解无线密码的工具
代码片段和文件信息
/*
* coWPAtty - Brute-force dictionary attack against WPA-PSK.
*
* Copyright (c) 2004-2009 Joshua Wright
*
* $Id: cowpatty.c 264 2009-07-03 15:15:50Z jwright $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation. See COPYING for more
* details.
*
* coWPAtty 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.
*/
/*
* Significant code is graciously taken from the following:
* wpa_supplicant by Jouni Malinen. This tool would have been MUCH more
* difficult for me if not for this code. Thanks Jouni.
*/
/*
* Right off the bat this code isn‘t very useful. The PBKDF2 function makes
* 4096 SHA-1 passes for each passphrase which takes quite a bit of time. On
* my Pentium II development system I‘m getting ~2.5 passphrases/second.
* I‘ve done my best to optimize the PBKDF2 function but it‘s still pretty
* slow.
*/
#define PROGNAME “cowpatty“
#define VER “4.6“
#define MAXPASSPHRASE 256
#define DOT1X_LLCTYPE “\x88\x8e“
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include “cowpatty.h“
#include “common.h“
#include “utils.h“
#include “sha1.h“
#include “md5.h“
#include “radiotap.h“
/* Globals */
pcap_t *p = NULL;
unsigned char *packet;
struct pcap_pkthdr *h;
char errbuf[PCAP_ERRBUF_SIZE];
int sig = 0; /* Used for handling signals */
char *words;
/* temporary storage for the password from the hash record instead of
malloc/free for each entry. */
char password_buf[65];
unsigned long wordstested = 0;
/* Prototypes */
void wpa_pmk_to_ptk(u8 * pmk u8 * addr1 u8 * addr2
u8 * nonce1 u8 * nonce2 u8 * ptk size_t ptk_len);
void hexdump(unsigned char *data int len);
void usage(char *message);
void testopts(struct user_opt *opt);
void cleanup();
void parseopts(struct user_opt *opt int argc char **argv);
void closepcap(struct capture_data *capdata);
void handle_dot1x(struct crack_data *cdata struct capture_data *capdata
struct user_opt *opt);
void dump_all_fields(struct crack_data cdata struct user_opt *opt);
void printstats(struct timeval start struct timeval end
unsigned long int wordcount);
int nextdictword(char *word FILE * fp);
int nexthashrec(FILE * fp struct hashdb_rec *rec);
void usage(char *message)
{
if (strlen(message) > 0) {
printf(“%s: %s\n“ PROGNAME message);
}
printf(“\nUsage: %s [options]\n“ PROGNAME);
printf(“\n“
“\t-f \tDictionary file\n“
“\t-d \tHash file (genpmk)\n“
“\t-r \tPacket capture file\n“
“\t-s \tNetwork SSID (enclose in quotes if SSID includes spaces)\n“
“\t-2 \tU
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-08-29 17:08 cowpatty-4.6\
目录 0 2015-08-29 15:36 cowpatty-4.6\cowpatty-4.6\
文件 228 2009-06-04 10:51 cowpatty-4.6\cowpatty-4.6\AUTHORS
文件 2398 2009-07-03 20:30 cowpatty-4.6\cowpatty-4.6\CHANGELOG
文件 18007 2006-07-28 20:23 cowpatty-4.6\cowpatty-4.6\COPYING
文件 4129 2006-07-28 20:23 cowpatty-4.6\cowpatty-4.6\FAQ
文件 569 2006-07-28 20:23 cowpatty-4.6\cowpatty-4.6\INSTALL
文件 1267 2009-06-06 02:07 cowpatty-4.6\cowpatty-4.6\Makefile
文件 5220 2006-07-28 20:23 cowpatty-4.6\cowpatty-4.6\README
文件 292 2006-07-28 20:23 cowpatty-4.6\cowpatty-4.6\TODO
文件 1884 2008-03-21 00:49 cowpatty-4.6\cowpatty-4.6\common.h
文件 27974 2009-07-03 23:15 cowpatty-4.6\cowpatty-4.6\cowpatty.c
文件 4761 2009-06-04 21:24 cowpatty-4.6\cowpatty-4.6\cowpatty.h
文件 83919 2006-07-28 20:23 cowpatty-4.6\cowpatty-4.6\dict
文件 954 2006-07-28 20:23 cowpatty-4.6\cowpatty-4.6\eap-test.dump
文件 159 2006-07-28 20:23 cowpatty-4.6\cowpatty-4.6\file_magic
文件 7441 2009-07-03 20:23 cowpatty-4.6\cowpatty-4.6\genpmk.c
文件 2709 2008-03-21 00:49 cowpatty-4.6\cowpatty-4.6\md5.c
文件 1312 2008-03-21 00:49 cowpatty-4.6\cowpatty-4.6\md5.h
文件 7994 2007-11-04 04:28 cowpatty-4.6\cowpatty-4.6\radiotap.h
文件 7018 2008-03-21 00:49 cowpatty-4.6\cowpatty-4.6\sha1.c
文件 2234 2009-07-03 20:23 cowpatty-4.6\cowpatty-4.6\sha1.h
文件 4001 2008-03-21 00:49 cowpatty-4.6\cowpatty-4.6\utils.c
文件 1402 2007-11-04 04:28 cowpatty-4.6\cowpatty-4.6\utils.h
文件 44717 2006-07-28 20:23 cowpatty-4.6\cowpatty-4.6\wpa2psk-li
文件 37912 2006-07-28 20:23 cowpatty-4.6\cowpatty-4.6\wpapsk-li
- 上一篇:用遗传算法求解线性规划问题
- 下一篇:小功率调幅接收机
评论
共有 条评论