找回密码
 注册
搜索

锐捷supplicant代替认证程序Mento Supplicant(含源码)

水妖精? 2006-7-3 19:39 显示全部楼层 阅读模式 来自: 中国辽宁大连
SnowWings of Mento Software Workgroup

版本特色:支持实达Echo的非实达认证程序
 
1.支持实达802.1x认证过程
2.支持标准组播地址和STARNET私有组播地址
3.支持实达Echo回应机制
4.支持系统托盘图标
5.需要WinPcap支持,已在WinPcap3.0正式版上测试通过


附件是源代码,自己编译一下,看看适不适合自己的环境,如果不行的话,在这份代码基础上修改,至少要确认两个算法是不是一样,不过有个变通的办法就写一个截获数据包的程序把要echo的包保留,然后强制kill原版的客户端,这样就相当于在正版客户端程序通过验证后,自己做保持在online的程序。

Mento Supplicant v4.1src.zip

187.76 KB, 下载次数: 373

回复

使用道具 举报

大神点评9

 楼主| 水妖精? 2006-7-3 19:41 显示全部楼层 来自: 中国辽宁大连
可执行文件不推荐大家下载,因为环境不一样,兼容性测试没有时间做。

下面这个就是了

Mento Supplicant.zip

38.18 KB, 下载次数: 144

回复 支持 反对

