view release on metacpan or search on metacpan
lib/App/BloomUtils.pm view on Meta::CPAN
performance, pick a smaller number of hashes. But for most cases, use the the
optimal number of hash functions.
* What is an acceptable false positive rate? This depends on your needs. 1% (1
in 100) or 0.1% (1 in 1,000) is a good start. If you want to make sure that
user's chosen password is not in a known wordlist, a higher false positive
rates will annoy your user more by rejecting her password more often, while
lower false positive rates will require a higher memory usage.
Ref: https://corte.si/posts/code/bloom-filter-rules-of-thumb/index.html
**FAQ**
lib/App/BloomUtils.pm view on Meta::CPAN
performance, pick a smaller number of hashes. But for most cases, use the the
optimal number of hash functions.
=item * What is an acceptable false positive rate? This depends on your needs. 1% (1
in 100) or 0.1% (1 in 1,000) is a good start. If you want to make sure that
user's chosen password is not in a known wordlist, a higher false positive
rates will annoy your user more by rejecting her password more often, while
lower false positive rates will require a higher memory usage.
=back
Ref: https://corte.si/posts/code/bloom-filter-rules-of-thumb/index.html
lib/App/BloomUtils.pm view on Meta::CPAN
performance, pick a smaller number of hashes. But for most cases, use the the
optimal number of hash functions.
=item * What is an acceptable false positive rate? This depends on your needs. 1% (1
in 100) or 0.1% (1 in 1,000) is a good start. If you want to make sure that
user's chosen password is not in a known wordlist, a higher false positive
rates will annoy your user more by rejecting her password more often, while
lower false positive rates will require a higher memory usage.
=back
Ref: https://corte.si/posts/code/bloom-filter-rules-of-thumb/index.html
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Bondage.pm view on Meta::CPAN
}
if ($info->{registered} == 2) {
AUTH: {
last AUTH if !defined $info->{pass};
$info->{pass} = md5_hex($info->{pass}, $CRYPT_SALT) if length $self->{config}{password} == 32;
last AUTH unless $info->{pass} eq $self->{config}{password};
last AUTH unless my $irc = $self->{ircs}{ $info->{nick} };
$info->{wheel}->put("$info->{nick} NICK :$irc->nick_name");
$irc->plugin_add("Client_$id" => App::Bondage::Client->new( Socket => $info->{socket} ));
$irc->_send_event(irc_proxy_authed => $id);
delete $self->{wheels}{$id};
return;
}
# wrong password or nick (network), dump the client
$info->{wheel}->put('ERROR :Closing Link: * [' . ( $info->{user} || 'unknown' ) . '@' . $info->{ip} . '] (Unauthorised connection)' );
delete $self->{wheels}{$id};
}
return;
lib/App/Bondage.pm view on Meta::CPAN
$self->{config} = LoadFile(catfile($self->{Work_dir}, 'config.yml'));
# some sanity checks
for my $opt (qw(listen_port password)) {
if (!defined $self->{config}{$opt}) {
die "Config option '$opt' must be defined; aborted\n";
}
}
lib/App/Bondage.pm view on Meta::CPAN
=head1 FEATURES
=head2 Easy setup
Bondage is easy to get up and running. In the configuration file, you just
have to specify the port it will listen on, the password, and some IRC
server(s) you want Bondage to connect to. Everything else has sensible
defaults, though you might want to use a custom nickname and pick some
channels to join on connect.
=head2 Logging
lib/App/Bondage.pm view on Meta::CPAN
=head2 Rejoins channels if kicked
Bondage can try to rejoin a channel if you get kicked from it.
=head2 Encrypted passwords
Bondage supports encrypted passwords in its configuration file for added
security.
=head2 SSL support
You can connect to SSL-enabled IRC servers, and make Bondage require SSL for
lib/App/Bondage.pm view on Meta::CPAN
Set this to true if you want Bondage to require the use of SSL for client
connections. You'll need to have F<ssl.crt> and F<ssl.key> files in Bondage's
working directory. More information, see
L<http://www.akadia.com/services/ssh_test_certificate.html>
=head3 C<password>
(required, no default)
The password you use to connect to Bondage. If it is 32 characters, it is
assumed to be encrypted (see L<C<bondage -c>|bondage/"SYNOPSIS">);
=head3 C<networks>
(required, no default)
lib/App/Bondage.pm view on Meta::CPAN
=head3 C<server_pass>
(optional, no default)
The IRC server password, if there is one.
=head3 C<use_ssl>
(optional, default: I<false>)
lib/App/Bondage.pm view on Meta::CPAN
=head3 C<nickserv_pass>
(optional, no default)
Your NickServ password on the IRC network, if you have one. Bondage will
identify with NickServ with this password on connect, and whenever you switch
to your original nickname.
=head3 C<nickname>
(optional, default: your UNIX user name)
lib/App/Bondage.pm view on Meta::CPAN
=head3 C<channels>
(optional, no default)
A list of all your channels and their passwords.
channels:
"chan1" : ""
"chan2" : "password"
"chan3" : ""
=head3 C<recall_mode>
(optional, default: I<"missed">)
view all matches for this distribution
view release on metacpan or search on metacpan
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
view all matches for this distribution
view release on metacpan or search on metacpan
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
view all matches for this distribution
view release on metacpan or search on metacpan
script/restart-brave view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
view all matches for this distribution
view release on metacpan or search on metacpan
script/restart-browsers view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CPANIDX/HTTP/Server.pm view on Meta::CPAN
=item C<dsn>
After running C<new>, but before calling C<run>, call this to assign the database details to
the server. Takes three arguments: a L<DBI> C<DSN> string, a username (if applicable) and a
password (if applicable).
=item C<run>
Runs the server and starts handling requests.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CPANIDX.pm view on Meta::CPAN
The username for the supplied C<dsn>.
=item C<pass>
The password for the supplied C<dsn>.
=item C<url>
The C<cpanidx-gendb> script will poll this url when it has finished its update. It should be the
root url of your CPANIDX site
view all matches for this distribution
view release on metacpan or search on metacpan
--gpg-path PATH
--gpg-name NAME
These options are used to set the path the the GPG directory (which
contains the keyring) and the name of the key that will be used.
--gpg-password PASSWORD
--gpg-passfile FILE
When signing a package, this script become interactive unless expect
(or perl Expect) is available. If one of these is available, the
password can be passed in at the command line (or a file containing
the password) using one of these two commands.
--env VAR=VAL
Sets an environment variable before building the package. This
option can be used any number of times.
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
qw(test_simple_utf8 test_bmp_utf8
@test_DN_CAs
%test_der_DNs
%test_public_keys
%test_reqs_SPKAC %test_reqs_PKCS10
%test_keys_plaintext %test_keys_password
%test_self_signed_certs %test_rootca_certs
%test_entity_certs
test_CRL
server_start server_stop server_port
create_camel_pki_conf_php
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
1dzsPX66bnNHT1dwF9K+ZilNKIpUUEPisXEsLZ28n579qZbP1vmL
-----END RSA PRIVATE KEY-----
RSA2048
);
=item I<%test_keys_password>
The same private keys as in L</%test_keys_plaintext>, but
protected with C<secret> as the password. Keys are the same as in
I<%test_keys_plaintext>; values are encrypted using 3DES-CBC,
as if by the command
openssl rsa -des3 -passout pass:secret -in test.key
=cut
our %test_keys_password =
(rsa1024 => <<RSA1024,
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,106A001EF5153939
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
is(length(App::CamelPKI::Test->test_bmp_utf8()), 3);
ok(utf8::is_utf8(App::CamelPKI::Test->test_bmp_utf8()));
};
test "%test_keys_plaintext and %test_keys_password" => sub {
is_deeply
([sort keys %App::CamelPKI::Test::test_keys_plaintext],
[sort keys %App::CamelPKI::Test::test_keys_password],
"same keys in both");
if (defined(my $openssl_bin = openssl_path)) {
while(my ($k, $v) =
each %App::CamelPKI::Test::test_keys_password) {
my ($out, $err) = run_thru_openssl
($v, qw(rsa -passin pass:secret));
is($out,
$App::CamelPKI::Test::test_keys_plaintext{$k});
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CatalystStarter/Bloated.pm view on Meta::CPAN
my @args = @_;
my @args_to_show = @args;
my ($o,$e,$r);
## hide db password:
if (
$args_to_show[0] =~ /_create\.pl$/ and
$args_to_show[1] eq "model"
) {
$args_to_show[8] = "<secret>" if
lib/App/CatalystStarter/Bloated.pm view on Meta::CPAN
for schema and model classes.
=item *
If using a dbi:Pg dsn, looks in your ~/.pgpass to find usernames
and passwords and even intelligently completes your dsn if you are
missing hostname and or port.
=item *
Sets up a TT wrapper based on a HTML5 template intializr.com and
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Changelog.pm view on Meta::CPAN
changelog --filter v
=head1 ERRORS
If there is an error during any operation (such as adding, editing, or removing passwords), an error message will be displayed indicating the issue.
=head1 AUTHOR
Luiz Felipe de Castro Vilas Boas <luizfelipecastrovb@gmail.com>
view all matches for this distribution
view release on metacpan or search on metacpan
So to be clear, if you wanted to set a default for C<--query-param-auth>, you
can either:
=over 3
=item 1. Set C<CHARON_QUERY_PARAM_AUTH=password=station>
=item 2. Put a line like C< query_param_auth: password=station > in F<.charonrc>
=item 3. Set C<CHARON_CONFLOC> to F<~/.charonrc> and add a line like the above to that file.
=back
it will just go away, instead of you forgetting to shut it down and leaving it
running forever.
=head2 --query-param-auth
charon --query-param-auth 'password=station'
charon --query-param-auth ''
Query param auth is just a handy way to be able to send moderately authenticated
links to your friends. This is on by default and generates a password with the
key of C<auth>, so links will be C<http://foo:3001/bar.tar.gz?auth=bd75z4j>. If
you want to choose the key and value pass C<$key=$value>, so if you pass
C<password=42> you could use the link C<http://foo:3001/bar.tar.gz?password=42>.
Note that while this is on by default I may decide to change that in the future.
=head2 --index --no-index
view all matches for this distribution
view release on metacpan or search on metacpan
devel/convert-scm.pl view on Meta::CPAN
$sth->execute ('favourites', $pos, $list->[$pos]);
$sth->finish();
}
} elsif ($key eq 'lme-username'
|| $key eq 'lme-password'
|| $key eq 'yahoo-quote-host'
|| $key eq 'yahoo-quote-timezone'
|| $key eq 'commsec-data-url'
|| $key eq 'commsec-enabled') {
my ($key, $value) = @$form;
view all matches for this distribution
view release on metacpan or search on metacpan
#############################################################
## Kubeseal
#############################################################
# Kubeseal handles passwords - Simple use case.
# Creates a yaml manifest file that can be used publicly.
# without sharing the real password.
echo -n bar | kubectl create secret generic mysecret --dry-run=client --from-file=foo=/dev/stdin -o yaml > mysecret.yaml
# Seal a kubernetes manifest file.
# This service needs to be running:
kubectl get service sealed-secrets-controller -n kube-system
#############################################################
## Linux Commands - expect
#############################################################
# Run a command where user input is required (script,auto,password)
expect -c 'spawn ssh SOME_USER@irkdes "date"; expect "password:"; send "asdf1234\r"; interact'
# Expect quirks (scipt,auto,password)
# This will NOT work
echo "SOME_USER" | while read n; do expect ... ; done
# This DOES work
for n in "SOME_USER"; do expect ... ; done
# Suppress output (scipt,auto,password)
# Some output
expect -c 'spawn -noecho ... '
# All output
expect -c 'log_user 0; spawn ... ' # Restore with "log_user 1"
#############################################################
## Linux Commands - passwd, chpasswd, vipw, gpasswd
#############################################################
# Reset/Change a users password (admin)
Log unto fs
sudo passwd xbexxxx
asdf1234
asdf1234
sudo make -C /var/yp
# Change root password
sudo passwd root
# Reset password in a script with no prompt (change)
# Can only supply one user to "passwd"
echo asdf1234 | sudo passwd xbe4092 --stdin; sudo make -C /var/yp
echo -e "xbe4092:asdf1234\npotapov:asdf1234" | sudo chpasswd; sudo make -C /var/yp
# Reset password over ssh (change,admin)
ssh -qtY potapov@lnxbrfs01 'echo -e "xbe4092:asdf123\npotapov:asdf123" | sudo /usr/sbin/chpasswd; sudo make -C /var/yp'
sb fs1 'echo -e "xbe4092:asdf123\npotapov:asdf123" | sudo /usr/sbin/chpasswd; sudo make -C /var/yp'
# Reset password of many users (admin,change)
echo "xbe4092:asdf1234" | sudo chpasswd
sudo make -C /var/yp
# Edit the password file. Disable/Lock user accounts before deleting
# Change /bin/bash to /bin/false
# Asterisk in password field disables account
sudo vipw
sudo make -C /var/yp
# Check if specific user account is:
# L - Locked
#############################################################
## Linux Commands - read
#############################################################
# Read input from the keyword/user without showing the password (much easier in bash)
read -s pass; echo "got [$pass]"
read -s -p "Password:" pass; echo; echo "got [$pass]"
# Read input from the keyword/user without showing the password. Limit password length
read -s -n 5 -p "Password:" pass; echo; echo "got [$pass]"
#############################################################
## Linux Commands - reptyr
# Setup SVN Cyient variables (debugging use)
svn_pull_url="<url>/Tests"
svn_push_url="<url>/Results"
svn_username="tpotapov"
read -s -p "password: " svn_password
SB run 1234 t1+a "svn pull=$svn_pull_url push=$svn_push_url user=$svn_username pass=$svn_password"
#############################################################
## Linux Commands - tail
#############################################################
# Pass through wget firewall/proxy (Download)
read -sp "Password: " PASSWORD
export http_proxy=http://xbe4092:$PASSWORD@pratt-proxyva.utc.com:8080/
export https_proxy=http://xbe4092:$PASSWORD@pratt-proxyva.utc.com:8080/
# If password contains special characters (like #,@ ...)
#############################################################
## Linux Commands - whereis
#############################################################
#############################################################
## Linux Commands - ypcat
#############################################################
# View password file on main server (yellow page cat)
ypcat passwd
# Add ypcat passwd command if missing
vi /var/yp/nicknames
# add entry: passwd passwd.byname
# Return users which are found in the yellow pages password file
cat user_deletion_list | perl -ne 'print `ypcat passwd | grep $_` ' > found_in_yp
# Remove/Delete a user account
1. Check username in Outlook (CTRL-K)
2. Check username in Yellow Pages (ypcat passwd | grep username)
#############################################################
## Linux Commands - yppasswd
#############################################################
# Change your password
yppasswd
#############################################################
## Linux Commands - zero
gpg --gen-key
# Create a PGP signed file
gpg -ea -r "YOUR_NAME" > $HOME/.pause
user USER
password Pas$word
# Show your PGP keys (list)
gpg -k # Public keys.
gpg -K # Secret keys.
# Decrypt a PGP signed file.
gpg -d ~/.pause
# Cache password in agent.
# Some reason this fixed caching.
gpgconf --kill gpg-agent
# Share GPG keys (export from one, import in another machine).
gpg --export-secret-key -a > secretkey.asc
# Selects only form elements (input, select, textarea, button)
# (JQuery,Selectors,Form,Filters,Table 2.6)
:input
# Selects only password elements (input[type=password])
# (JQuery,Selectors,Form,Filters,Table 2.6)
:password
# Selects only radio elements (input[type=radio])
# (JQuery,Selectors,Form,Filters,Table 2.6)
:radio
# Install MySQL on linux.
sudo apt install mysql-server mysql-client libmysqlclient-dev
sudo systemctl start mysql.service
mysql -u root
> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
> CREATE USER 'tim'@'localhost' IDENTIFIED BY 'tim';
> use mysql;
> SELECT User, password_last_changed FROM user;
mysql -u root -proot
cpanm DBD::mysql
# Cannot login to msql with root.
sudo vi /etc/mysql/my.cnf
# Find duplicates using mysql.
mysql -u otrs -potrs otrs -e '
SELECT col,COUNT(col) from table GROUP BY col HAVING COUNT(col) >
# Run mysql query on the command line.
mysql -u user -ppassword table -e 'query'
# Show a table schema in mysql
DESCRIBE table
# MySQL strange behavior
perl -lE 'say for getgrnam("systems")'
# Group ID
perl -lE 'say for getgrgid("systems")'
# Get password file entry for a username (check if they exist)
perl -le 'print for getpwnam "<USER>"'
#############################################################
## Perl Functions - local
#############################################################
# Get terminal width in perl
perl -MTerm::ReadKey= -E "my ($w) = GetTerminalSize(); say $w"
# Read input from the keyword/user without showing the password
perl -MTerm::ReadKey -le 'ReadMode(2); $pass .= $key while(ord($key = ReadKey(0)) !~ /^(?: 10|13 )$/x); ReadMode(0); print "Got [$pass]"'
# Read input from the keyword/user without showing the password (same, but using keywords)
perl -MTerm::ReadKey -le 'ReadMode(noecho); $pass .= $key while(ord($key = ReadKey(0)) !~ /^(?: 10|13 )$/x); ReadMode(restore); print "Got [$pass]"'
perl -MTerm::ReadKey -e 'ReadMode(2); while($c=ReadKey(0), ord($c) !~ /^(?:10|13)$/x){ $pass .= $c } ReadMode(0); print "[$pass]\n"'
# Read input from the keyword/user without showing the password (same, but more compact)
perl -MTerm::ReadKey -le 'ReadMode(2); $pass = ReadLine(0); chomp $pass; ReadMode(0); print "Got [$pass]"'
perl -MTerm::ReadKey -le 'ReadMode(2); $_ = ReadLine(0); chomp; ReadMode(0); print "[$_]"'
# Read input from the keyword/user without showing the password (same, but on windows)
perl -MTerm::ReadKey -le "ReadMode 2; $pass = ReadLine 0; chomp $pass; ReadMode 0; print qq([$pass])"
# Read input from the keyword/user without showing the password. replace characters with a star "*"
perl -MTerm::ReadKey -e 'ReadMode(4); while($c=ReadKey(0),$o=ord($c),$o != 10 and $o != 13){ if($o == 127 || $o == 8){chop $p; print "\b \b"}elsif($o < 32){}else{ $p .= $c; print "*" }} ReadMode(0); print "[$p]\n"'
perl -MTerm::ReadKey -e 'ReadMode 3; while($c=ReadKey(0),$o=ord($c),$o != 10 and $o != 13){ if($o == 127 || $o == 8){chop $p; print "\b \b"}elsif($o < 32){}else{ $p .= $c; print "*" }} ReadMode 0; print "[$p]\n"'
perl -MTerm::ReadKey -e 'ReadMode 4; while($c=ReadKey(0),$o=ord($c),$o!=10){ if($o==127 or $o==8){chop $p; print "\b \b"}elsif($o < 32){}else{$p.=$c; print "*"}} ReadMode 0; print "[$p]\n"'
#############################################################
## PI - General
#############################################################
# No password when entering sudo commands (Linux,pi,debug)
vi /etc/sudoers
# Add this to bottom
pi ALL=(ALL) NOPASSWD:ALL
# No password when entering sudo commands (Linux,pi,debug)
sudo usermod -a -G GROUP_NAME USER
#
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
# The mapped name (cryptHome) must match the one you
# defined in the crypttab. Replace username by the name of the actual user.
#
# You could also mount it under /home, but then you will have
# all user's home directories in one encrypted drive - that
# means all of them need to know the partition's password to open it on boot.
# Originally thought these were also necessary for an external hard drive.
# Appear to work without the lines.
#
sudo vi /etc/crypttab
# <name> <device> <password> <options>
mnt-usb-crypt UUID=<device-uuid> /path/to/key luks,noauto
#
# Need to run after updating cryptab:
sudo update-initramfs -u -k all
#
# Administrators can do just about everything a user would want to do with
# Windows, typically this includes the first user you create with windows.
# You are probably a member of this group.
#
# Users are accounts with lower permissions, and typically require an Administrator
# to enter their password to do anything that would bring up a UAC console in
# Windows. You can create accounts with these permissions (I do it for my
# guest account) with the "Add Remove User Accounts" menu in the Control Panel.
# Find out who have a file opened
# Need to have this setup one time (as admin)
# @REM='
# @echo off
# mode CON: COLS=120 LINES=30
#
# set file=H:/kog.dat
# perl -lE "$f='%file%'; -e $f and exit; print qq(Enter your password: ); chomp($p=<STDIN>); open FH, qq(>$f); print FH $p; system qq(attrib +h $f) "
# set /P pass=< %file%
#
# echo Opening Exceed
# start /B "Exceed" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Open Text Exceed 14 x64\Exceed.lnk"
#
# Service commands
::
:: Add new service
sc.exe create MyProgram binPath="C:\Program Files (x86)\Windows Resource Kits\Tools\srvany.exe"
sc config MyProgram start=auto
sc.exe config MyProgram obj= "me@home.com" password= ""
::
:: Remove a service
sc.exe delete MyProgram
::
:: Start a service
view all matches for this distribution
view release on metacpan or search on metacpan
script/restart-chrome view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
view all matches for this distribution
view release on metacpan or search on metacpan
themes/bs2/static/css/bootstrap.css view on Meta::CPAN
}
select,
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
themes/bs2/static/css/bootstrap.css view on Meta::CPAN
height: auto;
}
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
themes/bs2/static/css/bootstrap.css view on Meta::CPAN
transition: border linear 0.2s, box-shadow linear 0.2s;
}
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cinema/Controller/User.pm view on Meta::CPAN
return;
}
my $form = $self->formbuilder;
# Get the username and password from form
my $uid = $form->field('username') || "";
my $pwd = $form->field('password') || "";
# If the username and password values were found in form
if ( $form->submitted && $form->validate ) {
my $status = $c->authenticate(
{
username => $uid,
password => $pwd,
active => 1
}
);
if ($status) { # If successful, then let them use the application
$c->flash->{message} = "Welcome back, " . $uid;
$c->res->redirect( $c->uri_for('/menu/home') );
return;
}
else {
$c->flash->{error} = "Bad username or password.";
}
}
}
sub logout : Local {
lib/App/Cinema/Controller/User.pm view on Meta::CPAN
{
first_name => $form->field('fname'),
last_name => $form->field('lname'),
email_address => $form->field('email'),
username => $form->field('uid'),
password => $form->field('pwd'),
active => 1,
user_roles => [ { role_id => $form->field('role') } ]
}
);
my $e = App::Cinema::Event->new();
lib/App/Cinema/Controller/User.pm view on Meta::CPAN
->delete();
$user->first_name( $form->field('fname') );
$user->last_name( $form->field('lname') );
$user->email_address( $form->field('email') );
$user->password( $form->field('pwd') );
foreach ( $form->field('role') ) {
$user->create_related( 'user_roles', { role_id => $_ } );
}
lib/App/Cinema/Controller/User.pm view on Meta::CPAN
name => 'email',
value => $user->email_address,
);
$form->field(
name => 'pwd',
value => $user->password,
);
my @ids = ();
foreach ( $user->user_roles ) {
push @ids, $_->role_id;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ClusterSSH/Getopt.pm view on Meta::CPAN
q{If the terminals overlap too much see the C<terminal_reserve_XXXXX> options in the [_1] file (see [_2]).},
'F<$HOME/.clusterssh/config>', 'L</"FILES">'
);
output '=item *';
output $self->loc(
q{When using ClusterSSH on a large number of systems to connect to a single system using an SSH utility (e.g. you issue a command to to copy a file using scp from the remote computers to a single host) and when these connections require authe...
'F<~/.ssh/authorized_keys>'
);
output '=item *';
output $self->loc(
q{If client windows fail to open, try running:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Cmdline.pm view on Meta::CPAN
--dbname database name
--dbhost hostname hosting database
--dbport database port number
--dbuser user name to access database
--dbpasswd password to access database
--dbsocket UNIX socket accessing the database
-s --show show database access properties
-h display a short usage message
-v --version display a version
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Authentication.pm view on Meta::CPAN
$context = App->context();
$authentication = $context->service("Authentication"); # or ...
$authentication = $context->authentication();
if ($authentication->validate_password($username, $password)) {
...
}
=head1 DESCRIPTION
lib/App/Authentication.pm view on Meta::CPAN
=head1 Public Methods:
=cut
#############################################################################
# validate_password()
#############################################################################
=head2 validate_password()
* Signature: $username = $auth->validate_password();
* Param: void
* Return: $username string
* Throws: App::Exception::Authentication
* Since: 0.01
Sample Usage:
$username = $auth->validate_password();
=cut
sub validate_password {
my ($self, $username, $password) = @_;
return(1);
}
#############################################################################
# Method: service_type()
view all matches for this distribution
view release on metacpan or search on metacpan
script/create-random-file view on Meta::CPAN
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
Do not use any configuration file.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DBBrowser/DB.pm view on Meta::CPAN
return 'Pg';
}
sub get_db_handle {
my ( $self, $db ) = @_;
my $dbh = DBI->connect( "DBI:Pg:dbname=$db", 'user', 'password', {
RaiseError => 1,
PrintError => 0,
});
return $dbh;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DBCritic.pm view on Meta::CPAN
#pod =head1 SYNOPSIS
#pod
#pod use App::DBCritic;
#pod
#pod my $critic = App::DBCritic->new(
#pod dsn => 'dbi:Oracle:HR', username => 'scott', password => 'tiger');
#pod $critic->critique();
#pod
#pod =head1 DESCRIPTION
#pod
#pod This package is used to scan a database schema and catalog any violations
lib/App/DBCritic.pm view on Meta::CPAN
use Moo;
use Scalar::Util 'blessed';
use App::DBCritic::Loader;
for (qw(username password class_name)) { has $_ => ( is => 'ro' ) }
#pod =attr username
#pod
#pod The optional username used to connect to the database.
#pod
#pod =attr password
#pod
#pod The optional password used to connect to the database.
#pod
#pod =attr class_name
#pod
#pod The name of a L<DBIx::Class::Schema|DBIx::Class::Schema> class you wish to
#pod L</critique>.
lib/App/DBCritic.pm view on Meta::CPAN
);
sub _build_schema {
my $self = shift;
my @connect_info = map { $self->$_ } qw(dsn username password);
if ( my $class_name = $self->class_name ) {
return $class_name->connect(@connect_info)
if eval "require $class_name";
}
lib/App/DBCritic.pm view on Meta::CPAN
=head1 SYNOPSIS
use App::DBCritic;
my $critic = App::DBCritic->new(
dsn => 'dbi:Oracle:HR', username => 'scott', password => 'tiger');
$critic->critique();
=head1 DESCRIPTION
This package is used to scan a database schema and catalog any violations
lib/App/DBCritic.pm view on Meta::CPAN
=head2 username
The optional username used to connect to the database.
=head2 password
The optional password used to connect to the database.
=head2 class_name
The name of a L<DBIx::Class::Schema|DBIx::Class::Schema> class you wish to
L</critique>.
view all matches for this distribution
view release on metacpan or search on metacpan
bin/dbiloader view on Meta::CPAN
=head1 SYNOPSIS
dbiloader C<-h>
dbiloader [C<-c>] [C<-t E<lt>separatorE<gt>>] [C<-u E<lt>usernameE<gt>>] [C<-p E<lt>passwordE<gt>>] C<E<lt>connectionE<gt>> C<E<lt>tableE<gt>> [C<E<lt>schemaE<gt>>] [C<E<lt>filesE<gt>>...]
# Read TSV and load into mytable in SQLite database t.db
dbiloader -t '\t' dbi:SQLite:t.db mytable data.txt
# Clear mytable, read CSV (default), and load into mytable in SQLite database t.db
bin/dbiloader view on Meta::CPAN
=head2 C<-u E<lt>usernameE<gt>>
Specify username.
=head2 C<-p E<lt>passwordE<gt>>
Specify password.
=head2 C<E<lt>connectionE<gt>>
Specify DBI connection string.
view all matches for this distribution
view release on metacpan or search on metacpan
bin/dump-dbi-column-info view on Meta::CPAN
pos => 1,
},
user => {
schema => 'str*',
},
password => {
schema => 'str*',
},
catalog => {
schema => 'str*',
},
bin/dump-dbi-column-info view on Meta::CPAN
},
};
sub dump_dbi_column_info {
my %args = @_;
my $dbh = DBI->connect($args{dsn}, $args{user}, $args{password},
{RaiseError=>1});
my @rows;
my $sth = $dbh->column_info($args{catalog}, $args{schema}, $args{table}, undef);
while (my $row = $sth->fetchrow_hashref) {
push @rows, $row;
bin/dump-dbi-column-info view on Meta::CPAN
=item B<--help>, B<-h>, B<-?>
Display help message and exit.
=item B<--password>=I<s>
=item B<--schema>=I<s>
Default value:
bin/dump-dbi-column-info view on Meta::CPAN
catalog (see --catalog)
dsn (see --dsn)
format (see --format)
naked_res (see --naked-res)
password (see --password)
schema (see --schema)
table (see --table)
user (see --user)
=head1 ENVIRONMENT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DDNS/Namecheap.pm view on Meta::CPAN
use LWP::Simple qw($ua get);
$ua->agent("");
use Mozilla::CA;
has domain => ( is => 'ro', isa => 'Str', required => 1 );
has password => ( is => 'ro', isa => 'Str', required => 1 );
has hosts => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has ip => ( is => 'ro', isa => 'Str', required => 0 );
sub update {
my $self = shift;
foreach ( @{ $self->{hosts} } ) {
my $url = "https://dynamicdns.park-your-domain.com/update?domain=$self->{domain}&password=$self->{password}&host=$_";
$url .= "&ip=$self->{ip}" if $self->{ip};
if ( my $return = get($url) ) {
unless ( $return =~ /<errcount>0<\/errcount>/is ) {
$return = ( $return =~ /<responsestring>(.*)<\/responsestring>/is ? $1 : "unknown error" );
print "failure submitting host \"$_\.$self->{domain}\": $return\n";
lib/App/DDNS/Namecheap.pm view on Meta::CPAN
=head1 SYNOPSIS
my $domain = App::DDNS::Namecheap->new(
domain => 'mysite.org',
password => 'abcdefghijklmnopqrstuvwxyz012345',
hosts => [ "@", "www", "*" ],
ip => '127.0.0.1', #optional -- defaults to external ip
);
$domain->update();
view all matches for this distribution
view release on metacpan or search on metacpan
script/gen-bind-zone-from-powerdns-db view on Meta::CPAN
Default value:
"DBI:mysql:database=pdns"
=item B<--db-password>=I<s>
=item B<--db-user>=I<s>
=back
view all matches for this distribution
view release on metacpan or search on metacpan
SECURITY.md view on Meta::CPAN
Security vulnerabilities can be reported to the current App-Dest
maintainers by email to Gryphon Shafer <gryphon@cpan.org>.
Please include as many details as possible, including code samples
or test cases, so that we can reproduce the issue. Check that your
report does not expose any sensitive data, such as passwords,
tokens, or personal information.
If you would like any help with triaging the issue, or if the issue
is being actively exploited, please copy the report to the CPAN
Security Group (CPANSec) at <cpan-security@security.metacpan.org>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Devbot.pm view on Meta::CPAN
use Regexp::Common qw /net/;
##################################################
my $nick='devbot';
my $password;
my $server='irc.oftc.net';
my $port=6697;
my $ssl=1;
my @channels;
my $trace=0;
lib/App/Devbot.pm view on Meta::CPAN
my $log=1;
my $store_files=0;
GetOptions (
"nick=s" => \$nick,
"password=s" => \$password,
"server=s" => \$server,
"port=i" => \$port,
"ssl!" => \$ssl,
"channel=s" => \@channels,
"log!" => \$log,
lib/App/Devbot.pm view on Meta::CPAN
mkdir "logs/$channel";
append_file "logs/$channel/$file.txt", strftime ('%T ', localtime), @strings, "\n";
}
sub bot_start{
$irc->plugin_add (NickServID => POE::Component::IRC::Plugin::NickServID->new(Password => $password)) if defined $password;
$irc->plugin_add (AutoJoin => POE::Component::IRC::Plugin::AutoJoin->new(
Channels => \@channels,
RejoinOnKick => 1,
Rejoin_delay => 10,
Retry_when_banned => 60,
lib/App/Devbot.pm view on Meta::CPAN
=item B<--nick> I<nickname>
The nickname of devbot. Defaults to devbot.
=item B<--password> I<password>
If supplied, identify to NickServ with this password
=item B<--server> I<hostname>
The server to connect to. Defaults to irc.oftc.net.
view all matches for this distribution