C++ security | Sololearn: Learn to code for FREE!

+3

C++ security

if i write a c++ code which inside the code has important data such as where is Database. After compile , can anyone see it and access the source code?

3/13/2021 4:20:44 AM

ali

3 Answers

New Answer

+6

Hard coded strings in a program, such as urls, pathnames, and (God forbid) passwords are trivial to retrieve from compiled code. You can simply view the executable in a hex editor and read it. There are command line tools that can extract such strings from an executable.

+3

When compiling it becomes machine code. To do what you say you must decompile it. I wish you luck in getting the answer

+3

Getting the original source code from the object file after compilation is impossible. By using stuff like a disassembler and decompiler, you will only get code showing similar behaviour but there is no way to prove if it would be the original one or not till the time you don't have the original source file.