Time based serial key generation for PC Software [duplicate] - c#

This question already has answers here:
How can I create a product key for my C# application?
(14 answers)
Closed 9 years ago.
How can i generate serial key for the C# Desktop Application (Windows application) ?
E.g. Software expires after a month. (Trial version).
If user changes Machine time then hoe could it be possible to validate the software for the specified time ?

There are many ways you can generate serial keys for your application in C#. You will most likely have make some sort of trade off between the simplicity (ie. the length of the key, readability, etc), and the security of a particular system.
I would recommend Software Protector(http://softwareprotector.clizware.net/) and SKGL (https://skgl.codeplex.com/). Software Protector would give you a user interface where you can generate your keys and SKGL API would allow you to validate those inside your own application. If you like, you can also include the source code of SKGL API (currently available in C# and VB.NET). You can set a time limit from 0 to 999, 8 custom features, and machine locking.
Regarding the time changing issue, the only way I see is to look up the local time (for that time zone) online using time.windows.com and check if that is equal to the current time on the pc. Please check this article: https://skgl.codeplex.com/discussions/472444
Please note that I am developing both SKGL API and Software Protector, which means that my answer might have a slight tendency!

Related

Is there any possible way to get TimeZone by ZipCode in C#? [duplicate]

This question already has answers here:
Mapping US zip code to time zone [closed]
(12 answers)
Closed 2 years ago.
I have a list of around 400 zip codes. I need to use this code's time zone in the application. For Example:- If my code zip code 35242, after googling I found the time zone for 35242 is GMT-5. Now in the application, I need to add DateTime.Now.AddHours(-5). Is there any way to do this from code or do I have to search the timezone for all zip codes and do it manually?
Q: Is there any way to get time zone from zip code programmatically?
A: Sure. There are lots of databases, programming libraries and web services available. Some paid, some free; some "static" (e.g. a .csv download), others dynamic (e.g. a REST API).
SUGGESTION: Consider trying Google's Timezone API
Getting started with Google Maps Platform
Getting started with Google TimeZone API
C#/VB/Net example code

trying to create leader board and save locally to phone [duplicate]

This question already has answers here:
What is the best way to save game state?
(2 answers)
Closed 5 years ago.
Im making a game in unity and need a leader board that displays highscores and the name they provide at the end of the game.
How do I save these and keep them for later use (even after closing and reopening the game) and then apply them to a leaderboard.
Assuming the people who play are on different computers you'll need to persist the high score data on a machine somewhere. (If they're not on different computers you could just store it in a text file locally on that single machine.) A good choice for persisting would be a database. You'll probably want to secure the database so that people don't mess with it so you may need a web or HTTP front-end that your Unity app interfaces with. You can use WWW in Unity to call your front-end.

Detect Timezone of client using c# [duplicate]

This question already has answers here:
How to get client date and time in ASP.NET?
(6 answers)
How to detect the timezone of a client?
(4 answers)
Closed 6 years ago.
I am using ASP.NET Webforms to get the data of client. till now I figured out the IP address of client and the city & country of the client. I am trying to find a way of how to retrieve the time zone by using its IP Address or country name or city name. I have googled and couldn't find any appropriate answer as everyone talks about injecting javascript to get timezone.
My question is: Is there any way to find timezone of the client? If so then how?`
It is not possible to do this in a reliable way purely with C#. The HTTP spec does not provide any hints of the client's time zone.
You can guess at a client's time zone by using IP geolocation, and there are many free and commercial services that provide time zone information. However there is only a limited degree of accuracy with such an approach.
Even with JavaScript, the current solutions can still only guess the client's time zone. There are improvements happening for this with in the ECMAScript Intl API, but not all browsers fully implement that yet. See more here.
Ultimately, if you need to know the time zone of the client from your back end code, the best thing to do is to ask the user. Provide a time zone picker somewhere in your application.
You may also find this related answer useful.
Have you tried using the TimeZoneInfo Class
It represents any time zone in the world.
https://msdn.microsoft.com/en-us/library/system.timezoneinfo(v=vs.110).aspx

Need help to figure out the unique computer hardware fingerprint [duplicate]

This question already has answers here:
Is WMI a good way to making a hardware fingerprint?
(2 answers)
Closed 9 years ago.
I am creating an licencing system for my windows application and for that i need to create an unique computer identity .
for that i am using
Processor ID and Processor Family
Is this sufficient to create a unique hardware fingerprint or not.
i am little bit confused that Processor ID is unique for all computers or not.
Please provide me an beater idea on that
Thanks
The ProcessorID or CPUID are for identifying the model and feature set of the processor (ARM, x86/x64).
The Pentium III supported a Processor Serial Number (PSN). In addition to only being supported on the Pentium III (and Transmeta's Efficeon and Crusoe processors), the feature had to be enabled in BIOS and raised privacy concerns.
So no, ProcessorID is not unique for all of computers. Additionally, it
is very likely to not be unique across computers in your company
(since many organizations buy multiple computers of the same model).
This question may help you
I know this answer will be better as comment. But I am new and too low to post comments at the moment :(

Create 30 day Trial Version [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
how can i make my product as a trial version for 30 days?
I want to create a 30 day trial version of my software, I can record the installation date and compare it with the sysdate of the machine. The problem is how to validate that the user changed the sysdate and how much time I have to adjust in my trial period.
One option is to consume a web service, but the problem are the offline customers.
This is stand alone windows application.
Is there any method I can use to count XX days since the installation?
There is no way, which is one hundred percent reliable. You can query online website for current date, and users will reverse the requests with network sniffer and spoof the server. You can compare most recent temporary file date to detect clock rewinding, but it might cause other issues. You can do something else, and users will patch your code to remove the protection.
Do it the way that makes sense to you, still without having an obsession around it. Your code will stay hackable anyway. You will be better of reasonably pricing it so that hacking makes no sense.

Categories