Closed steve02081504 closed 3 months ago
5.5.1.0
8.0.1
Windows
An error exe is generated when reading and rewriting a program generated by Tinysharp. Its not a big deal. So okay not to fix it if y want.
~ >'"Hello 世界!👾"' | ps12exe Compiled file written -> 1024 bytes ~ >./a.exe Hello 世界!👾 ~ >Get-ChildItem ~/workstation/pwshProjs/ps12exe/src/bin/AsmResolver | ForEach-Object { Add-Type -LiteralPath $_ } ~ >$file = [AsmResolver.PE.PEImage]::FromFile('.\a.exe') ~ >$Builder = New-Object AsmResolver.PE.DotNet.Builder.ManagedPEFileBuilder ~ >$file = $builder.CreateFile($file) ~ >$file.Write('.\a.exe') ~ >./a.exe 爮汥捯 䀀ȀЀ ~ >
Hello 世界!👾
爮汥捯 䀀ȀЀ
This is by design. ManagedPEFileBuilder does a full reconstruction of the PE and does not necessarily preserve existing segments unless you explicitly tell it to do as such.
ManagedPEFileBuilder
got it! txh for explaning.
AsmResolver Version
5.5.1.0
.NET Version
8.0.1
Operating System
Windows
Describe the Bug
An error exe is generated when reading and rewriting a program generated by Tinysharp. Its not a big deal. So okay not to fix it if y want.
How To Reproduce
Expected Behavior
Actual Behavior
Additional Context