Make resources inaccessible for user

℡╲_俬逩灬. 提交于 2019-12-05 19:38:47
HonkyTonk

A simple way to handle it would be to compress all the files into a password protected ZIP file that you unzip in memory (onto a memory based file system if you want to be fancy).

The obvious drawback is that you'll either need to keep everything in memory or do several calls to get the files you want at the moment.

EDIT: A quick search gave me this link to a Q&A relating to this: Simple way to unzip a .zip file using zlib

Warning

The hacker can still access these strings by detaching the application process with a debugger while the application is running.

It depends how badly you want to hide things from users; how much you're willing to invest versus the reward. Here are some ideas:

  1. Just change / remove the file extensions of your resource files. Most average users will be stopped already.
  2. Modify the files slightly to corrupt it by adding some extra bytes at the beginning which your app knows to skip. The extra bytes could be a misleading header or garbage.
  3. Store the resources in a container / archive format like ZIP or Blizzard's MPQ. Optionally with a password.
  4. Store them as resources in your executable binary. Users would need to use a resource editor / viewer to see them; most users won't even know they're there.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!