这平台下的软件解决思路
本帖最后由 y8160000 于 2021-3-28 09:55 编辑链接:https://cloud.189.cn/t/JFbyEveYju2u访问码:kho5
看了论坛里有这类似的文章,尝试学习一下,结果还是不一样
尝试换了教程中的软件找到了,但不知如何跳过
然后下载 了反 编译软件,结果还是明白不了。
这种环境下的软件最简单的方法思路. // Token: 0x06001F98 RID: 8088 RVA: 0x00559BC0 File Offset: 0x00557DC0
public static void ReadKey()
{
if (UsbKey.mUsbKey == null)
{
UsbKey usbKey = new UsbKey();
usbKey.Load();
UsbKey.mUsbKey = usbKey;
}
UsbKey usbKey2 = UsbKey.mUsbKey;
bool flag = usbKey2.OpenKeyEx();
try
{
byte[] array = new byte;
if (!usbKey2.Read(array, 0))
{
if (!flag)
{
throw new Exception("不能读USB加密狗或密钥不匹配1");
}
throw new Exception("不能读USB加密狗或密钥不匹配2");
}
else
{
uint num = (uint)((int)array << 24 | (int)array << 16 | (int)array << 8 | (int)array);
UsbKey.MgtUse = ((num & 4U) != 0U);
UsbKey.StdUI = ((num & 8U) != 0U);
byte[] array2 = new byte;
if (!usbKey2.GetSerial(array2))
{
throw new Exception("读取USB加密狗出错1");
}
int num2 = 4;
if (!UsbKey.CompareArray(array2, 0, array, num2, array2.Length))
{
throw new Exception("读取USB Key出错1");
}
if (!UsbKey.CompareArray(array2, 0, new byte, 0, array2.Length))
{
UsbKey.UsbSn = Convert.ToBase64String(array2);
}
UsbKey.DevSn = Convert.ToBase64String(array, num2, array2.Length);
if ((num & 1U) == 0U)
{
num2 = 20;
DateTime dateTime = Convert.ToDateTime(string.Format("{0:X2}{1:X2}-{2:X2}-{3:X2}", new object[]
{
array,
array,
array,
array
}));
if (DateTime.Now > dateTime)
{
throw new Exception("系统已过期1!");
}
UsbKey.EndDate = dateTime;
}
num2 = 24;
UsbKey.ChnCnt = (int)array;
if ((num & 2U) == 0U)
{
}
num2 = 121;
byte crc = CRC8.GetCRC8(array, 0, num2);
if (array != crc)
{
throw new Exception("读取USB Key出错2");
}
byte[] array3 = new byte;
if (!usbKey2.Read(array3, 1))
{
throw new Exception("不能读USB加密狗1");
}
UsbKey.IsOemUse = (array3 == 70 && array3 == 85 && array3 == 89 && array3 == 71);
if (UsbKey.<ReadKey>o__SiteContainere.<>p__Sitef == null)
{
UsbKey.<ReadKey>o__SiteContainere.<>p__Sitef = CallSite<Func<CallSite, object, bool>>.Create(Binder.UnaryOperation(CSharpBinderFlags.None, 83, typeof(UsbKey), new CSharpArgumentInfo[]
{
CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null)
}));
}
if (UsbKey.<ReadKey>o__SiteContainere.<>p__Sitef.Target(UsbKey.<ReadKey>o__SiteContainere.<>p__Sitef, UsbKey.IsOemUse))
{
uint num3 = (uint)((int)array3 << 24 | (int)array3 << 16 | (int)array3 << 8 | (int)array3);
UsbKey.OemKey = num3;
DateTime dateTime2 = new DateTime((int)(array3 * 100 + array3), (int)array3, (int)array3);
ushort num4 = (ushort)((int)array3 << 8 | (int)array3);
UsbKey.OemEndDate = dateTime2;
UsbKey.OemTipDays = num4;
}
array3 = new byte;
if (!usbKey2.Read(array3, 2))
{
throw new Exception("不能读USB加密狗2");
}
bool flag2 = array3 == 70 && array3 == 85 && array3 == 89 && array3 == 71;
if (flag2)
{
uint num5 = (uint)((int)array3 << 24 | (int)array3 << 16 | (int)array3 << 8 | (int)array3);
if (num5 > 0U)
{
UsbKey.OemFlag = num5;
if (num5 == 1U)
{
string @String = Encoding.UTF8.GetString(array3, 8, 32);
char[] trimChars = new char;
UsbKey.SoftPwd = @string.TrimEnd(trimChars);
}
if ((num5 & 3U) == 3U)
{
try
{
DateTime dateTime2 = new DateTime((int)(array3 * 100 + array3), (int)array3, (int)array3);
UsbKey.OemEndDate_NoUse = new DateTime?(dateTime2);
}
catch
{
}
}
}
}
array3 = new byte;
if (!usbKey2.Read(array3, 3))
{
throw new Exception("不能读USB加密狗3");
}
flag2 = (array3 == 70 && array3 == 85 && array3 == 89 && array3 == 71);
if (flag2)
{
uint num5 = (uint)((int)array3 << 24 | (int)array3 << 16 | (int)array3 << 8 | (int)array3);
if (num5 > 0U)
{
UsbKey.OemFlag = num5;
if (num5 == 4U)
{
string string2 = Encoding.UTF8.GetString(array3, 8, 32);
char[] trimChars = new char;
UsbKey.SoftPwd_3 = string2.TrimEnd(trimChars);
}
}
}
}
}
finally
{
usbKey2.CloseKey();
}
} 看看有没有读取成功的地方 byh3025 发表于 2021-3-28 10:34
看看有没有读取成功的地方
没有找到读狗成功之类的
页:
[1]