On Tuesday, 6 January 2015 at 17:15:28 UTC, FrankLike wrote:
How to prevent sensitive information is displayed when the
extension 'exe' is modified to 'txt' on windows?
If you build a exe ,such as which can get Data from
DataBase,when you modify the exe's extension to 'txt',
and you open it by notepad.exe (on windows),you will find the
info,it's important for me,so how to stop the info to display
?
Notepad to display the infos ? are you serious ? Have you ever
heard about IDA and more globally about the disassemblers ? In a
disassembler you always have a "strings" display, in IDA you have
the "Names"... which are basically like "strings" with infos
about where they are used. It will blow your mind...
To hide the infos you can also (I've seen people say that you can
use a packer) encrypt the strings and decode them at run-time
(e.g base64, a simple XOR, etc) and use the import() idiom:
https://p0nce.github.io/d-idioms/#Embed-a-dynamic-library-in-an-executable
to import the compiled things.
I've made a simple software in this spirit, even if it's not made
to encrypt/hide (it's more globally a resource manager), it can
be used to hide the strings since it encodes in base 85 and base
64: https://github.com/BBasile/Resource.d