www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Getting Source code from complied code.

reply vino.B <bheeman.vino hotmail.com> writes:
Hi All,

   Request your help on how to get the source code, i wrote a 
program named clean.d, complied it and by mistake deleted the 
source code(clean.d), so can we get back the source using the 
complied program(clean), if yes, can you any one help on the same.


From,
Vino.B
Jun 28 2018
next sibling parent reply Basile B. <b2.temp gmx.com> writes:
On Thursday, 28 June 2018 at 08:01:42 UTC, vino.B wrote:
 Hi All,

   Request your help on how to get the source code, i wrote a 
 program named clean.d, complied it and by mistake deleted the 
 source code(clean.d), so can we get back the source using the 
 complied program(clean), if yes, can you any one help on the 
 same.


 From,
 Vino.B
You cant. You can disasm that's all (with Hopper or IDA Free 7).
Jun 28 2018
parent reply vino.B <bheeman.vino hotmail.com> writes:
On Thursday, 28 June 2018 at 08:21:20 UTC, Basile B. wrote:
 On Thursday, 28 June 2018 at 08:01:42 UTC, vino.B wrote:
 Hi All,

   Request your help on how to get the source code, i wrote a 
 program named clean.d, complied it and by mistake deleted the 
 source code(clean.d), so can we get back the source using the 
 complied program(clean), if yes, can you any one help on the 
 same.


 From,
 Vino.B
You cant. You can disasm that's all (with Hopper or IDA Free 7).
Hi Basile, Thank you very much, luckily the file was backed up by the backup scheduler, so was able to restore the same. From, Vino.B
Jun 28 2018
parent Steven Schveighoffer <schveiguy yahoo.com> writes:
On 6/28/18 4:33 AM, vino.B wrote:
 Hi Basile,
 
   Thank you very much, luckily the file was backed up by the backup 
 scheduler, so was able to restore the same.
 
I was going to suggest, next time use a backup, but you already have. Amazing how nice it is when you realize that has happened :) I once had 2 weeks worth of work gone to a hard drive crash, because there was no backup. My company actually paid to have the drive restored because it was cheaper than recreating the project. Definitely learned my lesson then. -Steve
Jun 28 2018
prev sibling parent Timoses <timosesu gmail.com> writes:
On Thursday, 28 June 2018 at 08:01:42 UTC, vino.B wrote:
 Hi All,

   Request your help on how to get the source code, i wrote a 
 program named clean.d, complied it and by mistake deleted the 
 source code(clean.d), so can we get back the source using the 
 complied program(clean), if yes, can you any one help on the 
 same.


 From,
 Vino.B
Use a versioning system and push important changes as soon as you're done with smth to a remote location ; ). E.g. Git
Jun 28 2018