07-01-2008
Masking Content of a String
Hello,
I need to know that whether a content of a string can be hidden or masked inside a shell script.
My Sample Code is given below
<Code>
#!/usr/bin/ksh
Userid=test
DB=temp
Passwd=`java Decryption test`
# The Above command will get the encryped password for "test" user id and store it in Passwd Variable.
# I donot want anybody to see the Value of Passwd even if it is echoed on the screen. (ie) Either by masking or hiding.
# I want to connect to a DB by passing the Passwd Vairable
CONN=`sqlplus -s $Userid/$Passwd@DB <<EOF
whenever sqlerror exit failure
select * from dual;
EOF`
echo "CONN : "$CONN
</Code>
Can anybody help me on this.
Thanks
Rahul
Last edited by maxmave; 07-01-2008 at 05:08 PM..
Reason: Subject
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello all:
I'm new in Unix and here and I'am spanish so my english isn't so good to explain my doubt. Here it is.
Very urgent:
I need to compare the value of a variable with a string.
Example is this.
Imagine that the variable x1 contains the path and a file text and I need to compare... (2 Replies)
Discussion started by: robdai
2 Replies
2. Shell Programming and Scripting
Hi,
I'm a newbi in shell script. Here what I want to do:
FileA:
bor bor bor
xxxx
bib bib bi
FileB:
something something
something
I want to replace string "xxxx" in FileA with contents of FileB.
i tried with sed:
fileb=`cat FileB`
reg=xxxx
file=FileA (4 Replies)
Discussion started by: afatguy
4 Replies
3. Shell Programming and Scripting
Hi,
I've a shell script e.g.
#!/bin/bash
echo "Enter the next hop id"
read nhid
echo "enter the IP address"
read IP
echo "enter the interface name"
read name
echo "enter the enable/disable state"
read state
exit 0
now from this script i want to search strings in another (.cam)
... (6 Replies)
Discussion started by: vic_mnnit
6 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I have a string in the following format:
"kf skjgsdjgngnsd sdgsd
ksjgbksjgb kjsbgsjdgb
dfhdh
sjgsjg j jsbekgjsbdkgj".
In this format i want to extract the contents which is in between the two empty lines:... (6 Replies)
Discussion started by: bala041
6 Replies
5. Shell Programming and Scripting
How can I search for a string in a filename? For example, I want to know if a filename (not the file contents) contains the string "test". (3 Replies)
Discussion started by: daflore
3 Replies
6. Shell Programming and Scripting
Hi,
How to add string inside the file. In this case adding 63 in the beginning of each line. Thnks.
e.g. what is inside the file
Mobile Number Portability
9051151234
9051261345
9051393245
9051412345
9051507654
should like this as output:
Mobile Number Portability (7 Replies)
Discussion started by: shtobias
7 Replies
7. Shell Programming and Scripting
Hi experts,
As i am a novice unix player...so need help for the below query...banged my head from quite a while...:confused:
i have a set of html files, in which i need to search for string "Page"(case sensitive) and then replace the same with some numeric code ,say, "XXX1234".
Here in... (2 Replies)
Discussion started by: rahulfhp
2 Replies
8. Shell Programming and Scripting
hi
I have template file my.tpl:
bla-bla-bla
<link href="style.css" type="text/css">
bla-bla-bla
and style.css :
body{margin: 0px;}
I want to get in result one file:
bla-bla-bla
<script>body{margin: 0px;}</script>
bla-bla-bla
I tryed to used SED:
sed '/<link .*href=\"(*)*\"... (6 Replies)
Discussion started by: dim_nsk
6 Replies
9. Shell Programming and Scripting
hello,
i have a variable which should have following content :
var="value1"
or
var="value2"
or
var="value2:*" # example: value2:22
how can i check :
- if the content is ok (value1 / value2* )
- the two options of "value2"
when content is example "value2:22" , i want to split... (3 Replies)
Discussion started by: bora99
3 Replies
10. Shell Programming and Scripting
Hi,
echo "mypassword" | crypt "tom" But this is giving me some unreadable strange looking characters / symbols never seen before which I cant even copy and save in a file.
SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v Can you help me with encrypting the password "mypassword" in... (15 Replies)
Discussion started by: mohtashims
15 Replies
LEARN ABOUT DEBIAN
catalyst::authentication::credential::authen::simple
Catalyst::Authentication::Credential::Authen::Simple(3pmUser Contributed Perl DocumentatiCatalyst::Authentication::Credential::Authen::Simple(3pm)
NAME
Catalyst::Authentication::Credential::Authen::Simple - Verify credentials with the Authen::Simple framework
SYNOPSIS
use Catalyst qw(Authentication);
# later on ...
if ($c->authenticate({ username => 'myusername',
password => 'mypassword' })){
my $long_name = $c->user->get('LongName');
# Hello Mr $long_name
}
DESCRIPTION
This module helps your Cataylst Application authenticate against a lot of credential databases thanks to the Authen::Simple framework.
USAGE
Just configure your Catalyst App Authentication to use class 'Authen::Simple' as the credential verifier, and give it a set of
Authen::Simple classes. You can pass arguments to the Authen::Simple:XXX class constructors with the 'args' key. Note that the authen key
is an array. If more than one class is specified, when your app authenticates, the username and password is submitted to each class until
one of the classes returns that the user/pass pair is valid. If no class validates the credentials, the user is not able to log in.
'Plugin::Authentication' => {
'realms' => {
'default' => {
'store' => { ... }
'credential' => {
'class' => 'Authen::Simple',
'authen' => [
{
'class' => 'Passwd',
'args' => {
'path' => '/etc/shadow'
}
},
{
'class' => 'SSH',
'args' => {
'host' => 'host.company.com'
}
}
]
}
}
}
}
If the Catalyst log object is compatible with the Authen::Simple log object, Authen::Simple classes will log through Catalyst.
new
Called by Catalyst::Authentication. Instances the Authen::Simple classes read from the configuration.
authenticate
Usage : Call $c->authenticate({ username => ..., password => ...});
Returns : User object if the credentials are verified successfully. undef if user not authenticated.
AUTHOR
Jose Luis Martinez
CPAN ID: JLMARTIN
CAPSiDE
jlmartinez@capside.com
http://www.pplusdomain.net
THANKS
Tobjorn Lindahl, Dylan Martin, Tomas Doran and Inigo Tejedor Arrondo for patches and recommedations
COPYRIGHT
Copyright (c) 2008 by Jose Luis Martinez Torres
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Authen::Simple and all of the Authen::Simple::XXX classes
perl v5.14.2 2009-11-16 Catalyst::Authentication::Credential::Authen::Simple(3pm)