<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to hide shell programming source code in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222426#M170564</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have an idea,&lt;BR /&gt;&lt;BR /&gt;try &lt;BR /&gt;#include&lt;FCNTL.H&gt;&lt;BR /&gt;#include&lt;SIGNAL.H&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;int i;&lt;BR /&gt;char fifoname[256];&lt;BR /&gt;sprintf(fifoname,"/tmp/fifoname_%d",getpid());&lt;BR /&gt;mkfifo(fifoname,0777);&lt;BR /&gt;signal(SIGCLD,SIG_IGN);&lt;BR /&gt;if(fork())&lt;BR /&gt;{/*parent process is ksh*/&lt;BR /&gt;   execl("/usr/bin/ksh","/usr/bin/ksh",fifoname,0);&lt;BR /&gt;   perror("exec");&lt;BR /&gt;   kill(0,SIGHUP);&lt;BR /&gt;   exit(1);&lt;BR /&gt;}&lt;BR /&gt;/*child process write to the pipe*/&lt;BR /&gt;i=open(fifoname,O_WRONLY);&lt;BR /&gt;/* you write your script, after some processing like crypto to the fifo*/&lt;BR /&gt;write(i,"echo oui\n",9);&lt;BR /&gt;close(i);&lt;BR /&gt;unlink(fifoname);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;To test it in shell:&lt;BR /&gt;&lt;BR /&gt;mkfifo /tmp/xxx$$&lt;BR /&gt;echo echo ok it works'$$':$$ &amp;gt;/tmp/xxx$$&amp;amp;&lt;BR /&gt;exec /usr/bin/ksh /tmp/xxx$$&lt;BR /&gt;&lt;BR /&gt;# ksh titi&lt;BR /&gt;6651&lt;BR /&gt;ok it works6651:6651&lt;BR /&gt;# &lt;BR /&gt;&lt;/SIGNAL.H&gt;&lt;/FCNTL.H&gt;</description>
    <pubDate>Thu, 18 Mar 2004 06:46:43 GMT</pubDate>
    <dc:creator>Laurent Menase</dc:creator>
    <dc:date>2004-03-18T06:46:43Z</dc:date>
    <item>
      <title>How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222420#M170558</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would like to seek ITRC forum whom which have an idea on how to compile shell script as similiar likes c program to avoid intruder copy the source code and break the ownership and copyright.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 18 Mar 2004 04:11:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222420#M170558</guid>
      <dc:creator>ROSDI BIN SAAD</dc:creator>
      <dc:date>2004-03-18T04:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222421#M170559</link>
      <description>If this is an issue, your best bet is to just set permissions on your scripts so anuathorized people can't write to it. Or, don't use the shell.&lt;BR /&gt; &lt;BR /&gt;Having said that, I have heard of shell compilers but have never actaully seen one.  I would assume that, as they are not common, that they are not really up to date and therefore some scripts wouldn't work properly.  Could be wrong though.</description>
      <pubDate>Thu, 18 Mar 2004 04:21:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222421#M170559</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-03-18T04:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222422#M170560</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Don't look further, shell scripts are interpreted, thus, we cannot give the shell away and keep the source for yourself.&lt;BR /&gt;&lt;BR /&gt;Nicolas</description>
      <pubDate>Thu, 18 Mar 2004 04:22:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222422#M170560</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-03-18T04:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222423#M170561</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;chmod 111 script&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Will execute but you cannot read or write it&lt;BR /&gt;&lt;BR /&gt;Or copy it&lt;BR /&gt;&lt;BR /&gt;      Steve Steel</description>
      <pubDate>Thu, 18 Mar 2004 04:24:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222423#M170561</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2004-03-18T04:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222424#M170562</link>
      <description>I have following solution&lt;BR /&gt;&lt;BR /&gt;1. Write a small 'C' code say test.c as below:&lt;BR /&gt;&lt;BR /&gt;main()&lt;BR /&gt; {&lt;BR /&gt;system ("script_name_with_full_path");&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;2. #chmod 755 script_name_with_full_path&lt;BR /&gt;&lt;BR /&gt;3. Compile test.c as below.&lt;BR /&gt;&lt;BR /&gt;#cc test.c&lt;BR /&gt;&lt;BR /&gt;4. Execute the output a.out which can be renamed as well.&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Thu, 18 Mar 2004 04:28:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222424#M170562</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-03-18T04:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222425#M170563</link>
      <description>At least, the script must have read access to execute :&lt;BR /&gt;/bin/ksh: exemple.ksh: cannot open&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Mar 2004 04:37:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222425#M170563</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-03-18T04:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222426#M170564</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have an idea,&lt;BR /&gt;&lt;BR /&gt;try &lt;BR /&gt;#include&lt;FCNTL.H&gt;&lt;BR /&gt;#include&lt;SIGNAL.H&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;int i;&lt;BR /&gt;char fifoname[256];&lt;BR /&gt;sprintf(fifoname,"/tmp/fifoname_%d",getpid());&lt;BR /&gt;mkfifo(fifoname,0777);&lt;BR /&gt;signal(SIGCLD,SIG_IGN);&lt;BR /&gt;if(fork())&lt;BR /&gt;{/*parent process is ksh*/&lt;BR /&gt;   execl("/usr/bin/ksh","/usr/bin/ksh",fifoname,0);&lt;BR /&gt;   perror("exec");&lt;BR /&gt;   kill(0,SIGHUP);&lt;BR /&gt;   exit(1);&lt;BR /&gt;}&lt;BR /&gt;/*child process write to the pipe*/&lt;BR /&gt;i=open(fifoname,O_WRONLY);&lt;BR /&gt;/* you write your script, after some processing like crypto to the fifo*/&lt;BR /&gt;write(i,"echo oui\n",9);&lt;BR /&gt;close(i);&lt;BR /&gt;unlink(fifoname);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;To test it in shell:&lt;BR /&gt;&lt;BR /&gt;mkfifo /tmp/xxx$$&lt;BR /&gt;echo echo ok it works'$$':$$ &amp;gt;/tmp/xxx$$&amp;amp;&lt;BR /&gt;exec /usr/bin/ksh /tmp/xxx$$&lt;BR /&gt;&lt;BR /&gt;# ksh titi&lt;BR /&gt;6651&lt;BR /&gt;ok it works6651:6651&lt;BR /&gt;# &lt;BR /&gt;&lt;/SIGNAL.H&gt;&lt;/FCNTL.H&gt;</description>
      <pubDate>Thu, 18 Mar 2004 06:46:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222426#M170564</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2004-03-18T06:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222427#M170565</link>
      <description>Links to several shell compilers are provided in this thread:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=151147" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=151147&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 18 Mar 2004 06:53:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222427#M170565</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-03-18T06:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222428#M170566</link>
      <description>just a last thing,&lt;BR /&gt;If you really want it be not possible to read it even with a strings a.out, you will need to uncrypt the script before writing to the fifo&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Mar 2004 06:55:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222428#M170566</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2004-03-18T06:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222429#M170567</link>
      <description>You could, indeed, try to use the crypt program. Test for your self:&lt;BR /&gt;&lt;BR /&gt;# /usr/bin/crypt 'passwd' &lt;SHELL-SCRIPT&gt;&lt;/SHELL-SCRIPT&gt;&lt;BR /&gt;# /usr/bin/crypt 'passwd' &lt;CRYPTED-SHELL-SCRIPT&gt;&lt;/CRYPTED-SHELL-SCRIPT&gt;&lt;BR /&gt;So all you need to do is run crypt on all your shell scripts AND REMEMBER YOUR PASSWORD&lt;BR /&gt;&lt;BR /&gt;You could also do something like this from a system command in a C-program.&lt;BR /&gt;&lt;BR /&gt;system("/usr/bin/crypt &lt;CRYPTED-SHELL-SCRIPT&gt;&lt;/CRYPTED-SHELL-SCRIPT&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Mar 2004 08:51:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222429#M170567</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2004-03-18T08:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to hide shell programming source code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222430#M170568</link>
      <description>Hi all experts,,&lt;BR /&gt;&lt;BR /&gt;Thanks for the ideas and it works fine. Close the case.</description>
      <pubDate>Thu, 18 Mar 2004 20:20:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-hide-shell-programming-source-code/m-p/3222430#M170568</guid>
      <dc:creator>ROSDI BIN SAAD</dc:creator>
      <dc:date>2004-03-18T20:20:43Z</dc:date>
    </item>
  </channel>
</rss>

