Hi all!


First of all, sorry for my poor english :-S


Well, I have some scripts in a SuSe server to encrypt... but all them must still working when I encrypt it, ok?

About the server, I have root access:

# id
uid=0(root) gid=0(root) groups=0(root)

# uname -a
Linux servername 2.6.16.60-0.42.4-smp #1 SMP Fri Aug 14 14:33:26 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux

# more /etc/SuSE-release
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 2


So, I googled there out and I found 'shc'.

All the next commands were runned as user 'root'...

I have download and untar it in this path:/bin/magius/shc-3.8.6

# ls -lrt
total 128
-rw-r--r-- 1 root root 17982 1996-05-09 18:34 Copying
-rwxr-x--- 1 root root 336 2003-02-21 21:29 match
-rw-r--r-- 1 root root 1544 2003-06-19 17:12 shc.README
-rwxr-x--- 1 root root 155 2003-06-19 18:43 pru.sh
-rwxr-x--- 1 root root 52 2003-06-19 18:44 test.csh
-rw-r--r-- 1 root root 3136 2004-07-08 17:45 shc.1
-rw-r--r-- 1 root root 4558 2004-07-08 17:46 shc.html
-rwxr-xr-x 1 root root 138 2004-11-12 21:32 test.bash
-rw-r--r-- 1 root root 24715 2006-07-10 16:10 shc.c
-rw-r--r-- 1 root root 3549 2006-07-10 16:11 CHANGES
-rwxr-xr-x 1 root root 39767 2006-07-10 16:11 shc
-rw-r--r-- 1 root root 1592 2010-11-16 13:54 Makefile


So, as far as I know I must install it. I've tried several ways, like:

/bin/magius/shc-3.8.6 # make install
*** Installing shc and shc.1 on /usr/openv/netbackup/bin
*** żDo you want to continue? y
install -c -s shc /usr/openv/netbackup/bin/
install -c -m 644 shc.1 /usr/openv/netbackup/bin/man/man1/

# ls -lrt /usr/openv/netbackup/bin/shc
-rwxr-xr-x 1 root root 29044 2010-11-16 14:36 /usr/openv/netbackup/bin/shc

# ls -lrt /usr/openv/netbackup/bin/man/man1/shc.1
-rw-r--r-- 1 root root 3136 2010-11-16 14:36 /usr/openv/netbackup/bin/man/man1/shc.1


So, It looks good. Let's try it... the script "match" has execution permissions and do this:

/bin/magius/shc-3.8.6 # ./match
[24353] PAUSED... Hit return!


But when I try to use shc says all this:

/bin/magius/shc-3.8.6 # shc -f match
match.x.c:110:22: error: sys/stat.h: No such file or directory
match.x.c:111:23: error: sys/types.h: No such file or directory
match.x.c:113:19: error: errno.h: No such file or directory
match.x.c:114:19: error: stdio.h: No such file or directory
match.x.c:115:20: error: stdlib.h: No such file or directory
match.x.c:116:20: error: string.h: No such file or directory
match.x.c:117:18: error: time.h: No such file or directory
match.x.c:118:20: error: unistd.h: No such file or directory
stte_0 key arc4 key_with_file
match.x.c: In function 'key_with_file':
match.x.c:180: error: array type has incomplete element type
match.x.c:181: error: array type has incomplete element type
match.x.c:187: warning: incompatible implicit declaration of built-in function 'memset'
rmarg chkenv
match.x.c: In function 'chkenv':
match.x.c:232: warning: incompatible implicit declaration of built-in function 'sprintf'
match.x.c:233: warning: assignment makes pointer from integer without a cast
match.x.c:237: warning: incompatible implicit declaration of built-in function 'strlen'
match.x.c:241: warning: incompatible implicit declaration of built-in function 'strdup'
match.x.c:244: warning: incompatible implicit declaration of built-in function 'sscanf'
match.x.c:256:24: error: sys/ptrace.h: No such file or directory
match.x.c:258:22: error: sys/wait.h: No such file or directory
match.x.c:259:19: error: fcntl.h: No such file or directory
match.x.c:260:20: error: signal.h: No such file or directory
untraceable
match.x.c: In function 'untraceable':
match.x.c:279: warning: incompatible implicit declaration of built-in function 'sprintf'
match.x.c:282: error: 'O_RDWR' undeclared (first use in this function)
match.x.c:282: error: (Each undeclared identifier is reported only once
match.x.c:282: error: for each function it appears in.)
match.x.c:282: error: 'O_EXCL' undeclared (first use in this function)
match.x.c:283: error: 'errno' undeclared (first use in this function)
match.x.c:283: error: 'EBUSY' undeclared (first use in this function)
match.x.c:284: error: 'PTRACE_ATTACH' undeclared (first use in this function)
match.x.c:286: error: 'SIGCONT' undeclared (first use in this function)
match.x.c:289: error: 'SIGKILL' undeclared (first use in this function)
match.x.c:291: warning: incompatible implicit declaration of built-in function '_exit'
match.x.c:299: warning: incompatible implicit declaration of built-in function '_exit'
xsh
match.x.c: In function 'xsh':
match.x.c:312: error: 'time_t' undeclared (first use in this function)
match.x.c:312: error: expected expression before ')' token
match.x.c:313: error: expected expression before ')' token
match.x.c:328: warning: incompatible implicit declaration of built-in function 'calloc'
match.x.c:344: warning: incompatible implicit declaration of built-in function 'malloc'
match.x.c:347: warning: incompatible implicit declaration of built-in function 'memset'
match.x.c:348: warning: incompatible implicit declaration of built-in function 'memcpy'
match.x.c:354: warning: incompatible implicit declaration of built-in function 'malloc'
match.x.c:357: warning: incompatible implicit declaration of built-in function 'sprintf'
main
match.x.c: In function 'main':
match.x.c:391: warning: incompatible implicit declaration of built-in function 'fprintf'
match.x.c:391: error: 'stderr' undeclared (first use in this function)
match.x.c:392: error: 'errno' undeclared (first use in this function)

