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

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

?? cardif_linux.c

?? 可以用作很多客戶端的XSUPPLICANT的源代碼。比如用在802.1x或者無線AP上
?? C
?? 第 1 頁 / 共 3 頁
字號:
 * we need to reset them.  Otherwise, we will just ignore the fact that * we changed APs, and return. * **************************************************************/void cardif_reset_keys(struct interface_data *thisint){  char zerokey[13];  char keylen = 13;  if (thisint->userdata == NULL)     {      debug_printf(DEBUG_INT, "Userdata is NULL!\n");      return;    }  if (thisint->userdata->wireless_ctrl == CTL_NO)     {      debug_printf(DEBUG_INT, "Config file has instructed us not to reset the key!  Roaming may not work!!!\n");      return;    }  if (cardif_enc_enabled(thisint) != TRUE)    {      debug_printf(DEBUG_INT, "Encryption appears to be disabled.  We will not reset keys on interface %s!\n", thisint->intName);      return;    }    bzero(&zerokey, 13);  // We set the key index to 0x80, to force key 0 to be set to all 0s,  // and to have key 0 be set as the default transmit key.  set_wireless_key(thisint, (char *)&zerokey, keylen, 0x80);}/************************************************************** * * If we determine that this interface is a wireless interface, then * we should call this, to have the destination address changed to the * AP that we are talking to.  Otherwise, we will always send frames to * the multicast address, instead of the AP.  (And, most APs won't answer * to the multicast address.) * **************************************************************/int cardif_check_dest(struct interface_data *thisint){  char newdest[6], *newssid;  char baddest[6];  int changed = FALSE;  bzero((char *)&newdest, 6);  // If we are on wireless, figure out the target MAC address.  if ((thisint->isWireless == TRUE) &&       (GetBSSID(thisint, (char *)&newdest) == XENONE))    {      if (memcmp(thisint->dest_mac, newdest, 6) != 0)	{	  debug_printf(DEBUG_INT, "The card reported that the destination MAC address is now ");	  debug_hex_printf(DEBUG_INT, (char *)&newdest, 6);	  memcpy((char *)&thisint->dest_mac[0], (char *)&newdest, 6);	  changed = TRUE;	  // Since we changed destination addresses, we need to see if	  // we should reset keys.	  cardif_reset_keys(thisint);	}      memset((char *)&baddest, 0x00, 6);      if (memcmp(thisint->dest_mac, baddest, 6) == 0)	{	  debug_printf(DEBUG_INT, "We don't appear to be associated!  Resetting keys!\n");	  cardif_reset_keys(thisint);	}      memset((char *)&baddest, 0x44, 6);      if (memcmp(thisint->dest_mac, baddest, 6) == 0)	{	  debug_printf(DEBUG_INT, "All 4s for dest mac! Resetting keys!\n");	  cardif_reset_keys(thisint);	}      memset((char *)&baddest, 0xff, 6);      if (memcmp(thisint->dest_mac, baddest, 6) == 0)	{	  debug_printf(DEBUG_INT, "All Fs for dest mac!  Resetting keys!\n");	  cardif_reset_keys(thisint);	}      // If we were able to get a BSSID, we should also try to get an SSID.      newssid = malloc(100);      if (newssid == NULL)	{	  debug_printf(DEBUG_NORMAL, "Couldn't malloc newssid in cardif_linux.\n");	  return XEMALLOC;	}      bzero(newssid, 100);      GetSSID(thisint, newssid);      if ((thisint->cur_essid == NULL) ||	  (strncmp(newssid, thisint->cur_essid, 100) != 0))	{	  if (thisint->cur_essid != NULL) free(thisint->cur_essid);	  thisint->cur_essid = newssid;	  debug_printf(DEBUG_INT, "Working with ESSID : %s\n",		       thisint->cur_essid);	} else {	  if (newssid != NULL)	    {	      free(newssid);	      newssid = NULL;	    }	}    } else {      //      debug_printf(DEBUG_INT, "Interface doesn't appear to be a wireless interface!\n");    }  return changed;}/****************************************** * * Clean up anything that was created during the initialization and operation * of the interface.  This will be called before the program terminates. * ******************************************/int cardif_deinit(struct interface_data *thisint){  debug_printf(DEBUG_EVERYTHING, "Cleaning up interface %s...\n",thisint->intName);  close(thisint->sockInt);  return XENONE;}/****************************************** * * Set a wireless key.  Also, based on the index, we may change the transmit * key. * ******************************************/int set_wireless_key(struct interface_data *thisint, u_char *key, int keylen,		     int index){  int rc = 0;  int skfd;  struct iwreq wrq;  if (thisint->isWireless == FALSE)    {      if ((cardif_int_is_wireless(thisint->intName) != TRUE) ||	  (thisint->userdata->type == WIRED) ||	  (thisint->userdata->wireless_ctrl == CTL_NO))	{	  debug_printf(DEBUG_NORMAL, "Interface isn't wireless, but an attempt to set a key was made!\n");	  return XENOWIRELESS;	} else {	  thisint->isWireless = TRUE;	}    }  skfd = socket(AF_INET, SOCK_DGRAM, 0);  if (skfd < 0)    return -1;  strncpy(wrq.ifr_name, thisint->intName, IFNAMSIZ);  wrq.u.data.flags = ((index & 0x7f) + 1) & IW_ENCODE_INDEX;  wrq.u.data.flags |= IW_ENCODE_OPEN;  wrq.u.data.length = keylen;  wrq.u.data.pointer = (caddr_t)key;  if ((rc = ioctl(skfd, SIOCSIWENCODE, &wrq)) < 0)    {      debug_printf(DEBUG_NORMAL, "Failed to set WEP key [%d], error %d : %s\n",		   (index & 0x7f) + 1, errno, strerror(errno));      rc = XENOKEYSUPPORT;    } else {      debug_printf(DEBUG_INT, "Successfully set WEP key [%d]\n",		   (index & 0x7f)+1);      if (index & 0x80)	{	  // This is a unicast key, use it for transmissions.	  strncpy(wrq.ifr_name, thisint->intName, IFNAMSIZ);	  wrq.u.data.flags = ((index & 0x7f) + 1) & IW_ENCODE_INDEX;	  wrq.u.data.flags |= IW_ENCODE_OPEN;	  wrq.u.data.length = 0;	  wrq.u.data.pointer = (caddr_t)NULL;	  if (ioctl(skfd, SIOCSIWENCODE, &wrq) < 0)	    {	      debug_printf(DEBUG_NORMAL, "Failed to set the WEP transmit key ID [%d]\n", (index & 0x7f)+1);	      rc = XENOKEYSUPPORT;	    } else {	      debug_printf(DEBUG_INT, "Successfully set the WEP transmit key [%d]\n", (index & 0x7f)+1);	    }	}      }   close(skfd);  return rc;}/****************************************** * * Ask the wireless card for the ESSID that we are currently connected to.  If * this is not a wireless card, or the information is not available, we should * return an error. * ******************************************/int GetSSID(struct interface_data *thisint, char *ssid_name){  struct iwreq iwr;   if (thisint->isWireless == FALSE)    {      // We want to verify that the interface is in fact, not wireless, and      // not that we are in a situation where the interface has just been       // down.      if (thisint->wasDown == FALSE)	{	  return XENOWIRELESS;	}    }   // If we get here, and isWireless == FALSE, then we need to double  // check that our interface is really not wireless.  if (thisint->isWireless == FALSE)    {      thisint->isWireless = cardif_int_is_wireless(thisint->intName);      if (thisint->isWireless == FALSE)	{	  thisint->wasDown = FALSE;	}    }  // Specify the interface name we are asking about.  strncpy(iwr.ifr_name, thisint->intName, sizeof(iwr.ifr_name));  iwr.u.essid.pointer = (caddr_t) ssid_name;  iwr.u.essid.length = 100;  iwr.u.essid.flags = 0;  if (ioctl(thisint->sockInt, SIOCGIWESSID, &iwr) < 0) return XENOWIRELESS;  thisint->wasDown = FALSE;  return XENONE;}/****************************************** * * Check the SSID against what we currently have, and determine if we need * to reset our configuration. * ******************************************/int cardif_check_ssid(struct interface_data *thisint){  char new_essid[100];  bzero((char *)&new_essid, 100);  if (GetSSID(thisint, (char *)&new_essid) != XENONE)    {      // This interface probably isn't wireless!      // On the off chance that it is, we will trash the essid we have      // listed as the current one, so that if we suddenly do get an      // essid, we will load the proper config.      if (thisint->cur_essid != NULL)	{	  free(thisint->cur_essid);	  thisint->cur_essid = NULL;	}      return XENONE;    }  if (thisint->cur_essid != NULL)    {      if (strcmp(thisint->cur_essid, (char *)&new_essid) != 0)	{	  // We have changed essids.	  debug_printf(DEBUG_INT, "ESSID Changed to : %s\n", (char *)&new_essid);	  	  // Kill off the essid we currently have.	  free(thisint->cur_essid);	  thisint->cur_essid = (char *)malloc(strlen(new_essid)+1);	  if (thisint->cur_essid == NULL) return XEMALLOC;	  	  strncpy(thisint->cur_essid, new_essid, strlen(new_essid));	  // Since we changed essids, we no longer have completed a	  // "first auth"	  thisint->firstauth = FALSE;	  return XNEWESSID;	}    }  return XENONE;}/****************************************** * * Get the Broadcast SSID (MAC address) of the Access Point we are connected  * to.  If this is not a wireless card, or the information is not available, * we should return an error. * ******************************************/int GetBSSID(struct interface_data *thisint, char *bssid_dest){  struct iwreq iwr;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩免费看的电影| 欧美激情在线免费观看| 亚洲国产人成综合网站| 91麻豆国产自产在线观看| 亚洲美女免费在线| 欧美亚洲一区二区在线观看| 日韩中文字幕亚洲一区二区va在线 | 国产在线精品一区在线观看麻豆| 在线播放日韩导航| 蓝色福利精品导航| 日韩一区在线看| 欧美日韩不卡一区| 国产精品1区二区.| 亚洲免费观看高清在线观看| 欧美日韩亚洲国产综合| 狂野欧美性猛交blacked| 欧美极品美女视频| 欧美日韩国产高清一区二区| 韩国三级中文字幕hd久久精品| 中文字幕乱码日本亚洲一区二区| 在线观看成人免费视频| 国产一区在线精品| 亚洲自拍偷拍九九九| 精品久久人人做人人爽| 91高清视频在线| 狠狠色狠狠色综合日日91app| 亚洲国产岛国毛片在线| 欧美高清dvd| 国产999精品久久| 日av在线不卡| 亚洲欧美激情视频在线观看一区二区三区 | 91福利社在线观看| 国产乱国产乱300精品| 夜色激情一区二区| 欧美国产成人精品| 精品国产凹凸成av人导航| av一二三不卡影片| 激情文学综合网| 婷婷综合五月天| 亚洲人一二三区| 国产日韩欧美精品综合| 91精品国产欧美一区二区| 91在线观看美女| 国产麻豆精品视频| 美女网站在线免费欧美精品| 亚洲一区免费观看| 亚洲欧洲美洲综合色网| 久久精品亚洲国产奇米99| 777久久久精品| 欧美在线|欧美| 99精品国产99久久久久久白柏| 国产美女精品在线| 国产电影精品久久禁18| 国产美女在线精品| 精品一区二区免费| 美女视频黄 久久| 美女视频第一区二区三区免费观看网站 | 国产麻豆精品95视频| 久久99精品一区二区三区| 国产iv一区二区三区| 精品一区二区在线看| 精品中文av资源站在线观看| 日韩黄色一级片| 免费高清在线一区| 久久se这里有精品| 国内不卡的二区三区中文字幕| 日韩国产成人精品| 麻豆国产91在线播放| 国产综合一区二区| 国产盗摄女厕一区二区三区| 成人晚上爱看视频| 色婷婷综合激情| 91麻豆精品国产91久久久更新时间| 欧美日本韩国一区二区三区视频| 欧美精三区欧美精三区| 日韩女同互慰一区二区| 欧美电影免费观看高清完整版在线观看| 日韩三级精品电影久久久| 2023国产一二三区日本精品2022| 久久久久久久久久久电影| 国产精品视频观看| 亚洲午夜视频在线观看| 奇米影视一区二区三区| 国产精品系列在线观看| 91免费国产在线| 91麻豆精品国产无毒不卡在线观看| 欧美欧美欧美欧美| 精品国产污网站| 亚洲欧洲性图库| 视频一区二区中文字幕| 国产suv精品一区二区三区| 在线影视一区二区三区| 欧美成人精品二区三区99精品| 国产亚洲精品免费| 亚洲一二三四久久| 国产一区二区精品久久99| 91久久香蕉国产日韩欧美9色| 日韩欧美亚洲另类制服综合在线| 久久一留热品黄| 亚洲成av人**亚洲成av**| 国产激情视频一区二区三区欧美 | 91九色最新地址| 欧美zozo另类异族| 亚洲最大成人综合| 国产激情视频一区二区在线观看 | 精东粉嫩av免费一区二区三区| 成人精品一区二区三区中文字幕| 在线观看日韩高清av| 国产欧美日韩另类一区| 秋霞成人午夜伦在线观看| kk眼镜猥琐国模调教系列一区二区| 欧美日韩精品久久久| 亚洲国产精品v| 韩国精品主播一区二区在线观看 | 国产亚洲精品aa午夜观看| 亚洲一区成人在线| 99久久精品99国产精品| 精品国产一区二区精华| 日本中文在线一区| 欧美日韩国产三级| 亚洲国产日产av| 色综合久久66| 国产精品国产精品国产专区不片| 麻豆专区一区二区三区四区五区| 欧美亚洲一区三区| 午夜av一区二区三区| av电影在线观看一区| 亚洲国产高清在线| 成人免费视频视频| 国产色一区二区| 高清成人在线观看| 亚洲国产精品成人综合| 国产成a人亚洲| 国产精品丝袜一区| 成人激情免费视频| 中文字幕制服丝袜成人av| 国产精品18久久久久久久久| 久久久欧美精品sm网站| 国产高清久久久| 国产精品视频在线看| 成人美女在线视频| ...xxx性欧美| 在线观看视频一区二区欧美日韩| 亚洲综合一二三区| 欧美三级欧美一级| 喷水一区二区三区| 久久亚洲二区三区| 国产成人日日夜夜| 中文字幕中文在线不卡住| 色综合久久综合网| 三级一区在线视频先锋| 欧美一区二区三区四区视频| 奇米888四色在线精品| 26uuu国产日韩综合| 豆国产96在线|亚洲| 日韩毛片在线免费观看| 99久久精品国产导航| 一区二区三区产品免费精品久久75| 91福利区一区二区三区| 日本视频中文字幕一区二区三区| 欧美xxxxxxxx| 99国产欧美另类久久久精品| 亚洲午夜在线观看视频在线| 日韩一区二区三区视频在线| 激情综合网天天干| 亚洲丝袜制服诱惑| 欧美精品久久久久久久多人混战 | 4438x成人网最大色成网站| 久久精品国产一区二区| 中文天堂在线一区| 欧美日韩免费视频| 国产激情视频一区二区在线观看| 悠悠色在线精品| 26uuu久久综合| 欧美三日本三级三级在线播放| 精品午夜久久福利影院 | 欧美日韩一二三| 国产精品资源网| 亚洲国产日韩一区二区| 国产亚洲1区2区3区| 欧美日韩精品综合在线| 粉嫩一区二区三区性色av| 午夜欧美电影在线观看| 国产日本欧洲亚洲| 欧美美女一区二区| 97久久精品人人爽人人爽蜜臀| 日本在线不卡视频| 亚洲精品高清在线| 国产偷国产偷精品高清尤物| 777色狠狠一区二区三区| 欧美日韩免费电影| 国产成人免费9x9x人网站视频| 午夜一区二区三区视频| 国产精品国产三级国产aⅴ中文| 日韩精品中文字幕在线不卡尤物| 色综合久久综合网97色综合| 国产成人亚洲精品青草天美| 久久99热这里只有精品| 亚洲超碰97人人做人人爱| 亚洲乱码国产乱码精品精小说|