Search code examples
securitybatch-filecompilationtempcracking

How to prevent a compiled batch file store source in tmp?


I need a batch file compiler that doesnt leave the source in %tmp%, so it cant be cracked that way. If there isnt a compiler that can do that, is there a way to prevent it? I have tried AbyssMedia QBFC, but it just makes the file hidden.


Solution

  • I agree with Hackoo: This can't be done.

    A batch file is a Windows command script. Like all scripts being just a text file, also batch files need an interpreter for execution which is the Windows command processor cmd.exe for all versions of Windows NT (NT4, 2K, XP, Vista, ...).

    All bat-to-exe converters simply embed the batch file compressed or even uncompressed into an executable. The created executable extracts the batch file into directory for temporary files and execute it as process resulting in being interpreted with cmd.exe.

    So what all those bat-to-exe tools do can be done for example also with WinRAR by creating a self-extracting RAR archive which on execution extracts the batch file (and other added files) automatically into temporary files directory and executes the batch file which as last line deletes itself.

    In other words bat-to-exe tools are completely useless tools in my point of view. SomethingDark is right: bat-to-exe converters are garbage.