1833507 Members
2702 Online
110061 Solutions
New Discussion

Using shc-2.4a

 
SOLVED
Go to solution
Jose Mosquera
Honored Contributor

Using shc-2.4a

Hi Pals,

I'm trying to *hide* the content of a standard HP-UX 11.0 script file with a shc-2.4a downloaded from the port: http://hpux.connect.org.uk/hppd/hpux/Shells

So, to do a simple test, I've created a small command script file, then when I try to compile it "shc -f myfile" *always* show me:
shc Invalid script's first line:
shc: Error 0

I not have previous C language experience.

Can somebody help me?

Rgds,

Jose
3 REPLIES 3
harry d brown jr
Honored Contributor

Re: Using shc-2.4a

Does "myfile" actually work as a script? How about posting "myfile"??

Make sure you have a valid "shell" execution path one the first line.

live free or die
harry
Live Free or Die
Jose Mosquera
Honored Contributor

Re: Using shc-2.4a

Yeap, the script works fine by itself and the content to do a small test is a simple "ls -f" unix command.
harry d brown jr
Honored Contributor
Solution

Re: Using shc-2.4a

Jose,

Your script MUST have a valid SHELL execution path. If your script looks like this:

# cat -n ghj
1 ls -f
# /opt/shc/bin/shc -f ghj
shc Invalid script's first line: ls -f

/opt/shc/bin/shc: Error 0
#

Try this:

# cat -n ghj
1 #!/usr/bin/ksh
2 ls -f
# /opt/shc/bin/shc -f ghj
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (ghj.x.o) was detected. The linked output may not run on a PA 1.x system.
#

And I tested it, it works!


live free or die
harry
Live Free or Die