Um script do PowerShell pode decodificar o arquivo para texto legível em um sistema Windows, mas, conforme observado por outra resposta, isso não corrige a descriptografia de senha:
Function SonicWall_Exp2Txt ($Exp)
{
$Txt = $Exp -ireplace ".exp$", ".txt"
# Create temporary file names.
$Tmp = "." + $(get-date -uformat %s) + "."
$TmpTxt = $Txt -replace ".txt$", $($Tmp + ".txt")
$TmpExp = $TmpTxt -replace ".txt$", ".exp"
# Show input/output file names while processing.
Write-Host $("'n" + $Exp + "'n--> " + $Txt)
# Remove two "&" characters at the end of an .exp file before decoding it.
( Get-Content $Exp ) -replace ".{2}$" |
Out-File -Encoding default -FilePath $TmpExp
# certutil.exe -decode /?
# Usage:
# CertUtil [Options] -decode InFile OutFile
# Decode Base64-encoded file
# Note:
# certutil.exe aborts if OutFile already exists.
& certutil.exe -decode $TmpExp $TmpTxt
# Reformat the decoded file with line breaks to make it more readable. It
# is also possible to recode the output file with Out-File -Encoding set
# to unicode, utf7, utf8, utf32, ascii, bigendianunicode, default, or oem.
( Get-Content $TmpTxt ) -replace '\&', "'n" |
Out-File -Encoding utf8 -FilePath $Txt
# Remove the temporary files.
Remove-Item $TmpExp
Remove-Item $TmpTxt
}
# Get-ChildItem returns a scalar if one .exp file exists or an array if more
# than one .exp file is present. Force $Files to an array value to avoid
# error if only one file exists as scalars do not have a Count method.
#
$Files = @( Get-ChildItem "." -Filter "*.exp" )
For ($Loop=0; $Loop -lt $Files.Count; $Loop++)
{
SonicWall_Exp2Txt $Files[$Loop].FullName
}
Um exemplo de chamada quando o script é salvo como exp2txt.ps1 :
powershell.exe -NoLogo -ExecutionPolicy bypass -Command exp2txt.ps1 <NUL
Atribuição: Este tópico inspirou o script mencionado, que foi escrito para facilitar a identificação de diferenças de arquivos salvos.