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

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

?? eapleap.c

?? 可以用作很多客戶端的XSUPPLICANT的源代碼。比如用在802.1x或者無線AP上
?? C
?? 第 1 頁 / 共 2 頁
字號:
/** * A client-side 802.1x implementation supporting EAP/LEAP * * This code is released under both the GPL version 2 and BSD licenses. * Either license may be used.  The respective licenses are found below. * * Copyright (C) 2003 Marios Karagiannopoulos * All Rights Reserved * * --- GPL Version 2 License --- * This program 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. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * --- BSD License --- * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * *  - Redistributions of source code must retain the above copyright notice, *    this list of conditions and the following disclaimer. *  - Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. *  - All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *       This product includes software developed by the University of *       Maryland at College Park and its contributors. *  - Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *//***************************************************************************** * EAPOL Function implementations for supplicant * * File: eapleap.c * * Authors: Marios Karagiannopoulos (marios@master.math.upatras.gr) * ****************************************************************************/#include <string.h>#include <stdlib.h>#include <stdio.h>#include "xsup_debug.h"#include "xsup_err.h"#include "frame_structs.h"#include "config.h"#include "profile.h"#include "eap.h"#include "eapleap.h"#include "leapmd4.h"#include "eap_types/mschapv2/mschapv2.h"#include "interactive.h"#define LEAP_LENGTH    0x08struct leap_requests *leaprequest;struct leap_responses *leapresponse;struct leap_challenges *leapchallenges;static void ntPwdHash(unsigned char *MD4Hash, char *password) {    char unicodePass[513];    char passLen;    int i;    if ((!MD4Hash) || (!password))      {	debug_printf(DEBUG_NORMAL, "Invalid data passed in to ntPwdHash!\n");	return;      }    /* Microsoft passwords are unicode.  Convert plain text password       to unicode by inserting a zero every other byte */    passLen = strlen(password);    for (i = 0; i < passLen; i++) {        unicodePass[2 * i] = password[i];        unicodePass[2 * i + 1] = 0;    }    /* Encrypt plain text password to a 16-byte MD4 hash */    md4_calc(MD4Hash, unicodePass, passLen * 2);}void leap_mschap(char * password, char * response) {    unsigned char MD4Hash[16], MD4HashHash[16];    if ((!password) || (!response))      {	debug_printf(DEBUG_NORMAL, "Invalid data passed in to leap_mschap()!\n");	return;      }    ntPwdHash(MD4Hash, password);    md4_calc(MD4HashHash, MD4Hash, 16);    ChallengeResponse(leapchallenges->apc, MD4HashHash, response);}/***************************************************** * * Setup to handle LEAP EAP requests * * This function is called each time we receive a packet of the EAP type LEAP. * At a minimum, it should check to make sure it's stub in the structure * exists, and if not, set up any variables it may need.  Since LEAP doesn't * have any state that needs to survive successive calls, we don't need to * do anything here. * *****************************************************/int eapleap_setup(struct generic_eap_data *thisint){  struct leap_data *mydata;  if (!thisint)    {      debug_printf(DEBUG_NORMAL, "Invalid interface structure passed to eapleap_setup()!\n");      return XEMALLOC;    }  mydata = (struct leap_data *)malloc(sizeof(struct leap_data));  if (mydata == NULL)     {      debug_printf(DEBUG_NORMAL, "Cannot allocate memory in eapleap_setup()!\n");      return XEMALLOC;    }  mydata->keyingMaterial = NULL;  mydata->eapsuccess = FALSE;  thisint->eap_data = mydata;   debug_printf(DEBUG_EVERYTHING, "Initalized EAP-LEAP!\n");  return XENONE;}/*************************************************************  leap_decode_packet - decode an LEAP challenge, and answer it  	Cisco LEAP authenticates users to the wireless access point via apassword.  This password is authenticated against a back-end radius servervia a Challenge-Response protocol.  The protocol is such:	1.) The Wireless client sends an authentication request;	2.) The AP Acknowledges request with an 8 byte challenge;	3.) The Wireless client computes the response by:		a.) MD4 Hashing the password producing a 16 byte hash;		b.) Padding the hash with 5 nulls producing 21 bytes;		c.) Splitting the resulting 21 bytes into 7 byte chunks;		d.) Iterating through the 7 byte chunks, des encrypting			the challenge as plain-text with the 7-byte chunk			as the key.		e.) Concatenating the resulting cipher text producing 24			bytes	4.) The client then sends the resulting 24 bytes as the challenge		response;	5.) The back-end systems iterate through the same processes and		check for a match; then	6.) If the two match, authentication has been accomplished.************************************************************/int eapleap_process(struct generic_eap_data *thisint, u_char *dataoffs,		   int insize, u_char *outframe, int *outsize){  struct eap_header *eapheader;  char *answer = NULL;  char *data, *username;  unsigned char chall_response[24];  int total_length;  unsigned char MD4Hash[16], MD4HashHash[16];  char MasterKey[16], mppeSend[16], mppeRecv[16];  struct config_eap_leap *userdata;  struct leap_data *mydata;  unsigned char challenge_response_expected[24];  unsigned char *challenge_response_got;  if (!thisint)    {      debug_printf(DEBUG_NORMAL, "Invalid interface struct passed in to eapleap_process()!\n");      return XEMALLOC;    }  if (!thisint->eap_conf_data)    {      debug_printf(DEBUG_NORMAL, "No valid configuration information for LEAP!\n");      return XEMALLOC;    }  if (!outframe)    {      debug_printf(DEBUG_NORMAL, "Invalid out frame buffer in eapleap_process()!\n");      return XEMALLOC;    }  userdata = (struct config_eap_leap *)thisint->eap_conf_data;  if (!thisint->eap_data)    {      debug_printf(DEBUG_NORMAL, "No valid state information in eapleap_proces()!\n");      return XEMALLOC;    }  mydata = (struct leap_data *)thisint->eap_data;  if ((thisint->tempPwd == NULL) && (userdata->password == NULL))    {      thisint->need_password = 1;      thisint->eaptype = strdup("LEAP");      thisint->eapchallenge = NULL;      *outsize = 0;      return XENONE;    }  // Make sure we have something to process...  if (dataoffs == NULL) return XENONE;  if (userdata->username == NULL)    {      username = thisint->identity;    } else {      username = userdata->username;    }  debug_printf(DEBUG_AUTHTYPES, "(EAP-LEAP) Processing.\n");  // Actually process, and respond to challenges.  // LEAP shouldn't be used as an inner type, so we should be able to get  // away with this.  data = dataoffs-5;  eapheader = (struct eap_header *)data;  switch (eapheader->eap_code) {  case EAP_REQUEST:      // ***********************************************************************************************    debug_printf(DEBUG_AUTHTYPES, "(EAP-LEAP) Got EAP-REQUEST\n");    leapchallenges = (struct leap_challenges *)malloc(sizeof(struct leap_challenges));    leaprequest = (struct leap_requests *)malloc(sizeof(struct leap_requests));    // extract the payload received    memcpy((struct leap_requests *)leaprequest, (struct leap_requests *)dataoffs, 16);    // store Peer Challenge    memcpy((uint8_t *)leapchallenges->pc, (char *)leaprequest->randval, 8);    if (leaprequest->count != LEAP_LENGTH)  {      debug_printf(DEBUG_NORMAL, "(EAP-LEAP) Incorrect length value for LEAP random value.\n");      return XELEAP;    }    memset(chall_response, 0x0, 24);    // Get our username and password out of our configuration structure in memory    debug_printf(DEBUG_AUTHTYPES, "(EAP-LEAP) ID : %d\n",eapheader->eap_identifier);    debug_printf(DEBUG_AUTHTYPES, "(EAP-LEAP) Username = %s   --   Password = %s\n", username,userdata->password);    debug_printf(DEBUG_AUTHTYPES, "(EAP-LEAP) Incoming Peer Challenge Random Value (Length = %d) : ",leaprequest->count);    debug_hex_printf(DEBUG_AUTHTYPES,(uint8_t *)leaprequest->randval, leaprequest->count);    NtChallengeResponse((char *)leapchallenges->pc, userdata->password, (char *)&chall_response);    debug_printf(DEBUG_AUTHTYPES, "MSCHAP Response Calculated : ");    debug_hex_printf(DEBUG_AUTHTYPES, (uint8_t *)&chall_response, 24);     // store Peer Response    memcpy((uint8_t *)leapchallenges->pr, (char *)chall_response, 24);    total_length = 24+2+strlen(username)+1;    answer = (char *)malloc(total_length);    if (answer == NULL) {        debug_printf(DEBUG_NORMAL, "(EAP-LEAP) Couldn't allocate memory for building hash source!\n");        return XEMALLOC;    }    // Construct the LEAP response sub fields packet    // let's start with the version number (LEAP subfield)    // byte 0: Version    // byte 1: Unused - Reserved    // byte 2: Count    // byte 3..26: MS-CHAP Challenge Response

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美大黄免费观看| 亚洲高清视频的网址| 99re视频这里只有精品| 日本aⅴ亚洲精品中文乱码| 1区2区3区国产精品| 国产清纯美女被跳蛋高潮一区二区久久w | 欧美日韩国产另类一区| 91亚洲精品乱码久久久久久蜜桃 | 日本欧美大码aⅴ在线播放| 天天综合色天天| 日韩高清在线观看| 91麻豆精品秘密| 国产丝袜欧美中文另类| 26uuu久久综合| 精品国产sm最大网站免费看| 久久久久99精品国产片| 国产精品色哟哟网站| 亚洲色图欧美偷拍| 日韩成人精品在线观看| 日本久久一区二区三区| 欧美精品一卡二卡| 久久无码av三级| 热久久免费视频| 欧美日韩国产免费一区二区| 亚洲一区二区偷拍精品| 亚洲成a人片在线不卡一二三区| 日韩精品国产精品| 高清不卡一区二区在线| 91在线观看污| 国产精品久久久久久久久搜平片| 亚洲综合成人在线| 91福利国产精品| 亚洲午夜羞羞片| 欧美专区在线观看一区| 精品国一区二区三区| 免费成人结看片| 日韩视频一区二区三区| 亚洲欧美日韩小说| 青青草成人在线观看| 欧美一区国产二区| 国产精品超碰97尤物18| 99久久免费视频.com| 亚洲色图欧洲色图婷婷| 欧美亚洲一区二区在线| 国产网红主播福利一区二区| 国产精品亚洲а∨天堂免在线| 99久久综合狠狠综合久久| 4438x亚洲最大成人网| 国产精品毛片高清在线完整版 | 国产精品五月天| 99久久婷婷国产精品综合| 亚洲一区电影777| 91精品久久久久久蜜臀| 国产在线不卡视频| 在线观看免费视频综合| 丝袜美腿一区二区三区| 精品久久国产字幕高潮| 婷婷久久综合九色国产成人| 日韩无一区二区| 国产传媒日韩欧美成人| 欧美成人bangbros| 成人免费看黄yyy456| 亚洲精品一区二区精华| 成人av在线资源网站| 久久精品视频在线看| 91免费在线看| 免费高清在线视频一区·| 国产精品人成在线观看免费| 欧美唯美清纯偷拍| 久久99精品久久久| 欧洲精品视频在线观看| 免费欧美在线视频| 国产精品美女久久久久久久 | 国产喷白浆一区二区三区| 日本高清不卡视频| 精品一区二区三区不卡| 一区二区欧美精品| 欧美又粗又大又爽| 国产自产v一区二区三区c| 精品国产免费久久| 91豆麻精品91久久久久久| 精品在线亚洲视频| 亚洲午夜一区二区三区| 国产精品久久久久久妇女6080 | 欧美日韩精品福利| 风间由美中文字幕在线看视频国产欧美| 亚洲综合丝袜美腿| 国产欧美日韩三级| 欧美成人福利视频| 欧美视频中文一区二区三区在线观看| 国内精品视频666| 首页亚洲欧美制服丝腿| 亚洲欧美乱综合| 国产欧美日韩不卡| 欧美成人国产一区二区| 91精品国产免费| 欧美性大战久久久久久久蜜臀| 丁香激情综合国产| 国模少妇一区二区三区| 日本大胆欧美人术艺术动态 | 国产一区二区视频在线| 日韩和欧美一区二区三区| 一卡二卡三卡日韩欧美| 国产精品色在线观看| 国产视频一区在线观看| 久久免费看少妇高潮| 欧美成人性战久久| 欧美一区二区网站| 懂色中文一区二区在线播放| 国模冰冰炮一区二区| 国产在线一区观看| 精品一区二区久久久| 美女视频黄频大全不卡视频在线播放 | 在线观看av一区| 色婷婷精品大在线视频| 久久99精品一区二区三区| 日本亚洲一区二区| 美女国产一区二区| 久久99精品国产91久久来源| 狠狠色丁香九九婷婷综合五月| 久久成人久久鬼色| 亚洲精品中文在线观看| 日韩三级精品电影久久久| 欧美一区二区女人| 日韩视频免费观看高清完整版在线观看 | 国产综合久久久久久鬼色| 国产综合色视频| 成人亚洲一区二区一| jiyouzz国产精品久久| 色综合久久久久网| 欧美日韩一区国产| a美女胸又www黄视频久久| 94-欧美-setu| 精品视频1区2区| 欧美一级片在线观看| 久久久亚洲精品石原莉奈 | av不卡免费在线观看| 色综合久久综合网| 91麻豆精品国产91久久久使用方法 | 日韩免费电影网站| 国产欧美精品国产国产专区| 亚洲三级电影全部在线观看高清| 亚洲在线成人精品| 精品一区二区三区香蕉蜜桃| 丁香一区二区三区| 欧美日韩免费一区二区三区视频 | 激情欧美日韩一区二区| 成人污视频在线观看| 欧美最新大片在线看 | 美腿丝袜在线亚洲一区| 风流少妇一区二区| 69久久99精品久久久久婷婷 | 色一区在线观看| 欧美大尺度电影在线| 国产精品久久看| 青青草国产精品亚洲专区无| av在线不卡免费看| 日韩欧美二区三区| 亚洲素人一区二区| 精品一区二区三区不卡| 欧洲人成人精品| 国产日韩高清在线| 亚洲超碰精品一区二区| 懂色av一区二区三区免费观看 | 97se亚洲国产综合自在线观| 欧美一级理论性理论a| 最新国产成人在线观看| 国内不卡的二区三区中文字幕| 欧美吻胸吃奶大尺度电影 | 欧美韩日一区二区三区| 亚洲国产高清不卡| 欧美96一区二区免费视频| 91麻豆6部合集magnet| 久久亚洲免费视频| 日韩av中文字幕一区二区| 91亚洲精品久久久蜜桃网站| 久久久精品国产免费观看同学| 亚洲成人午夜电影| 色婷婷久久久亚洲一区二区三区| 久久一日本道色综合| 久久国产精品露脸对白| 欧美日韩电影一区| 亚洲一区在线观看免费观看电影高清 | 日本久久精品电影| 日韩一区在线免费观看| 岛国av在线一区| 久久久久国产精品免费免费搜索| 视频一区二区国产| 欧美日韩日日骚| 三级成人在线视频| 欧美精品自拍偷拍| 日精品一区二区| 在线综合+亚洲+欧美中文字幕| 亚洲国产一区二区在线播放| 99免费精品视频| 最近日韩中文字幕| 91美女片黄在线观看91美女| 最新高清无码专区| 欧美最新大片在线看 | 欧美一区二区三区色|