LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Best Compiled Languige For File IO (https://www.linuxquestions.org/questions/programming-9/best-compiled-languige-for-file-io-911780/)

SigTerm 11-05-2011 07:09 AM

Quote:

Originally Posted by Zssfssz (Post 4516286)
Ok..,.... Now ignoring the 'compiled' part of the question what is your answer?

If you're afraid of somebody stealing source code of your program, your only option is to put program on the server, and communicate with it via some kind of front-end. There's no other way to protect your program from being reverse-engineered or modified. However this is not security.

Computer security (protection of user data, protection from hacking, etc) has nothing to do with your choice of programming language.

Sergei Steshenko 11-05-2011 09:05 AM

Quote:

Originally Posted by SigTerm (Post 4516433)
...
Computer security (protection of user data, protection from hacking, etc) has nothing to do with your choice of programming language.

But using some languages it's easier to make mistakes which make program insecure, e.g. through buffer overflows.

SigTerm 11-05-2011 09:45 AM

Quote:

Originally Posted by Sergei Steshenko (Post 4516504)
But using some languages it's easier to make mistakes which make program insecure, e.g. through buffer overflows.

That's arguable. IF programmer is fairly skilled, he(/she?) should already know what functions to avoid. If programmer is not skilled, then why is he writing piece of software that must be secure?

Zssfssz 11-05-2011 10:03 AM

That's what I'm trying to protect: the SRC. If someone where to mess with the code it could distroy the program. The code would be available sepererly on the site.
It's under construction, I'm not sure if I'm allowed to post a link. Security is protecting the program from being unintentionally altered. Which is much easier to do with a scripting language because all they would need is a text editor.
The protecting data one is not what I'm shooting for.

dugan 11-05-2011 10:39 AM

Zssfssz, it is fine want to release your program as closed source and to only distribute compiled binaries.

Let me point out that you can compile Python programs into self-running executables. Therefore, Python does fit your requirements.

Sergei Steshenko 11-05-2011 10:49 AM

Quote:

Originally Posted by SigTerm (Post 4516529)
That's arguable. IF programmer is fairly skilled, he(/she?) should already know what functions to avoid. If programmer is not skilled, then why is he writing piece of software that must be secure?

How about index overruns ? How about writing to free'ed memory ?

Sergei Steshenko 11-05-2011 10:51 AM

Quote:

Originally Posted by Zssfssz (Post 4516539)
That's what I'm trying to protect: the SRC. If someone where to mess with the code it could distroy the program. The code would be available sepererly on the site.
It's under construction, I'm not sure if I'm allowed to post a link. Security is protecting the program from being unintentionally altered. Which is much easier to do with a scripting language because all they would need is a text editor.
The protecting data one is not what I'm shooting for.

Are you talking about closing the source because you do not want others to "own" your program ? If so, it has nothing to do with what is called security.

dugan 11-05-2011 10:56 AM

Quote:

Originally Posted by Sergei Steshenko (Post 4516562)
Are you talking about closing the source because you do not want others to "own" your program ? If so, it has nothing to do with what is called security.

He wants to prevent Grandma from altering the program with a text editor, saving it, and then asking him for tech support when her altered version breaks.

It is, of course, as easy use a text editor to "destroy" a compiled program as it is to use a text editor to "destroy" an interpreted one. In fact, I'd say it's even easier.

The way most software projects get around this is to specifically say that only those running unaltered versions of the program are entitled to tech support.

Now, just to be clear:

Quote:

Security is protecting the program from being unintentionally altered.
If someone edits the program with a text editor, then the program is not being "unintentionally" altered, is it?

Sergei Steshenko 11-05-2011 11:05 AM

Quote:

Originally Posted by dugan (Post 4516565)
He wants to prevent Grandma from altering the program with a text editor, saving it, and then asking him for tech support when her altered version breaks.

It is, of course, as easy use a text editor to "destroy" a compiled program as it is to use a text editor to "destroy" an interpreted one. In fact, I'd say it's even easier.

The way most software projects get around this is to specifically say that only those running unaltered versions of the program are entitled to tech support.

And grandma can use 'objdump' (or whatever it is called under Windows), disassemble, alter, recompile.

aspire1 11-05-2011 11:28 AM

To be honest I think you're barking up the wrong tree - scripted language or compiled languge if someone is determined enough and manages to gain access to a system hosting the program then makes no difference. You'll be given yourself a false sense of security.

SigTerm 11-05-2011 03:21 PM

Quote:

Originally Posted by Sergei Steshenko (Post 4516560)
How about writing to free'ed memory ?

This is an obvious programming bug (read - unskilled programmer), that is very likely to crash the program.
With decent design both problems you mentioned will crash/terminate program.

Quote:

Originally Posted by Zssfssz (Post 4516539)
That's what I'm trying to protect: the SRC.

Release it under proprietary license, and do not make source available.

Quote:

Originally Posted by Zssfssz (Post 4516539)
Security is protecting the program from being unintentionally altered.

This is a waste of time and paranoia. In any decent linux distribution programs are installed system-wide by root into /usr/bin, /usr/local/bin or /bin with 0x755 access (rwxr-wr-w, "root.users" owner), and nobody can "alter them unintentionally", because they do not have write permissions.

Quote:

Originally Posted by Zssfssz (Post 4516539)
Which is much easier to do with a scripting language because all they would need is a text editor.

Your "grandma" can open COMPILED program (*.exe, *.dll or *.so) in text editor, delete/insert few symbols and save it. I think I actually saw something similar in real life. And on linux she could do it with "sudo" or "su". What was your argument against scripted languages again?

Sergei Steshenko 11-05-2011 04:03 PM

Quote:

Originally Posted by SigTerm (Post 4516746)
This is an obvious programming bug (read - unskilled programmer), that is very likely to crash the program.
With decent design both problems you mentioned will crash/terminate program.
...

If you are so skilled you make no mistakes, you're G-d. And you should despise all those who invented various ways of automatic memory management.

Zssfssz 11-05-2011 04:08 PM

You people are vastly overestimating my grandma. And I get it, ignoring everything else about the question: What programing language is geared tword file io? Like Perl is geared twored "Nothings Impossible"

SigTerm 11-05-2011 04:27 PM

Quote:

Originally Posted by Sergei Steshenko (Post 4516784)
you're G-d.

What's that supposed to mean?

Quote:

Originally Posted by Sergei Steshenko (Post 4516784)
And you should despise all those who invented various ways of automatic memory management.

Thanks for the advice, but I prefer to decide myself whom I should or shouldn't despise.
Anyway, did I step on your foot or something?

Quote:

Originally Posted by Zssfssz (Post 4516787)
You people are vastly overestimating my grandma.

I guess you never saw a computer where all Opera is set as default application for mp3 files, or *.zip is associated with notepad.

Quote:

Originally Posted by Zssfssz (Post 4516787)
What programing language is geared tword file io? Like Perl is geared twored "Nothings Impossible"

As far as I know all languages have file io. However, perl is said to be made for text file processing. Text manipulation should be easier to perform with scripted languages - it'll be faster to write a python script that processes text file than a C++ program that does same thing.

Sergei Steshenko 11-05-2011 04:28 PM

Quote:

Originally Posted by Zssfssz (Post 4516787)
You people are vastly overestimating my grandma. And I get it, ignoring everything else about the question: What programing language is geared tword file io? Like Perl is geared twored "Nothings Impossible"

I use Perl as my default language. I wrote a lot in it, e.g. a symbolic logic package, Verilog parser for pretty significant Verilog subset, a sophisticated GUI.

Try OCaml - it is strictly typed, has great performance comparable to C/C++, has automatic memory management. Can be natively compiled or bytecode-interpreted - of course, slower in the latter case.

Add checksum checking to your script - your grandma will have to be really determined to break you program in such a case.


All times are GMT -5. The time now is 03:25 AM.