dot sh ( .sh) to convert to a executable file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • coaxfiber
    New Member
    • Mar 2007
    • 60

    dot sh ( .sh) to convert to a executable file

    Is there anyone knows how to convert an existing script to a executable format (HEX form)?

    file.sh > file.exe - something like this.

    Thanks..

    BR,
    coaxfiber
  • bipinkdas
    New Member
    • Apr 2007
    • 3

    #2
    Originally posted by coaxfiber
    Is there anyone knows how to convert an existing script to a executable format (HEX form)?

    file.sh > file.exe - something like this.

    Thanks..

    BR,
    coaxfiber
    Hi
    Give executable permission to the file,it will be executable

    $chmod 755 file.sh

    Comment

    • coaxfiber
      New Member
      • Mar 2007
      • 60

      #3
      I tried it. Is it same with chmod +x file.sh? So it becomes executable. What I mean is that when you will use , 'cat file.sh' or 'more file.sh' , the screen will give you as an ASCII characters instead of showing the source code.

      Thanks again...

      BR,
      coaxfiber

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        There is no way to convert a shell script to a binary executable. Perhaps if you explain what you actually want to do, we could help you out.

        Comment

        • ghostdog74
          Recognized Expert Contributor
          • Apr 2006
          • 511

          #5
          Originally posted by coaxfiber
          Is there anyone knows how to convert an existing script to a executable format (HEX form)?

          file.sh > file.exe - something like this.

          Thanks..

          BR,
          coaxfiber
          what you want to do is something like "obsfuscati ng/scrambling" your source so no one can see your code , right.
          you can download shc and try it out. it "converts" your shell to stripped executable. remember to read shc.html from that site.

          Comment

          • coaxfiber
            New Member
            • Mar 2007
            • 60

            #6
            Sir,

            Thank You Very Much! Hope this will help me a lot doing my work done.


            BR,
            ed

            Comment

            • Motoma
              Recognized Expert Specialist
              • Jan 2007
              • 3236

              #7
              Yes, thanks for posting this link. This site teaches me something new every day.

              Comment

              • parimalao
                New Member
                • Jun 2007
                • 4

                #8
                Originally posted by ghostdog74
                what you want to do is something like "obsfuscati ng/scrambling" your source so no one can see your code , right.
                you can download shc and try it out. it "converts" your shell to stripped executable. remember to read shc.html from that site.
                Hello sir,

                we r also facing the same problem. we downloaded shc. wht are the requirements to execute this prg? How to execute this? we tried giving params as -f xyz.sh like its working but not able to see output file(or exe).

                plz help.

                Thanks in advance.

                Comment

                • parimalao
                  New Member
                  • Jun 2007
                  • 4

                  #9
                  the output is : First line in Shell script is wrong like

                  but the first line represents only an echo "welcome"

                  plz help me with this.

                  thanks

                  Comment

                  • Motoma
                    Recognized Expert Specialist
                    • Jan 2007
                    • 3236

                    #10
                    Originally posted by parimalao
                    the output is : First line in Shell script is wrong like

                    but the first line represents only an echo "welcome"

                    plz help me with this.

                    thanks
                    The first line in your shell script should be the #! followed by the shell it was written for:

                    Code:
                    #! /bin/bash
                    echo "Awesome!"

                    Comment

                    • parimalao
                      New Member
                      • Jun 2007
                      • 4

                      #11
                      Hello Motoma,

                      i kept the .sh file in bash folder of bin folder where shc c prg is placed in bin folder. i changed the first line in the .sh file as #! bash/xyz.sh its not giving error.

                      no putput file is found where can i see the executable?

                      Comment

                      • Motoma
                        Recognized Expert Specialist
                        • Jan 2007
                        • 3236

                        #12
                        Originally posted by parimalao
                        Hello Motoma,

                        i kept the .sh file in bash folder of bin folder where shc c prg is placed in bin folder. i changed the first line in the .sh file as #! bash/xyz.sh its not giving error.

                        no putput file is found where can i see the executable?
                        I do not know. Check the man page for the tool you are using.

                        Comment

                        Working...