nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Binary Conversion Of Shell Script (shell script compiler)

This is a discussion on Binary Conversion Of Shell Script (shell script compiler) within the Shell scripting forums, part of the Development/Scripting category; Hi, Can anybody tell me how to convert shell script into binary?Thanks...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 07-18-2008, 04:08 PM
Member
User
 
Join Date: Feb 2008
My distro: fedora
Posts: 30
Rep Power: 0
chandanperl is on a distinguished road
Default Binary Conversion Of Shell Script (shell script compiler)

Hi, Can anybody tell me how to convert shell script into binary?Thanks
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-20-2008, 12:27 PM
amitabh's Avatar
Contributors
User
 
Join Date: Jul 2008
Location: New Delhi
My distro: FreeBSD/OpenBSD
Posts: 68
Rep Power: 3
amitabh has a spectacular aura about amitabh has a spectacular aura about amitabh has a spectacular aura about
Send a message via MSN to amitabh Send a message via Yahoo to amitabh Send a message via Skype™ to amitabh
Default

Not sure if there is a readymade tool to do that. Most probably you will have to rewrite the code in some language to generate a binary.
Reply With Quote
  #3 (permalink)  
Old 07-28-2008, 05:07 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,061
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You can use shell script compiler called shc:
Quote:
Shc is a generic shell script compiler. It takes a script which is specified on the command line and produces C source code. The generated source code is then compiled and linked to produce a stripped binary executable.
Download shc below:
Francisco Rosales, home page

You can also use commercial tool called ccsh - a bourne shell to C cross-compiler.:
CCsh, The Bourne Shell Compiler

Keep it mind this is security though obscurity.

HTH
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #4 (permalink)  
Old 07-29-2008, 11:22 AM
Member
User
 
Join Date: Feb 2008
My distro: fedora
Posts: 30
Rep Power: 0
chandanperl is on a distinguished road
Default

Many Many Thanks
Reply With Quote
Reply

Bookmarks

Tags
bash , binary shell scriptig , linux , shell , shell script compiler , shell scripting , unix


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to initialize HDD using Shell script? meimei Shell scripting 1 05-13-2008 06:21 PM
Run mv command from ftp shell script subin Shell scripting 6 05-02-2008 10:44 AM
writing a shell script to find out my shell name jaymob123 Shell scripting 1 10-08-2007 01:36 AM
Shell script for automatic conversion of files in tar files kasimani Shell scripting 2 02-08-2007 04:45 PM
require shell script puppen Shell scripting 4 04-12-2006 10:42 PM


All times are GMT +5.5. The time now is 03:15 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36