使用道具 举报

 楼主| 水妖精? 2006-7-3 19:45 显示全部楼层 来自: 中国辽宁大连
  1. // 核心代码片段,某些全局变量在 *.h 中定义。。。。
  2. //
  3. //
  4. ///////////////////////////////////////////////////////////////////
  5. //
  6. //

  7. // Ruijie 8021x.exe 客户端验证及其完整性验证(V2.45 以后版本?)
  8. //
  9. // 有些变态用了 8 次 MD5 算法检校 0x00401000h --> 0x00421000h 程序段
  10. // (每段长0x4000h),每分段前加入了服务器返回的 MD5 串,最后得到的
  11. // 8组 MD5 Hash 再和服务器返回的 MD5 串做运算生成 0x90h 的表 TableC
  12. // 再作一次 MD5 运算。
  13. //
  14. //产生特殊随机字符串
  15. CString CMentoSupplicantDlg::Randstr(bool过滤词
  16. {
  17. CString strFormat,strRandom;
  18. int a,b,c,d,e;
  19. unsigned t;

  20. strFormat="%X%X%X%X%X%X9884773d9f46acafd7839eb38789088ac9534";
  21. if 过滤词{strFormat="%X%X%X%X%X%X388498639f49ebaca773dfd78789088ac9534";}

  22. t=time(NULL);
  23. srand(t);
  24. a=rand();
  25. b=rand();
  26. c=rand();
  27. d=rand();
  28. e=rand();

  29. strRandom.Format(strFormat,a,b,c,d,e,t);
  30. return strRandom;
  31. }

  32. //验证算法
  33. void CMentoSupplicantDlg::Clog()
  34. {
  35. int i,j=0;
  36. int nLength = 0;     //number of bytes read from the file
  37. const int nBufferSize = 0x4000;  //checksum the file in blocks of 4096 bytes
  38. BYTE Buffer1[nBufferSize];   //buffer for data read from the file
  39. BYTE Buffer2[nBufferSize+16];  //buffer for data to MD5 Checksum
  40. BYTE md5rev[16];                 //buffer for receive MD5 from the Server
  41. BYTE *md5Dig1,*md5Dig2;
  42. ULONGLONG lActual;

  43. static byte TableC[]={
  44.   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  45.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  46.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  47.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  48.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  49.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  50.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  51.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  52.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

  53. // Authentication Server MD5 Hash
  54. for (i=0;i<16;i++)
  55.     md5rev[i]=bMD5Source[24+i];

  56. // Tranform to TableC
  57. TableC[0]=md5rev[0];
  58. for (i=1;i<8;i++){
  59.      TableC[i*18-1]=md5rev[i*2-1];
  60.      TableC[i*18]=md5rev[i*2];}
  61. TableC[143]=md5rev[15];      

  62. // Check 8021x.exe, Exist ?
  63. if (CFile::GetStatus(strRJFileN,FileStatus)==FALSE){
  64.     //PrintOutput(" >> 无法找到“8021x.exe”!!!");
  65.     //PrintOutput("    请复制到本程序目录下,");
  66.     //PrintOutput("    否则无法生成Ruijie客户端信息。");

  67.     //return a 32 bits Random string
  68.     strMD5Hash=Randstr(false);

  69.     return;
  70. }

  71. // Open the 8021.exe for reading.
  72. CFile File(strRJFileN, CFile::modeRead | CFile::shareDenyWrite | CFile::typeBinary);

  73. try
  74. {
  75.   //checksum the file in blocks of 4096 bytes
  76.         lActual=File.Seek (0x1000,CFile::begin);
  77.   while ((nLength = File.Read( Buffer1, nBufferSize )) > 0 && j<8)
  78.   {
  79.    
  80.         for (i=0;i<16;i++){
  81.             Buffer2[i]=md5rev[i];}
  82.         for (i=0;i<nBufferSize;i++){
  83.             Buffer2[i+16]=Buffer1[i];}
  84.             
  85.          //Return each block MD5 Hash
  86.          md5Dig1=ComputeHash(Buffer2,nBufferSize+16);
  87.             
  88.          for (i=0;i<16;i++){
  89.                 TableC[18*j+i+1]=md5Dig1[i];}
  90.          j++;

  91.   }//end of while

  92.        // PrintOutput( "MD5_1to8_Done!");
  93.         md5Check=ComputeHash(TableC,144);
  94.         
  95.         //not the best work....
  96.         CString strTemp,strFormat;
  97.         strMD5Hash="";
  98.         for (i=0;i<16;i++){
  99.             if (md5Check[i]) {//if outside
  100.                 if (md5Check[i]>0x0f){
  101.                     strFormat="%x";}
  102.                 else{
  103.                     strFormat="0%x";}

  104.                 strTemp.Format(strFormat,md5Check[i]);
  105.                 strMD5Hash=strMD5Hash+strTemp;}
  106.             else{//if outside
  107.                 strMD5Hash=strMD5Hash+"00";}//end of if outside
  108.             
  109.          }//end of for
  110.          PrintOutput(" >> Ruijie “8021x.exe” 验证 MD5: ");
  111.          PrintOutput("    "+strMD5Hash);   
  112.   return;
  113. }//end of try

  114.    //catche Exception error for debug only
  115. catch (CFileException* e )
  116. {
  117.         #ifdef _DEBUG
  118.             afxDump << "File could not be opened " << e->m_cause << "\n";
  119.         #endif
  120.   throw e;
  121. }//end of catch
  122. }//end of fuction
复制代码
回复 支持 反对

使用道具 举报

 楼主| 水妖精? 2006-7-3 19:46 显示全部楼层 来自: 中国辽宁大连
回复 支持 反对

使用道具 举报

老猪依人 2006-7-3 20:18 显示全部楼层 来自: 中国辽宁大连
???????????啥意思?
回复 支持 反对

使用道具 举报

萬歲爺 2006-7-3 20:25 显示全部楼层 来自: 中国辽宁大连
主要是干什么的?
回复 支持 反对

使用道具 举报

 楼主| 水妖精? 2006-7-3 20:53 显示全部楼层 来自: 中国辽宁大连
免认证,可以免费上网。
ps:特指使用锐捷认证的学校机关。
回复 支持 反对

使用道具 举报

风过无痕 2006-7-4 16:18 显示全部楼层 来自: 中国辽宁大连
8知道 也用不上了
回复 支持 反对

使用道具 举报

vega 2006-7-4 17:37 显示全部楼层 来自: 中国辽宁大连
不懂,也用不上
回复 支持 反对

使用道具 举报

大连QQ游戏点卡 2006-7-5 12:40 显示全部楼层 来自: 中国辽宁大连
这个怎么用? 我学校是这个
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

  • 0 关注
  • 2 粉丝
  • 0 帖子
 

天健社区APP