my bad - this works, my code had several logic errors - thanks corona.
There is no error checking, plus tcsetattr() will return success even if it does not set all the attributes correctly. See 'Advanced Programming in the UNIX Environment' - Stevens & Rago - section on terminal I/O/
Is it possible for a internal LAN to mask a IP e.g. i have a server ip running the intranet ip being 192.168.0.8 and i want to make that like www.intranet.com is this possible on a internal network ? (1 Reply)
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... (2 Replies)
I have a pipe delimited file that I need to 'mask' to before loading to keep some data confidential. I need to maintain the first 4 bytes of certain columns and replace the remaining bytes with an 'x'. I would like to maintain spaces but it's not a requirement.
Example, need to mask columns 2... (2 Replies)
Hi,
I currently have a UNIX script with a function that uses a username and password to connect to the database, retrieve some information and then exit.
At the moment, am getting the username and password from a hidden plain text file and permission set to -r--------, i.e. read only to who... (1 Reply)
Hi I am facing an issue with the below script which has the below line
each field being separated with a tab.
I need to mask the 8 and 7th field based on following conditions
1. 8th field is 16 in length and is numerics
i will mask the middle 6 digits except the first 6 and last 4.
input... (2 Replies)
Is there a way to mask the password inside of a script to minimize the impact of a comprimised server? So
ssh -o "PasswordAuthentication no" -o "HostbasedAuthentication yes" -l testuser 192.168.3.1 "mysqldump --opt --all-databases -u root -pPassword| gzip" > $backup_dir/mysqldump.gz
a... (2 Replies)
I have a requirement of masking few specific fields in the UNIX file. The details are as following-
File is fixed length file with each record of 250 charater length.
2 fields needs to be masked – the positions are 21:30 and 110:120
The character by character making needs to be done which... (5 Replies)
My file "test.dat" data as below
Requirement is to mask(replace) all english characters with "X" EXCEPT first 7 characters of every line.
my command
awk '{gsub("]","X")}1' test.dat
looks not working properly, Appreciate any suggestion... (6 Replies)
Discussion started by: JSKOBS
6 Replies
LEARN ABOUT DEBIAN
dbix::password
Password(3pm) User Contributed Perl Documentation Password(3pm)NAME
DBIx::Password - Allows you to create a global password file for DB passwords
SYNOPSIS
use DBIx::Password;
my $dbh = DBIx::Password->connect($user);
my $dbh = DBIx::Password->connect_cached($user);
$dbh->getDriver;
DBIx::Password::getDriver($user);
DBIx::Password::checkVirtualUser($user);
DBIx::Password::clearConfig();
DBIx::Password::readConfig("$ENV{HOME}/.my.secret.file");
DESCRIPTION
Don't you hate keeping track of database passwords and such throughout your scripts? How about the problem of changing those passwords on a
mass scale? This module is one possible solution. It stores all your virtual users and data in /etc/dbix-password.conf. For each user you
need to specify the database module to use, the database connect string, the username and the password. You will have to give a name to
this virtual user. You can add as many as you like.
I would recommend that if you are only using this with web applications that you change the final permissions on this package after it is
installed in site_perl such that only the webserver can read it.
A method called getDriver has been added so that you can determine what driver is being used (handy for working out database indepence
issues).
If you want to find out if the virtual user is valid, you can call the class method checkVirtualUser(). It returns true(1) if the
username is valid, and zero if not.
Once your are done you can use the connect method (or the connect_cache method) that comes with DBIx-Password and just specify one of the
virtual users you defined while making the module.
BTW I learned the bless hack that is used from Apache::DBI so some credit should go to the authors of that module. This is a rewrite of
the module Tangent::DB that I did for slashcode.
If your program does not need the system-wide information stored in the /etc/dbix-password.conf file, you may use the clearConfig() and
readConfig() functions to get the data from another source. At any time, readConfig() may also be used to merge the data from another file
into the currently-loaded configuration.
Hope you enjoy it.
HOME
To find out more information look at: http://www.tangent.org/DBIx-Password/
AUTHOR
Brian Aker, brian@tangent.org
SEE ALSO perl(1). DBI(3).
perl v5.10.0 2009-05-09 Password(3pm)