-
-
[原创]第十题 初入好望角WriteUp
-
发表于: 2019-3-14 22:48 2814
-
使用dnSpy 打开程序
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
// Token: 0x02000003 RID: 3
internal class a
{
// Token: 0x06000004 RID: 4 RVA: 0x0000209B File Offset: 0x0000029B
private static void a(string[] A_0)
{
Console.WriteLine("Please Input Serial:");
if (global::a.a(Console.ReadLine(), "Kanxue2019") == "4RTlF9Ca2+oqExJwx68FiA==")
{
Console.WriteLine("Congratulations! : )");
Console.ReadLine();
}
}
// Token: 0x06000005 RID: 5 RVA: 0x000020D4 File Offset: 0x000002D4
public static string a(string A_0, string A_1)
{
byte[] bytes = Encoding.UTF8.GetBytes("Kanxue2019CTF-Q1");
byte[] bytes2 = Encoding.UTF8.GetBytes(A_0);
byte[] bytes3 = new PasswordDeriveBytes(A_1, null).GetBytes(32);
ICryptoTransform transform = new RijndaelManaged
{
Mode = CipherMode.CBC
}.CreateEncryptor(bytes3, bytes);
MemoryStream memoryStream = new MemoryStream();
CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Write);
cryptoStream.Write(bytes2, 0, bytes2.Length);
cryptoStream.FlushFinalBlock();
byte[] inArray = memoryStream.ToArray();
memoryStream.Close();
cryptoStream.Close();
return Convert.ToBase64String(inArray);
}
// Token: 0x04000003 RID: 3
private const string a = "Kanxue2019CTF-Q1";
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
赞赏
他的文章
- [原创]KCTF 2024 第十题 试探 1984
- KCTF2023第五题 争分夺秒 9501
- KCTF2022第三题 石像病毒 7282
- [原创]KCTF2021春季赛第四题 英雄救美 10009
- [原创] 第五题:魅影舞姬 3192
看原图
赞赏
雪币:
留言: