Hack Forums
[.NET] Generate random 'file created' date? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Generate random 'file created' date? (/showthread.php?tid=5673291)



Generate random 'file created' date? - FakeGriff - Jul 19, 2017

Hey guys, is it possible to make my application create a random file created date? This is what I have found till now:
Code
System.IO.File.SetCreationTime("C:\Windows\System32\update.com", New Date(2099, 5, 5))



* - Ninja - Jul 19, 2017

System.Random is what you need.


* - FakeGriff - Jul 19, 2017

(Jul 19, 2017 08:39 AM)Ninja Wrote:  System.Random is what you need.

More precise please? How do I write it in my code?


(Jul 19, 2017 10:47 AM)Orka Wrote:  Deduct a random number of days from the current date.

More precise?


* - FakeGriff - Jul 19, 2017

(Jul 19, 2017 12:23 PM)Orka Wrote:  What you need:

I'm not writing your ransomware.

What do you mean by "I am not write your ransomware"?