12-21-2008
hi bulkbiz,
Actually it is possible to hardcode a password inside shell script and hide it from casual viewers (not advanced viewers).
Either use,
gzexe - compress executable files in place
Find more at "man gzexe". It is just gziping your shell script and creates another shell wrapper to automatically gunzip and execute when somebody calls it. Beware of this if you uncompress this program, it is pretty easy to read the contents. Simply more useful to compress and save disk space.
or
shc - Generic shell script compiler
Download shc for you distribution and install it. This small program first encrypts your shell script using RC4 algorithm and then creates a binary executable file which can decrypt the program into memory at runtime. Go through "man shc" for additional options. The biggest disadvantage of this utility is it stores the encryption key also inside the same binary which allow us to decrypt and read it. Also read this article how to beat shc
http://www.linuxjournal.com/article/8256
Last edited by meharo; 12-21-2008 at 06:49 AM..
9 More Discussions You Might Find Interesting
1. Solaris
Dear all
i want to ssh to a server via running a shell script with a username and i want to hard code the password for that particular username
can u help me please
Thank u
Naree (8 Replies)
Discussion started by: naree
8 Replies
2. Shell Programming and Scripting
Hi Friends.
I am new to scripting now i want to change the root password using the script with standard password.
which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I have a data calculation process-a perl script running each and every hour which will do some calculations on the data stored in a mysql server. Normally it tooks around 2minutes (max) to complete.
But in case if i did any actions on the linux box where the database is... (7 Replies)
Discussion started by: DILEEP410
7 Replies
4. Shell Programming and Scripting
I want to take a backup of a database and redirect the output of the whole process to a log file. I am using the below command:
mysqldump -A --add-drop-table > mysql-daily-backup.sql &> /tmp/backup_log/mysql.log
Is there anything wrong with the syntax?
---------- Post updated at 08:32 PM... (0 Replies)
Discussion started by: proactiveaditya
0 Replies
5. UNIX for Advanced & Expert Users
HI,
In a script i am using a query
${SQLPLUS_SETTINGS}
select c.CYCLE_CODE ||'|'|| NEXT_CYCLE_INST ||'|'|| CYCLE_YEAR ||'|'|| to_char(trunc(CYCLE_CLOSE_DATE +1),'DD-MON-YY
YY')||'|'|| to_char(ADD_MONTHS(CYCLE_CLOSE_DATE,1),'DD-MON-YYYY') ||'|'|| CYCLE_MONTH FROM PM1_CYCLE_STATE C,... (2 Replies)
Discussion started by: madfox
2 Replies
6. Shell Programming and Scripting
How can we hardcode TNS_ADMIN?
When i try to connect to db with the code below..i get TNS issue. So wpndering if i can hardcode TNS..
<html>
<head>
<title>xxxxxxxxxxxxxx</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<%
### Load modules, connect to... (2 Replies)
Discussion started by: rdhanek
2 Replies
7. Shell Programming and Scripting
Hi im trying to write a script to logon to list of servers with same userID. I have no option/plan to implement ssh-keygen sharing between the systems, so i have written script creating 2 files,
file1 holds list of hosts
host1
host2
host3
file2 has following script
for i in `cat file1`... (1 Reply)
Discussion started by: dreamaix
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have to upload part of my database periodically when i make changes to product data etc. However I only want to upload certain tables. We suffer from bandwidth chock here, so i want to write a couple of separate scripts that upload parts of the database that changed. The database is large... (5 Replies)
Discussion started by: timgolding
5 Replies
9. Shell Programming and Scripting
I have a very simple script that uses a cron job to take a daily backup of our orders database.
echo "Dumping ORDERS database";
mysqldump -u root --password='mypassword' -h '1.1.1.1' --opt --compress ORDERS $tbl_names > /Volumes/Files_Backup_1/db_backups/orders.sql
echo "Copied database to... (2 Replies)
Discussion started by: timgolding
2 Replies