This is related to Alternate Application.Run Winform In Program.cs File
I have created textfile with coding of alternate winform execution as above and if somebody or cracker try to alter /modify it than is it possible to find out that the textfile is altered/modified ? and if it is possible than I wants to delete program.cs file by programmatically on basis of altered/modified textfile by cracker.
How can I do it by programmatically ?.
And last but not least question is suppose if I deleted program.cs file by coding on basis of above than is it possible to add new program.cs file by cracker?.
Summery Of Question:
-
Trace If Textfile is Modify or Alter?
-
How to Delete Program.cs File On The Basis Of Textfile is modified?
-
Can Cracker Can Add New Program.cs File After Deleted By me?
A quick answer is: Hash the file/data, but this requires protecting the hash or the algorithm.
Writing your own security is very difficult, almost always flawed and rarely protects what it is supposed to. What exactly are you protecting – and against whom? Did you implement encryption and the like as suggested in your other post?
I’d mirror a suggestion from a commenter on your original post: If this is serious, consider 3rd party tools or mechanisms.
Edit: directly answering the questions:
Yes. Create a Hash or CRC when you create the file or data.
Create a hash again in the future and compare with original hash. If different do a File.Delete.
If you don’t control the computer and lock it down, anyone can add any file they wish.
Without better details what you are doing, it is difficult to give focused answers.