It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I want to create a setup project that in setup time requires serial number to perform installing action and any serial-key can use only in one computer. So, i want all to give me an idea about how to design my setup project ? What things are required to design it ?
Firstly you'll need to come up with an algorithm to generate the keys.
You'll need to decide how to issue the keys. If it's a download only title you could generate the key at the time of purchase.
Once you have a valid key generated you can do one of two things.. Create a key validation algorith, or store the issued keys. Both have their ups and downs.
Upon the user trying to activate the software you'll have to create a machine key of some type. It's up to you what information you base it on but a lot of people would use the computer name, may be store the ip address it's activated from, and some other information that to your requirements fits the bill of the same pc reactivating the software. You can here again generate a unique key based off of this information, sometimes called the activation key.
You'll want the user to be able to reactive the software on the same PC, and most likely a way for them to deactivate it (so should they buy a new computer they can carry the license forward, this is up to you again.)
This is the basics of activating software to a PC. You can integrate this into some setup projects, however there are a lot to choose from and I'd suggest picking one out and seeing what capabilities it already has. Some installers support software activation or at least have a way to add that feature so you may be better off going that route.
Pedro's answer above is also a good start.
If you have custom methods for validating keys then you could create a separate project to handle your own logic and include it in the Setup Project's Custom Actions.
If you are going to leave the capturing of the data to the Setup Project itself you can look here and here. Also, if you're going to have a license agreement you can check this other SO question.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have coded a software which is a windows application in c#.
I wish to create a demo version of my software. How can I use a timer so that the installed software runs for a definate period of time ?
Also is it possible that even if the user machine is formatted, the application wont install after my preset time is exhausted ?
How can I use a timer so that the installed software runs for a
definite period of time ?
You create your own hashing function which generates license key, here one of the components of the key is a final day. So you save that key into a file, and on every start-up check the value present inside it against the actual value of date on PC.
Pro: Easy to implement and put in production
Cons: Easy to hack. Just enough to cheat the DateTime settings of OS.
Another option: you can use some licensing software:
Look here on possible options: Licensing System for .NET
Another again: some web service where you check the data (avoid client side data cheating)
Another again: is limit demo version not on time, but on functionality (limited features are available, you can save data on disk limited amount of time, you can run application limited times... and so on)
Also is it possible that even if the user machine is formatted, the
application wont install after my pre-set time is exhausted ?
no, it's not possible, as formatting means data complete erase.
If you're not going to connect the application to a server-side registration mechanism (which I wouldn't recommend), then you can place a value in the Registry that you use to determine when the trial started. Subtract that value from the current date and time when the application is loaded and you'll be able to determine when it should stop. However, this is not safe from a format or hacking.
My recommended solution is to for server-side registration of the trial software during the first load. This will allow you to ensure that even if they reformatted the drive they couldn't get past the registration. Though this still isn't fool proof because they could register under many aliases, it's at least a lot more trouble. One remaining issue with this idea is what happens if they aren't connected to the internet? Are you going to stop them from using the application? You could couple this idea with the first one and leverage the Registry if they don't have an internet connection.
Either way, preventing people from hacking your registration process is difficult at best. Microsoft has struggled with it since their inception.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm already asked this question, but how I was told, I need to create a proggram without of using ssh clients. How do I say I need to write pure C# program using only different .dll's. And I don't know how I can do it.
If you want to implement a proper solution you want to use OpenLDAP.
You can then use C# to query the LDAP database and use that to create accounts remotely.
I don't think it can be done because you want to gain remote access to the linux system you need to use ssh to gain access to the command line to make your users. Look into ssh there are some good clients for windows that allow you this access and I am sure I found some tutorials on how to make a ssh program a while back.
So since you can't use ssh, it is time to get creative!
I'm assuming you have admin rights. Let me know if you don't.
Set up a database (MySQL) on the Ubuntu box, and create a db/table with the new users to be created. You can insert a row from C# into that table.
Set up a cron job, or some other application (in python, c++, w/e you like) that would periodically check for a new row in that table. If it finds one, extract the data, create the user based on that data, and remove the row. This would have to run as root so BE CAREFUL!
I have done something like this before and it is messy and convoluted, but it works, i guess.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I work on C# project.
In first run of my application SQL Server 2008 wants to create a database, and I wanted SQL Server 2008 to create the MDF file in Programs Files. But Windows(XP) doesn't let me (or SQL) create the file and shows "Access is Denied" error.
Where is a safe place to save My MDF file? Is "Application Data" folder a safe place? Do I have permission to make a file in this folder? Or is there a better place to save my file?
I have a solution to your problem. If you are going to develop for a specific target environment, you have to have a measure of control over the environment, or have contacts with people in your organization who do. It's that simple. YOU have to make this happen, one way or the other. You should have identified this in the early analysis and design phases of your project. Someone should have said, where are we deploying code? Where are we deploying the database? Do we have the permissions to do that? If not, who do we talk to that does? How much lead time to we need to make the request so the group XYZ can deliver in time? What management will need to approve this? Do new global groups need to be created. And on and on. The Stack Overflow community cannot answer these questions for you, because we don't know your organization, and environment. YOU DO, or at least you should. Or at least you should know who to ask so that you can know. What kind of development is this, where you, the developer can't copy a file somewhere? Where is your deployment plan? Why haven't you talked to your helpdesk or sys admins? If there are none, then give your admin rights to the PC in question and do as you please. It doesn't really matter where it is, as long as doesn't invite too much scrutiny (like in the root). YOU HAVE TO OWN THIS, or get buy in from those who do control who has access to which directories. Hopefully you will not take this as me jumping on your case, but just trying to give you a real perspective. I have worked for a number of companies, and there are always little fiefdoms, where certain people control certain resources and you have to navigate the maze. But do just that, and get the job done. This is why you are getting so many downvotes. You are overlooking something extremely obvious - instead of looking outward to Stack Overflow, this is something that you should be querying people inside that space where you are trying to deliver. I hope this helps.
All else fails, install SSMS Express and set up the db that way, and use (local)\SQLExpress in your connection string, and kill the mdf option, then uninstall SSMS. A lot of work, but it will get you results. Make a way. Good luck.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
This isn't a complicated question. I was just thinking through best practice and thought the community might be able to help.
SOLUTION
Have one file that contains an enumeration. Source control can take care of collisions between multiple projects / developers. If all assemblies are compiled and deployed at the same time, the ID will be unique (if cast to int). Alternatively, we could assign a number to each enum. The enum file will be added to each project via "Add As Link".
Original question
I'd like a unique id that begins at one, is set at design time, and is easy to implement in code to identify different classes. In Visual Studio, we have a Tools / Create GUID. That's convenient, but at 16 bytes it's a little larger than I'd like.
It'd be nice to able to retrieve unique sequential integers from a web service.
Has someone already done this? Does such a service already exist?
One alternative is to have a file that acts as a central register for developers... but I'd rather not if possible. It would be nice to have two steps: 1. create class, 2. assign id. Done.
You can create this yourself if you want, make a web service and generate numbers. If you generate the number at design time, alter your code at design time so that no other program cares what your magic number is.
GUIDs can be created relatively quickly on anyone's computer. This means that you don't have to have some "central" database for numbers, which assists performance of certain applications. Otherwise, use the GUID, which is a globally unique identifier that you can generate at run time and design time.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I want to create an encryption software , I want to know can hacker find a password for a encrypted file ?
The short answer is : If there's a reward that's worth it then someone with enough resources can crack it.
Do not create your own algorithm. I repeat do not create your own.
Use an existing library. Many many millions have gone into getting this has difficult to break as possible and unless you have a educational interest in learning how to create them I would strongly urge you to reconsider and use an off the shelf package.
Chances are any algo you come up will be easily broken as crackers have many advanced tools to hand.
I repeat do not create your own.
Please see this question for more info. What techniques do you use when writing your own cryptography methods?
Since you are using C#, probably yes. Anybody can look at a .NET app's source code through Reflector. Using that, one can reverse engineer your encryption algorithm.
If ever you are going to use other languages, lets say some which are not easy to decompile. Decent crackers can debug your program and look into how the encryption is done, through debugging. So, the answer is still Yes.
If you're gonna use C#, or any .NET language, obfuscate your code using an obfuscator.
Yes. He can:
guess it
see it written down somewhere
ask the user for it
discover it by analysing the behaviour of the algorithm
convince the user to change the password to one he knows
You need to design your software and the way it's used to make these as hard as possible. Not all of the above can be solved in software.
Erm... Well... What do you want to know? HOW a hacker can find a password or IF a hacker can find a password. Considering this, make yourself clear and rephrase your question.
First, check out what encryption actually means. There are a lot of possibilities to encrpyt a {file, string, data, whatever}. An important question is: when does your data become invalid? If it is of no use anymore after one week then you do not need a strong encryption, maybe you can write something from scratch. If it still must be encrypted (undecrypted, unhacked) after like two years, you should use an encryption technique like RSA which has its foundation in mathematics and thus has been proven to be unhackable in a time that could give a hacker an advantage by having access to your data.
My answer is based on these two facts: unless the cracker has access to a network of thousands of hosts or a quantum computer, RSA should do the trick.
Peace