C# How can I create a simple time based trial vers

2020-05-28 10:41发布

I have a C# program that I would like to sell and I want to offer a 14 day trial, I understand that all piracy prevention schemes are overcome so I don't want to waste much time doing this. Could anyone offer any suggestion and even some sample code?

Thanks

标签: c#
9条回答
做自己的国王
2楼-- · 2020-05-28 10:53

If you do not want to waste time in designing a licensing scheme, consider a ready-to-use system like CryptoLicensing - it supports X day trials among other things.

DISCLAIMER: I work for LogicNP Software, the developers of CryptoLicensing.

查看更多
劫难
3楼-- · 2020-05-28 10:54

I would use .NET Reactor over at www.eziriz.com

查看更多
4楼-- · 2020-05-28 10:57

My choice would be to store the date of the install (encrypted with a key) in the registry or config file. Look at this each time the application starts.

You can protect your app.config file using something like the RsaProtectedConfigurationProvider .

Obviously if they decompile the source they'll find the key in it, obfuscating might help this a bit, or using public/private key but that is probably an overkill for what you need.

查看更多
你好瞎i
5楼-- · 2020-05-28 11:02

To get the present 'Time' in C you have to use the header file stdlib.h and the function:

system("echo %time%");

Program:

main(){
  system("echo %time%");
  getch();
}
查看更多
Rolldiameter
6楼-- · 2020-05-28 11:08

Store the date of the install encryped as mentioned.

Also store todays date every time the app starts. If the day suddenly has gone back in time, you know they've cheaten and you close the program.

查看更多
Fickle 薄情
7楼-- · 2020-05-28 11:11

Just do a nag screen if it's not registered. People are going to steal your software, whether you like it or not. Wasting time on a copy protection system is just going to make it more frustrating when people steal your software.

A gentle reminder that it's still in the trial stage will probably suit you better, ala WinRar.

查看更多
登录 后发表回答