Click here to Skip to main content
15,885,196 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I'm trying to add a HWID lock to my console application (c#)
I really can't find much for aa console application..
How can I require the HWID in my source to match the one of my pc?

Thanks for helping,

Mitch

What I have tried:

I really didn't try that much, I tried a few things which made my code break..
I hope this website can help me any furter!
Posted
Updated 25-Aug-18 7:38am
Comments
[no name] 25-Aug-18 10:45am    
It has absolutely no relation to console app or not. Start reading e.g. this: Searching for a reliable hardware ID[^]
Dave Kreskowiak 25-Aug-18 11:12am    
You have to build your own hardware ID from various piece of information about the machine. There is no way to get a single ID number for a machine from a single source in it in any reliable manner.

I've done something similar by using the computer name (could be any other identifier) to create an encoded string that registers through a web service on startup. Of course, an internet connection is required, at least for the initial registration. For my situation, I needed to be able to reroute dynamically or deny access so an internet connection is required to launch the app.

The server side doesn't have to be anything fancy. I use a sql database, but it could easily be something as simple as an xml document stuck on a hosted site.

One nice thing about this setup is that it allows you to track usage stats/requests.
 
Share this answer
 
Comments
Member 13961392 25-Aug-18 13:52pm    
Any code? hehe
It is irrelevant that it's a console app - the UI doesn't matter or affect the ID you generate in any way.
Start here: C# Hardware ID - Google Search[^]
But don't waste too much time on it: software protection methods and easy to break (look at Adobe: they spend manyears implementing copy protection in Photoshop and the same day they release a new version, hacks are available on crack sites).

Protection has to be a balance of three things: the effort you put into it; the sales it generates as a result of not being able to copy it; the aggravation it causes legitimate users. And the last is significant: it's easy to get a rep for not letting legitimate users use the product they paid for, and very hard to get rid of it.
So think carefully how badly you need to protect your product, and go with a hardware dongle if it's that important.
 
Share this answer
 
Comments
Member 13961392 25-Aug-18 12:41pm    
Hello,

I know but I don't want to sell it to anyone, also I want to keep it private for me and my friends, But since I know my friends are gonna leak it.. I want to secure it atleast a bit and they wont be able to crack it. They won't know how..
I just want a easy HWID locker or anything like that,

Thanks for already replying!

Mitch

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900