This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# Code to turn the security report into | |
# a tab delimited text file. | |
# | |
# Code By Brad Lhotsky <[email protected]> | |
# | |
# use at your own risk, no guarantees or warranties associated. | |
# distributed under the same license as perl itself |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package authentication::kerberos; | |
=head1 NAME | |
authentication::kerberos - kerberos authentication | |
=head1 SYNOPSYS | |
use authentication::kerberos; | |
my ( $authReturn, $err ) = authenticate ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alter table configfile add PRIMARY KEY ( filename ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generic Chi-Squared Graph at 5 D of F. | |
x <- seq(0, 20, length=100) | |
hx <- dchisq(x, 5) | |
plot(x, hx, type="l", col="red", xlab="test statistics", | |
ylab="Density", main="Chi-Squared Distribution") | |
segments( x0=9.26, y0=0, x1=9.236, y1=max(hx), lty=2 ) | |
text( 12, 0.12, "cv=9.236" ) | |
legend( "topright", inset=0.05, c("df = 5"), lty=c(1), col=c("red") ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature qw{ say }; | |
use lib qw{ | |
/usr/local/pf/lib | |
/opt/local/eris/lib}; | |
use pf::schema; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Config::IniFiles; | |
use DBIx::Class::Schema::Loader qw/ make_schema_at /; | |
if( !-d './lib') { | |
die "must be run in the root dir of PacketFence!\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# HTTP "PING" Program. | |
# Allows someone to check latency to a webserver. | |
# | |
# Code by Brad Lhotsky <[email protected]> | |
# And Mark Thomas <[email protected]> | |
# | |
# Distributed under the same license as perl itself. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connect to Database | |
pgDrv <- dbDriver("PostgreSQL") | |
dbh <- dbConnect(pgDrv, host="", dbname="dnsmonitor", user="dnsmon", password="") | |
# Retrieve Statistics from DB | |
stats <- dbGetQuery(dbh, "select * from packet_timing") | |
# Close the Database Connection and free variables | |
dbDisconnect(dbh) | |
rm(dbh) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Library Loading | |
library("RPostgreSQL"); | |
library("car"); | |
library("reshape"); | |
# Connect to Database | |
pgDrv <- dbDriver("PostgreSQL") | |
dbh <- dbConnect(pgDrv, host="localhost", dbname="dnsmonitor", user="dnsmon", password="tooEasy") | |
# Retrieve Statistics from DB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Library Loading | |
library("RPostgreSQL"); | |
library("car"); | |
# Connect to Database | |
pgDrv <- dbDriver("PostgreSQL") | |
dbh <- dbConnect(pgDrv, host="localhost", dbname="dnsmonitor", user="dnsmon", password="tooEasy") | |
# Retrieve Statistics from DB | |
stats <- dbGetQuery(dbh, "select client.id, client.ip, sum(queries) as queries, sum(nx) as nx, sum(answers) as answers, sum(errors) as errors, count(distinct day) as days_active |
OlderNewer