LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-14-2012, 12:40 AM   #1
suttiwit
Member
 
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 192
Blog Entries: 2

Rep: Reputation: 23
Question Make a closed-source C Program for Windows, Mac and Linux/Unix.


I am helping my family doing some bisuness, and the software is for sale. But, I will show some parts of the program to the forums. The question is, how do I hide the source code?

So people don't copy and distribute it for free.
This is the first time for me making a closed-source software.
 
Old 09-14-2012, 01:36 AM   #2
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
If it is pure html or html with embedded javascript then what you say may be true.

However if it is server based, then what gets rendered in the browser is only the result. ie. source code isn't shown. Likewise for javascript in "included" files (<SCRIPT LANGUAGE=javascript SRC="<yoursourcegoeshere>")

If the project is not web based, then whats the problem?

OK
 
Old 09-14-2012, 03:09 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Relax, nobody will steal your code.
 
Old 09-14-2012, 04:07 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
But they may reverse engineer it and steal your soul.

No honestly if you provide only the compiled program there is a low chance anyone "stealing" the source code.
But like with everything if you give something to someone you never can be sure what he will do with it. And can not be prevented with any means. Beside locking him up and erasing his memory and feelings afterwards so he can't even remember a single bit *pun intended*.

But I would not think about such malice there are more nice people than evil people. Just make a decent price and people will refrain from illegal stuff like sharing or distributing it through dark channel.
 
Old 09-14-2012, 08:06 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
Since I do this sort of thing professionally, I can advise ... and I'm not going to say perhaps what you expect from someone who is posting "here."

What you would need to be able to do is to build installers for each environment ... appropriate to each environment ... and to thoroughly validate and test your program in all of them, and to maintain that for every customer going forward. ("Virtual machines," run by purchased software such as VMWare on whatever host-environment most suits you, and externally connected hard-drives, are ideal for this, because you do need isolated environments but you don't need a room full of computers.)

Important: This represents an ongoing expense-item that you will need to factor into the ongoing cost of your product. You need to sell the product with mandatory periodic maintenance fees, which you should handle by means of, say, a PayPal "subscription" that collects money several times each year. You need to thoroughly plan-out the maintenance and support equation.

Only the Linux environments can be expected to support "open-source" installations. Neither OS/X nor certainly Windows users customarily have any sort of language-compiler on their systems. Furthermore, even the preponderance of Linux users really don't care whether the product that runs their family business is "open source" or not: they want a drop-dead easy, guaranteed-to-work installation process, and a toll-free telephone number (hint: use Skype instead) to call if it does not.

Environments can be subtle. Both Apple and Microsoft right now are making rather big changes to their systems, partly to steer them in the direction of portable devices which they fear are taking hold. Those differences can be problematic for you.

Seriously consider whether you really want to support all three environments at once. Poll your potential customers to find out. Do an inventory of the competition and see where they have chosen to concentrate their efforts. People who really like your product just might go and purchase "whatever computer you tell them to" just to use your product on it. The name of the game is profitability, and "dissipation" is a good way to lose those profits. In other words, move in the directions that your paying clients tell you to.

A business-plan will be very important at these early stages, for your family (your "internal clients") and for you ("the IT manager"). Really test those waters, really work-out the thing on paper, "discover every thing that might possibly bite you in the asterisk before it has a chance to do so, so that it never does." Engage every business stakeholder: you, your family, maybe some potential customers. "Forewarned is forearmed."

Last edited by sundialsvcs; 09-14-2012 at 08:08 AM.
 
Old 09-14-2012, 08:22 AM   #6
suttiwit
Member
 
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 192

Original Poster
Blog Entries: 2

Rep: Reputation: 23
i just found out. I think I will use base64 to encode and the installer will decode. thanks.
 
Old 09-14-2012, 08:50 AM   #7
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
base64 encoding is in now way a secure encryption. (Nearly) Every programming language holds a function to decode that.
 
Old 09-14-2012, 01:27 PM   #8
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,617

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
C, really using C?

If you are programming in anything that compiles down to an executable (or executable and specific libs) you simply hide the source and only allow installation of your executable and libs. This easily gives the end users access ONLY to your product, but not to the source code.

While it is possible to reverse-engineer software from the executable, it is not something most people could handle.

If you share a machine with some of these people, consider doing your development work in a TRUECRYPT folder so that all of your source will be encrypted and only available to someone who knows your password. And do NOT share that password!
 
Old 09-14-2012, 04:10 PM   #9
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by AnanthaP View Post
However if it is server based, then what gets rendered in the browser is only the result. ie. source code isn't shown. Likewise for javascript in "included" files (<SCRIPT LANGUAGE=javascript SRC="<yoursourcegoeshere>")
Not true for the javascript case: the code is executed on the browser so the code must be downloadable by the browser.

Quote:
Originally Posted by suttiwit
I think I will use base64 to encode and the installer will decode.
huh?
 
Old 09-15-2012, 07:15 PM   #10
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Quote:
Originally Posted by AnanthaP
However if it is server based, then what gets rendered in the browser is only the result. ie. source code isn't shown. Likewise for javascript in "included" files (<SCRIPT LANGUAGE=javascript SRC="<yoursourcegoeshere>")
Not true for the javascript case: the code is executed on the browser so the code must be downloadable by the browser.
You are right. It is executed in the front-end (browser). They are 2 different things.

What I meant to say was that the contents of the included scripts aren't visible in the "view source" option of the browser.

OJ
 
Old 09-16-2012, 11:33 AM   #11
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by AnanthaP View Post
What I meant to say was that the contents of the included scripts aren't visible in the "view source" option of the browser.
In Firefox, the src attribute is a clickable link that leads to the script's source. At any rate, anyone who can view the source of the web page can also view the source of included javascript files.
 
  


Reply

Tags
closed, linux, software, source, unix



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make X program not abort when its window is closed/server killed? 10110111 Programming 3 01-17-2010 12:22 AM
LXer: Windows 7: Can Closed Source March Forward? LXer Syndicated Linux News 0 09-27-2008 03:12 AM
Linux / UNIX OS for Motorola RAZR v3 -- Sync it with OpenBSD 4.2/Mac 10.5/Mac 10.3 Doctorzongo Linux - Laptop and Netbook 0 04-30-2008 01:27 AM
how to make windows program working on linux... thaqien Linux - Software 4 02-13-2006 10:54 AM
How do I make a C program adapt to both Windows and Linux? natalinasmpf Programming 15 03-25-2004 11:15 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration