Se*****@gmail.c om wrote:
On 25 Giu, 10:07, Nick Keighley <nick_keighley_ nos...@hotmail. com>
wrote:
>On 25 Jun, 08:54, Seth...@gmail.c om wrote:
>>i need to make a protection for a fortran software(a line command in
linux). My desire is to write a C wrapper that control the execution
of the program. Can someone help me? i dont know i to start it!My
question is also how can i make the fortran binary to execute from
C.....
I didn't entirely understand your question and you're probably close
to
being off-topic. You might be better off asking your question in a
platform specific group (Unix or Windows). You may be asking the
wrong
question (for instance a shell script *may* be a better idea than C,
and a "fork" may be better than "system").
If you want to call another program from C use system().
i don't think to be off-topic..however maybe i explained bad..
the problem is this:
i have a fortran software that runs in line command under linux.
i want to make a C wrapper to control the execution of that program.In
particolar i want to make a time-licence to sell it.
But i don't know how to start e how to make a wrapper that would to
this.
hope to get some help!!(and not to be off-topic!)
[Please don't top-post. I've correct your post here.]
It is starting to sound off-topic for this group. I understand you want
to construct a C program that wraps an external executable, but this is
just a guess, and the requirements are rather sketchy.
Given we are probably off-topic...
Since it doesn't matter what language, really, an executable is written
in, all you care about is that you have an executable of some sort that
you want to control access to.
That being said, how do you keep me from just running the executable
directly, bypassing your wrapper?
However, it sounds like you want to implement a license key system of
some sort, which is a surprisingly hard thing to get right (which is why
there are so many third-party licensing schemes you can buy). The idea
is to have the user provide a key that you can use to mathematically
determine if the software is unlocked. Part of the processing might
require a time and/or date component, which will further require
querying the system for the current time, and/or writing an obfuscated
cookie file in a known location so you can keep people from simply
hacking the system time to get around your check.
You need to determine your requirements and limitations, and then write
some code. Then come back with specific questions about C, if you are
writing C to solve this problem.
You can also set up a simple wrapper that calls home to get a license
key, which pushes all this processing to a web service of some sort.
This way you keep the client-side processing very simple.
This cat, it can be skinned in a variety of ways. But then again, who
wants a skinned cat?
--
clvrmnky <mailto:sp***** *@clevermonkey. org>
Direct replies will be blacklisted. Replace "spamtrap" with my name to
contact me directly.