• .NET Core 3.1 破解58二手房价格


      首先引入 using System.Windows.Media; 

     1    var strSecert = cs.strSecerts;
     2             var dict = new Dictionary<int, string>();
     3             ICollection<FontFamily> fontFamilies = Fonts.GetFontFamilies(fontFamiliesPath);
     4             var families = Fonts.GetFontFamilies(familiesPath);
     5 
     6             foreach (FontFamily family in families)
     7             {
     8                 var typefaces = family.GetTypefaces();
     9                 foreach (Typeface typeface in typefaces)
    10                 {
    11                     GlyphTypeface glyph;
    12                     typeface.TryGetGlyphTypeface(out glyph);
    13                     IDictionary<int, ushort> characterMap = glyph.CharacterToGlyphMap;
    14                     foreach (KeyValuePair<int, ushort> kvp in characterMap)
    15                     {
    16                         if (!dict.Any(t => t.Key == kvp.Key))
    17                         {
    18                             dict.Add(kvp.Key, kvp.Value.ToString());
    19                         }
    20                     }
    21                 }
    22             }
    23             var resultStr = "";
    24             for (int i = 0; i < strSecert.Length; i++)
    25             {
    26                 var chars = Char.ConvertToUtf32(strSecert, i);
    27                 var item = dict.FirstOrDefault(t => t.Key == chars);
    28                 // resultStr = item.Value;
    29                 var ss = int.Parse(item.Value) - 1;
    30                 resultStr += ss.ToString();
    31             }
    32             var ff = resultStr;
    strSecert变量为乱码(加密)文字
    resultStr变量为破解后文字
    fontFamiliesPath/familiesPath 变量都为TTF字体文件路径
  • 相关阅读:
    「学习笔记」Min25筛
    hash索引
    Thread的setDaemon(true)方法的作用
    Reactor模式详解
    题目整理
    jstat命令查看jvm的GC情况 (以Linux为例)
    jvm参数调优
    以网游服务端的网络接入层设计为例,理解实时通信的技术挑战
    Java 工程师成神之路
    ID生成 雪花算法
  • 原文地址:https://www.cnblogs.com/nh34546/p/13453613.html
Copyright © 2020-2023  润新知