Skip to content

Commit

Permalink
Ver2.0.2.2a
Browse files Browse the repository at this point in the history
2.0.2.2a对比2.0.2.1d更新内容
增加:
DDTVLiveRec项目(需要单独下载),一个纯粹的自动录制下载工具,支持windows,linux(x64,ARM),macOS,也就是路由器,树莓派什么的也可以录制啦
断流续下后自动合并Flv文件的功能
录制结束后自动转码为MP4文件并修复时间轴
全新的消息文件系统
提供日志和下载文件状态查看功能的网页功能

修改:
从之前的 [只录制启动后开播的视频流] 修改为[动后会马上根据配置列表开始录制]
用.NET Core3.1重写和优化了一大堆的东西,方便跨平台和外部引用
下载系统更新为2.0
修复登陆后一键导入失效的问题
修复设置界面的输入框输入困难的问题
优化稳定性和修复了一箩筐的彩蛋(bug)
  • Loading branch information
CHKZL committed May 1, 2020
1 parent 577dd91 commit 6a76aeb
Show file tree
Hide file tree
Showing 45 changed files with 2,156 additions and 623 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,5 @@ healthchecksdb
# End of https://www.gitignore.io/api/csharp
/DDTV_New/待办
/硬解播放器
/DD米线
/DDTV服务端WEB版
22 changes: 21 additions & 1 deletion Auxiliary/Auxiliary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,27 @@
<Reference Include="PresentationCore" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Configuration.ConfigurationManager.4.7.0\lib\net461\System.Configuration.ConfigurationManager.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Data.OracleClient" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Design" />
<Reference Include="System.Management" />
<Reference Include="System.Net" />
<Reference Include="System.Security" />
<Reference Include="System.Security.AccessControl, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.AccessControl.4.7.0\lib\net461\System.Security.AccessControl.dll</HintPath>
</Reference>
<Reference Include="System.Security.Permissions, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Permissions.4.7.0\lib\net461\System.Security.Permissions.dll</HintPath>
</Reference>
<Reference Include="System.Security.Principal.Windows, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Principal.Windows.4.7.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
</Reference>
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
Expand All @@ -119,10 +137,12 @@
<Compile Include="bilibili.cs" />
<Compile Include="Downloader.cs" />
<Compile Include="Encryption.cs" />
<Compile Include="InfoLogger.cs" />
<Compile Include="FlvMethod.cs" />
<Compile Include="InfoLog.cs" />
<Compile Include="MMPU.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RoomInit.cs" />
<Compile Include="外部API.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
195 changes: 135 additions & 60 deletions Auxiliary/Downloader.cs

Large diffs are not rendered by default.

65 changes: 54 additions & 11 deletions Auxiliary/Encryption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Management;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
Expand All @@ -10,6 +11,26 @@ namespace Auxiliary
{
public static class Encryption
{
/// <summary>
/// MD5加密
/// </summary>
public static string Md532(this string source)
{
if (string.IsNullOrEmpty(source))
{
return null;
}
var encoding = Encoding.UTF8;
MD5 md5 = MD5.Create();
return HashAlgorithmBase(md5, source, encoding);
}
/// <summary>
/// 加盐MD5加密
/// </summary>
public static string Md532Salt(this string source, string salt)
{
return string.IsNullOrEmpty(salt) ? source.Md532() : (source + "[" + salt + "]").Md532();
}
#region AES 加密解密

/// <summary>
Expand Down Expand Up @@ -96,17 +117,6 @@ public static string UnBase64(this string source)

#region 内部方法

/// <summary>
/// 转成数组
/// </summary>
private static byte[] Str2Bytes(this string source)
{
source = source.Replace(" ", "");
byte[] buffer = new byte[source.Length / 2];
for (int i = 0; i < source.Length; i += 2) buffer[i / 2] = Convert.ToByte(source.Substring(i, 2), 16);
return buffer;
}

/// <summary>
/// 转换成字符串
/// </summary>
Expand All @@ -131,7 +141,40 @@ private static string HashAlgorithmBase(HashAlgorithm hashAlgorithmObj, string s
byte[] hashStr = hashAlgorithmObj.ComputeHash(btStr);
return hashStr.Bytes2Str();
}
#endregion

#region 机器码(仅用于P2P穿透服务器区分设备使用,传输前会MD5)
public class 机器码
{
// 取得设备硬盘的卷标号
private static string 取得设备硬盘的卷标号()
{
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"c:\"");
disk.Get();
return disk.GetPropertyValue("VolumeSerialNumber").ToString();
}
//获得CPU的序列号
private static string 获得CPU的序列号()
{
string strCpu = null;
ManagementClass myCpu = new ManagementClass("win32_Processor");
ManagementObjectCollection myCpuConnection = myCpu.GetInstances();
foreach (ManagementObject myObject in myCpuConnection)
{
strCpu = myObject.Properties["Processorid"].Value.ToString();
break;
}
return strCpu;
}
public static string 获取机器码(string name)
{
string code = 获得CPU的序列号() +"|"+ 取得设备硬盘的卷标号()+"|"+name;
code = Md532Salt(code, "DDTV");
return code+"|"+ name;
}
}
#endregion

}
}
Loading

0 comments on commit 6a76aeb

Please sign in to comment.