- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell Compiler
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 06:59 PM
06-03-2004 06:59 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 07:40 PM
06-03-2004 07:40 PM
Re: Shell Compiler
not sure exactly what you are trying to achieve but try this
cp /usr/bin/sh ~
cd ~
chmod 111 ./sh
ls -l ./sh
./sh
you have an executable shell with no read permissions
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 07:47 PM
06-03-2004 07:47 PM
Re: Shell Compiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 07:53 PM
06-03-2004 07:53 PM
Re: Shell Compiler
chmod ugo-rw <script>.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 07:54 PM
06-03-2004 07:54 PM
Re: Shell Compiler
I do not think it is possible to compile a shell script to achieve this. You can however compile perl which will hide the code.
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 07:58 PM
06-03-2004 07:58 PM
Re: Shell Compiler
carrjo% chmod 111 test
carrjo% ls -la
total 418
drwxr-xr-x 2 carrjo root 96 Jun 4 08:51 .
drwxr-xr-x 23 root root 1024 May 27 13:56 ..
-rw------- 1 carrjo 1494 4 Jun 4 08:37 .sh_history
-rw-r--r-- 1 carrjo 1494 0 Mar 17 14:47 foo
---x--x--x 1 carrjo 1494 209136 Jun 4 08:36 ksh
---x--x--x 1 carrjo 1494 53 Jun 4 08:51 test
---------- 1 carrjo 1494 29 Mar 17 14:27 testfile
carrjo% ./test
./test: ./test: cannot open
carrjo% chmod 555 test
carrjo% ls -la
total 418
drwxr-xr-x 2 carrjo root 96 Jun 4 08:51 .
drwxr-xr-x 23 root root 1024 May 27 13:56 ..
-rw------- 1 carrjo 1494 4 Jun 4 08:37 .sh_history
-rw-r--r-- 1 carrjo 1494 0 Mar 17 14:47 foo
---x--x--x 1 carrjo 1494 209136 Jun 4 08:36 ksh
-r-xr-xr-x 1 carrjo 1494 53 Jun 4 08:51 test
---------- 1 carrjo 1494 29 Mar 17 14:27 testfile
carrjo% ./test
hello world
***********
ss1025:carrjo%
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 08:03 PM
06-03-2004 08:03 PM
Re: Shell Compiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 08:14 PM
06-03-2004 08:14 PM
Re: Shell Compiler
http://www.comeaucomputing.com/faqs/ccshlit.html
These things have been around for a while.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 08:39 PM
06-03-2004 08:39 PM
Re: Shell Compiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 09:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 09:29 PM
06-03-2004 09:29 PM
Re: Shell Compiler
#file1.c
main()
{
system("shell_script");
}
cc file1.c -o file1
Now file1 is executable and the script file shell_script can be hidden.
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 09:34 PM
06-03-2004 09:34 PM
Re: Shell Compiler
And you definately can't execute anything without read access.
There is one possiblity that comes to mind and that is to compress your scripts or even encrypt them but have a C program that you use as a decrypter/runner. Users have to use your C program to run the script.
I would ask why you need to do this. If it's a script that contains passwords or such like, there is nearly always a better way to achieve it. If it contains other sensitive information, just encrypt the parts of the code that are sensitive and get the script itself to decrypt that and use "eval" or some thing to run that portion of code.