![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to encrypt and decrypt a file | laknar | Shell Programming and Scripting | 2 | 12-11-2007 08:18 AM |
| AWK script: decrypt text uses frequency analysis | SerJel | Shell Programming and Scripting | 4 | 11-27-2007 03:16 AM |
| Decrypt Des file - then encrypt | frustrated1 | SUN Solaris | 0 | 09-07-2006 05:38 PM |
| encrypt and decrypt password | sanwish | Shell Programming and Scripting | 2 | 07-14-2006 01:59 PM |
| Encrypt & Decrypt a String | aldowsary | Shell Programming and Scripting | 6 | 05-15-2005 06:32 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Encrypt and Decrypt script
Dear Experts,
I am using one script name :volume.sh and its written in bash shell script. I just want to encrypt the script so that any one else cannot see it. please tell me the commands how to encrypt the script as well as to decrypt it. Regards, SHARY |
|
||||
|
Out of interest, why?
Is this security through obscurity? If the interpretor can decode the script to run it, why can't a person? Start the file as follows Code:
#!/bin/sh cat >/dev/null <<EOF ..... tons of rubbish .... EOF |
|
||||
|
An obscure script....
Code:
#!/bin/sh
cat >/dev/null <<EOF
ssdf
sdf
sdfhgfgjhghk
ghjgfjgfjgh
jhkjh
k
jhk
jhlkjhljklkj
jghjghghj
jh
kljh
kljh
ljk
l
kjlkjljkkj
jk
l
kj
lkj
ljklkjlkjljkl
kjl
jk
l
kj
l
jk
l
jk
lkjljk
l
kjhjkljhklhfjkhfkjhkjhkjhkjh
EOF
first() { echo $1 }; second() { echo $2 }; third() { echo $3 }; ps -ef -o "pid etime comm" | while read PID ETIME COMM; do case "$ETIME" in; *:* ) DAYS=0; HOURS=0; MINUTES=0; SECONDS=0; case "$ETIME" in; *-* ) X=`echo $ETIME | sed y/-/\ /`; DAYS=`first $X`; ETIME=`second $X`; ;; * ) ;; esac; X=`echo $ETIME | sed y/:/\ /`; case "$ETIME" in; *:*:* ) HOURS=`first $X`; MINUTES=`second $X`; SECONDS=`third $X`; ;; *:* ) MINUTES=`first $X`; SECONDS=`second $X` ;; *) ;; esac; HOURS=`echo $HOURS + \( $DAYS \* 24 \) | bc`; MINUTES=`echo $MINUTES + \( 60 \* $HOURS \) | bc`; SECONDS=`echo $SECONDS + \( 60 \* $MINUTES \) | bc`; if test "$SECONDS" -gt "3600"; then echo $PID $COMM; fi ;; * ) ;;esac;done
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|