Execution times (seconds)
tree gimplify : 0.01 (100%) usr 0.00 ( 0%) sys 0.01 (20%) wall 69 kB ( 3%) ggc
TOTAL : 0.01 0.00 0.05 2445 kB
shc: Success




Maybe there are a problem with GCC or something like that...

I linked this:

# ls -lrt ./usr/local/bin/cc
lrwxrwxrwx 1 root root 19 2010-11-16 13:50 ./usr/local/bin/cc -> ./lib/libgcc_s.so.1

# ls -lrt ./usr/local/sbin/cc
lrwxrwxrwx 1 root root 42 2010-11-16 13:47 ./usr/local/sbin/cc -> /usr/lib64/gcc/x86_64-suse-linux/4.1.2/cc1


I look for gcc in the server:

# find ./ -name *gcc* -print
./opt/pdopensource/lib/libboost_system-gcc41-mt-1_36.a
./opt/pdopensource/lib/libboost_signals-gcc41-mt.a
./opt/pdopensource/lib/libboost_signals-gcc41-mt-1_36.a
./opt/pdopensource/lib/libboost_system-gcc41-mt-1_36.so
./opt/pdopensource/lib/libboost_thread-gcc41-mt-1_36.so.1.36.0
./opt/pdopensource/lib/libboost_filesystem-gcc41-mt-1_36.so
./opt/pdopensource/lib/libboost_thread-gcc41-mt-1_36.so
./opt/pdopensource/lib/libboost_filesystem-gcc41-mt.so
./opt/pdopensource/lib/libboost_filesystem-gcc41-mt.a
./opt/pdopensource/lib/libboost_signals-gcc41-mt-1_36.so.1.36.0
./opt/pdopensource/lib/libboost_thread-gcc41-mt-1_36.a
./opt/pdopensource/lib/libboost_system-gcc41-mt.so
./opt/pdopensource/lib/libboost_system-gcc41-mt-1_36.so.1.36.0
./opt/pdopensource/lib/libboost_thread-gcc41-mt.so
./opt/pdopensource/lib/libboost_signals-gcc41-mt.so
./opt/pdopensource/lib/libboost_filesystem-gcc41-mt-1_36.so.1.36.0
./opt/pdopensource/lib/libboost_filesystem-gcc41-mt-1_36.a
./opt/pdopensource/lib/libboost_system-gcc41-mt.a
./opt/pdopensource/lib/libboost_thread-gcc41-mt.a
./opt/pdopensource/lib/libboost_signals-gcc41-mt-1_36.so
./lib/libgcc_s.so.1
./lib64/libgcc_s.so.1
./usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/linux/compiler-gcc3.ph
./usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/linux/compiler-gcc.ph
./usr/lib/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/linux/compiler-gcc4.ph
./usr/lib/gcc
./usr/lib/gcc/i586-suse-linux/2.95.3/libgcc.a
./usr/lib64/gcc
./usr/share/zsh/4.2.6/functions/_gcc
./usr/openv/tmp/jre_old/plugin/i386/ns610-gcc32
./usr/openv/java/jre/lib/i386/libjavaplugin_nscp_gcc29.so
./usr/openv/java/jre/plugin/i386/ns7-gcc29





And that's all ... Can anybody help me?


Thanks in advance!!!