How to adding "TimeDateStamp" and "set checksum" into our code ? lazarus / 13-General ---------------------------------------------------------------------- Takeda · 2011-04-29 14:15 Does someone here could teach me about how to adding "TimeDateStamp" (build) and "set self-checksum" into our code that compiled using Lazarus?  Because I take a look into my executable, and I found there are not any TimeDateStamp inside my executable.  How to activate it in Lazarus?  Thanks Before, matsuki, takeda. ---------------------------------------------------------------------- Takeda · 2011-04-29 22:27 OMG.. Not yet anyone in here to respond this question..  I'm very disappointed. So sad, to think about it and discussed it by ownself. ---------------------------------------------------------------------- fabienwang · 2011-04-30 04:20 on which platform? on Unix/Linux there is executable info rules, but on windows there is a version number you can maintain in the project option. I've never seen a timedatestamp in it. And what do you mean by set self-checksum ---------------------------------------------------------------------- Takeda · 2011-04-30 05:30 Quote from: FabienWang on April 30, 2011, 06:20:43 amon which platform? on Unix/Linux there is executable info rules, but on windows there is a version number you can maintain in the project option. I've never seen a timedatestamp in it. And what do you mean by set self-checksum In Windows Platform, Sir. I mean not build version-number, but something such as "time-date stamp" which created by the compiler automatically every time we build or rebuild. Like e.g. Microsoft Visual Studio and Delphi, now have this capability. e.g. (case) Now, 30 April 2011, We build our project, and internally the compiler (Microsoft Visual Studio or Delphi 2009-higher) will automatically generate the date and adding it into our compiled file. So when we check it using "ExeInfo PE", we'll find the compiler stamping "the date" into our binary executable. But I found the Lazarus (or might FreePascal) not do the same thing like the other did. Well, Self-checksum is the feature of the compiler (in Delphi 2009-higher and Micosoft Visual Studio). It kind of "internal signature" and will be checked internally by the executable loader (the binary executable itself) every time when the program is starting. "In case", when the program was modified by unauthorized  , (like infected by the viruses, cracked or patched by cracker), the program will say to our user that the program was modified by unauthorized act and then program will not running. In this case, indirectly we have protect our users from viruses attack by preventing the program to running when was modified by unauthorized. So there is any possibility for me to adding "TimeDateStamp" and "set checksum" into my code ? So sorry coz my English is not good enough,Sir. Thanks for your respond. I'm so happy. Regards, Takeda. ---------------------------------------------------------------------- fabienwang · 2011-04-30 06:02 For the first point: TimeDateStamp, i don't see how it will more protect your program from viruses. A simple Build number is the same... For the second, it is indeed possible to calculate the MD5 of your own application, but then how do you compare? Where will be saved your md5 value? Because you can't save the waited md5 value in the own program, because you don't know the md5 until you compile the application... you can see the project sample here: https://code.google.com/p/lazsamples/source/browse/trunk/self_md5/unit 1.pas ---------------------------------------------------------------------- Takeda · 2011-04-30 06:55 Quote from: FabienWang on April 30, 2011, 08:02:41 amFor the first point: TimeDateStamp, i don't see how it will more protect your program from viruses. A simple Build number is the same... For the second, it is indeed possible to calculate the MD5 of your own application, but then how do you compare? Where will be saved your md5 value? Because you can't save the waited md5 value in the own program, because you don't know the md5 until you compile the application... you can see the project sample here: https://code.google.com/p/lazsamples/source/browse/trunk/self_md5/unit 1.pas Hihihi.. Not protect the program but prevent our users to spread-out the viruses by "load and mapping" the infected program into memory.  Yupz, that's why I said, it's compiler feature.  Compiler adding this info, into first path in our binary-executable. Wow.. That's cool, Sir. I love it.  Thank you, Sir. ---------------------------------------------------------------------- marcov · 2011-05-01 10:00 The compiler allows date and time to be included: http://www.freepascal.org/docs-html/prog/progsu38.html#x44-430001.1.38 ---------------------------------------------------------------------- Takeda · 2011-05-04 07:07 Quote from: marcov on May 01, 2011, 12:00:20 pmThe compiler allows date and time to be included: http://www.freepascal.org/docs-html/prog/progsu38.html#x44-430001.1.38 Yupz.. Thank you very much, Sir..  Now, I adding this trick into my project.. Best regards for you, especially for your respond. I love it.  Two thumbs for Lazarus Developer Teams.