powershell 解码Labtech Agent EDF值
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell 解码Labtech Agent EDF值相关的知识,希望对你有一定的参考价值。
function ConvertEDF {
param($Value)
$suckurity = $Value
$missleCodes = [byte[]](3, 44, 65, 12, 95, 123, 84, 240, 229, 167, 10, 154, 45, 89, 103, 219)
$byteMe=[System.Convert]::FromBase64String($suckurity)
For ($i=0; $i -le $byteMe.GetUpperBound(0); $i++) {$byteMe[$i]=[byte]$byteMe[$i] -bxor [byte]129}
$NaCl=[System.Text.Encoding]::UTF8.GetString($byteMe,0,8)
$r = new-object System.Security.Cryptography.RijndaelManaged
$r.key=(new-Object Security.Cryptography.MD5CryptoServiceProvider).ComputeHash([Text.Encoding]::UTF8.GetBytes("Thank you for using LabTech.$NaCl"))
$r.IV=$missleCodes
$d=$r.CreateDecryptor()
$ms = new-Object IO.MemoryStream @($byteMe,8,($byteMe.Length-8))
$cs = new-Object Security.Cryptography.CryptoStream $ms,$d,"Read"
$sr = new-Object IO.StreamReader $cs
Write-Output $($sr.ReadToEnd())
$sr.Close(); $cs.Close(); $ms.Close(); $r.Clear()
}
$ClientEDF = Get-Content $env:windir\LTSvc\ClientEdf.ini
$EncodedValue = ($ClientEDF | Where {$_ -like "ITGlue:*"}) -replace "ITGlue:",""
ConvertEDF -Value $EncodedValue
以上是关于powershell 解码Labtech Agent EDF值的主要内容,如果未能解决你的问题,请参考以下文章
D盘打开powershell安装numpy为啥安装到了C盘
RSyslog Windows Agen 安装配置
Linux7安装oracle11g报错 Error in invoking target ‘agen
SQL server 2012 数据库 序列号查看
将 .EXE 编码/解码为 Base64
asyncio协程并发