Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi
I am a Linux newbie, so I'll try to explain my problem.
I created a program in C# that receives command's from Ethernet and translates to the RS232 port. I installed a Linux machine and then installed MONO. MONO permits running C# programs in Linux machines.
I need to let the system boot normally in console mode. At the end of the boot phase my program start working automatically. My problem is that If i sell this system. Someone can copy my program and use it.
Is there any way to protect my program? The system File? Even if someone connects directly to the system HDD?
The first thing I'd do would be to stop using a Windows/Microsoft language to write a program for Linux. Yes, you CAN use Mono to make it work, but it's not the best way to go. Write the program in C/C++, and compile it natively on Linux. The binary program will be on the system, but not the source code. Even at that...the program can be reverse-engineered or 'de-compiled', and let someone get your code, or at least enough of it to modify it.
No idea what you mean by "the system file", or what you mean by "someone connects directly to the system HDD", but if the system boots, someone can copy ANYTHING they want to another media. Welcome to the world of software development.
Also...I'm not sure why you wrote that program, since (based on your description), it does what the Linux program 'netcat' already does.
Hello
What i mean by "the system file" is "the file system". I was wondering if its possible to encrypt the file system preventing any type of copy, Even if they take out the HDD (Hard Drive Disk) and tries to copy directly from it.
But i Understand that programing in C/C++ is better.
You can encrypt the filesystem, but if you're selling this computer to somebody else you're going to have to give them the password so they can use it. The filesystem is going to have to be decrypted anyway in order to run your program, which means they can copy it off then.
Encrypted filesystems are only useful on machines that you have control over, and you're afraid that while the machine is out of your possession somebody might steal the hard drive, plug it into another machine, and pull the files off. While the machine is on and running, an encrypted filesystem is just as vulnerable as any other filesystem.
Last edited by suicidaleggroll; 10-14-2012 at 12:01 PM.
You further protect it either by some authentication scheme where one calls up or logs on to your server. Your server configures some part to work. Otherwise you need a type of external security device (sometimes called a dongle).
Such ancient "proprietary" mentality: Is there a way I could write a dictionary and encrypt it so that whoever uses it is not able to define the words until maybe paying me for inventing dictionary?
Open it up so that others may improve it for the benefit of humanity.
You can distribute it under the terms of GPL. It will be protected in the way that no one can use your code in a proprietary work. If you want to make money from your software, that's a different subject.
Point one: C# is neither a Windows nor a Microsoft language, it standardized by the ECMA: http://www.ecma-international.org/pu...s/Ecma-334.htm
There may be a political opinion whether to use it or not on free systems, but this is nothing more than an opinion and totally unrelated to the OP's question.
Point two: "Release it under the GPL" is also a political opinion and also totally unrelated two the OP's question. Why is it that many people that preach freedom forget the freedom of the developer to release under whichever license he wants to release?
@livesimply: As already pointed out, there are several ways to do what you achieve:
1. Use a hardware dongle that is detected at startup by your software. If it isn't present then your software simply should refuse to work after displaying a message that the dongle is missing. This is the most expensive solution and is only profitable for very expensive software.
2. Make the application call home to authenticate at startup. For this your software has to be identifiable (it needs a serial number and some type of hash for the hardware it is running on) This method will obviously not work if no Internet connection is available where your software is used and may have problems if your software runs in generic environments (like virtual machines), but should be OK if you sell your software together with the hardware.
3. Make some type of hash over the hardware your software runs on and generate a license key that is dependent on this information. this is the most used way, I would think.
Just keep in mind there is no way to be totally secure, if your software is interesting enough for people knowledgeable about cracking copy-protections your software sooner or later will be cracked.
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802
Rep:
Another thing to consider,...
If your program "hooks" into the kernel, you may HAVE to release it under the GPL. For what I mean by that do a search on the net for the terms; GPL hooks viral license ... (not my terms or viewpoint, but it will be easier to bring up results about how/when code gets pulled into a GPL license).
Also, from a practical standpoint, I can't think of anyone who would want to install a proprietary program with DRM, when an open source alternative (or set of alternatives) exists. That said, RedHat made themselves into a $1B company in terms of annual revenue, while giving software away and selling support (and other stuff)... Just a thought.
It's not unrelated, and I think I explained in what manner GPL protects the author's work. Apart from that, I agree.
The OP asks specifically how he can prevent other people from copying his work to use it on other machines without getting a license from him. The GPL does in no way at all prevent that, in the contrary, the GPL specifically allows that.
Point one: C# is neither a Windows nor a Microsoft language, it standardized by the ECMA: http://www.ecma-international.org/pu...s/Ecma-334.htm
There may be a political opinion whether to use it or not on free systems, but this is nothing more than an opinion and totally unrelated to the OP's question.
Point two: "Release it under the GPL" is also a political opinion and also totally unrelated two the OP's question. Why is it that many people that preach freedom forget the freedom of the developer to release under whichever license he wants to release?
@livesimply: As already pointed out, there are several ways to do what you achieve:
1. Use a hardware dongle that is detected at startup by your software. If it isn't present then your software simply should refuse to work after displaying a message that the dongle is missing. This is the most expensive solution and is only profitable for very expensive software.
2. Make the application call home to authenticate at startup. For this your software has to be identifiable (it needs a serial number and some type of hash for the hardware it is running on) This method will obviously not work if no Internet connection is available where your software is used and may have problems if your software runs in generic environments (like virtual machines), but should be OK if you sell your software together with the hardware.
3. Make some type of hash over the hardware your software runs on and generate a license key that is dependent on this information. this is the most used way, I would think.
Just keep in mind there is no way to be totally secure, if your software is interesting enough for people knowledgeable about cracking copy-protections your software sooner or later will be cracked.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.