Apache-AuthenProgram

 view release on metacpan or  search on metacpan

examples/oralogon  view on Meta::CPAN

#!/www/perl-5.6.1/bin/perl -Tw
# Example Oracle authentication via SQL*Plus program.
#
# NOTE: Runs in taint mode because it is usually
#       invoked by other programs (mainly CGIs).


# ------ pragmas
use strict;

# ------ define variables
my $database = "";	# Oracle TNS database name
my @output   = ();	# output of SQL*Plus command
my $password = "";	# password for $username

examples/smblogon  view on Meta::CPAN

#!/www/perl-5.6.1/bin/perl -Tw
# SMB logon tester (uses Samba's smbclient).
#
# NOTE: Runs in taint mode because it is usually
#       invoked by other programs (mainly CGIs).


# ------ pragmas
use strict;


# ------ define variables
my @output   = ();	# smbclient output lines
my $password = "";	# $username's password
my $server   = "";	# server NetBIOS name
my $share    = "";	# share on $server (cannot be hidden share)
my $smbclient		# Samba smbclient pathname
 = "/www/bin/smbclient";
my $username = "";	# user ID for access


# ------ verify and untaint arguments
$ENV{"PATH"} = "/bin:/usr/bin";
if (scalar(@ARGV) < 4) {
    die "usage: smblogon username password server share\n";
}
$ARGV[0] =~ m#([^`']+)#;
$username = $1;
$ARGV[1] =~ m#([^`']+)#;
$password = $1;
$ARGV[2] =~ m#(([a-zA-Z0-9]|-|\+|_|\.)+)#;
$server   = $1;



( run in 0.325 second using v1.01-cache-2.11-cpan-4e96b696675 )