zoukankan      html  css  js  c++  java
  • .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字体文件路径
  • 相关阅读:
    jQuery 选择器
    DOM 文档对象模型+倒计时
    javascript简单写出国际象棋棋盘
    javascript循环语句及函数
    JAVASCRIPT基础
    用纯CSS做的图片切换
    项目练习总结
    用CSS做的简单弹窗
    CSS布局元素
    jQuery属性/CSS使用例子
  • 原文地址:https://www.cnblogs.com/nh34546/p/13453613.html
Copyright © 2011-2022 走看看