|
Home > Archive > Unix Programming > June 2007 > C wrapper
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Seth7TS@gmail.com 2007-06-25, 7:22 am |
| Hi everyone,
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.....
tnx in advance
Seth
| |
| Giorgos Keramidas 2007-06-25, 1:21 pm |
| On Mon, 25 Jun 2007 08:12:32 -0000, Seth7TS@gmail.com wrote:
> Hi everyone,
> 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.....
Start reading about the `exec*()' family of functions:
man execl
man execlp
man execle
man execv
man execvp
| |
| Lew Pitcher 2007-06-25, 7:21 pm |
| On Jun 25, 12:44 pm, Giorgos Keramidas <keram...@ceid.upatras.gr>
wrote:
> On Mon, 25 Jun 2007 08:12:32 -0000, Seth...@gmail.com wrote:
>
> Start reading about the `exec*()' family of functions:
>
> man execl
> man execlp
> man execle
> man execv
> man execvp
Also on the reading list is
man system
for the system(3) function. While less flexible than the exec(2)
family of calls, system(3) might suit the OP's level of expertise
better.
| |
| Seth7TS@gmail.com 2007-06-26, 7:17 am |
| On 25 Giu, 20:42, Lew Pitcher <lpitc...@teksavvy.com> wrote:
> On Jun 25, 12:44 pm, Giorgos Keramidas <keram...@ceid.upatras.gr>
> wrote:
>
>
>
>
> Also on the reading list is
> man system
> for the system(3) function. While less flexible than the exec(2)
> family of calls, system(3) might suit the OP's level of expertise
> better.
thanks for the answer!! but my dubt is how can i prevent (using exec
or system) the direct execution of the fortran binary file??
my desire is to make some control before executing the fortran binary
(some kind of licence)....
| |
| niranjan.singh@gmail.com 2007-06-26, 7:17 am |
| On Jun 26, 12:50 pm, Seth...@gmail.com wrote:
> On 25 Giu, 20:42, Lew Pitcher <lpitc...@teksavvy.com> wrote:
>
>
>
>
>
>
>
>
>
>
> thanks for the answer!! but my dubt is how can i prevent (using exec
> or system) the direct execution of the fortran binary file??
> my desire is to make some control before executing the fortran binary
> (some kind of licence)....- Hide quoted text -
>
> - Show quoted text -
Go thro also truss & ptrace program of linux kenel
| |
| Logan Shaw 2007-06-27, 1:21 am |
| Seth7TS@gmail.com wrote:
> thanks for the answer!! but my dubt is how can i prevent (using exec
> or system) the direct execution of the fortran binary file??
> my desire is to make some control before executing the fortran binary
> (some kind of licence)....
If the fortran binary is already on disk, it is just plain impossible.
If the fortran binary is not, you can do it one time. You only have
to encrypt the fortran binary and have the C program decrypt it before
it runs it. Still, nothing stops anyone from reverse engineering the
C program and recovering the fortran program without ever running
the C program. So the C wrapper just makes it more difficult, not
impossible.
- Logan
|
|
|
|
|