This file contains hidden or 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 | |
| ######################################################################### | |
| # Parse /var/log/secure for attacks and log the attacks to a database. | |
| # 11/16/2011 | |
| # [email protected] | |
| ######################################################################### | |
| use strict; | |
| use warnings; |
This file contains hidden or 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
| [evan@evan-fedora Windows7]$ ls -Flrt | |
| total 18784080 | |
| drwxr-xr-x. 3 evan evan 4096 Feb 5 2011 caches/ | |
| -rw-------. 1 evan evan 9769058304 Feb 14 2011 Windows 7.vmdk | |
| -rw-r-----. 1 evan evan 28011 Feb 14 2011 Windows 7-Snapshot1.vmsn | |
| -rw-r--r--. 1 evan evan 1641 Feb 14 2011 Windows 7.vmxf | |
| -rw-r--r--. 1 evan evan 303512 Jul 8 15:57 vmware-2.log | |
| -rw-r--r--. 1 evan evan 706853 Jul 8 19:07 vmware-1.log | |
| -rw-r--r--. 1 evan evan 313609 Sep 9 17:28 vmware-0.log | |
| -rw-r-----. 1 evan evan 9464053760 Sep 9 17:41 Windows 7-000001.vmdk |
This file contains hidden or 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
| %# BEGIN BPS TAGGED BLOCK {{{ | |
| %# | |
| %# COPYRIGHT: | |
| %# | |
| %# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC | |
| %# <[email protected]> | |
| %# | |
| %# (Except where explicitly superseded by other copyright notices) | |
| %# | |
| %# |
This file contains hidden or 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 | |
| use DateTime; | |
| my $date = '2009-02-13 15:43:14'; | |
| print "Original: $date\n"; | |
| print "Converted: "; | |
This file contains hidden or 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 | |
| # | |
| # Evan Hoffman ([email protected]) | |
| # 13 January, 2010 | |
| # | |
| # Base functionality from: http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP/FAQ.pod#..._in_MS_Active_Directory_? | |
| print "Content-Type: text/html\n\n"; | |
| use Net::LDAP; |
This file contains hidden or 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 | |
| my %domains = (); | |
| while(<>) { | |
| chomp; | |
| my @a = split(/\t/); | |
| my ($host, $dom, $points_to,$unused,$crap) = map { s/^([\W\s]+)(.+)/$2/g ; $_; } @a; | |
| #next if $unused; |
This file contains hidden or 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
| # Read message body from STDIN, replacing illegal headers with X-headers. | |
| my @legal_headers = qw( Accept-Language Bcc Cc Comments Content-Type Content-Transfer-Encoding Content-ID Content-Description Content-Disposition Content-Language Date DKIM-Signature DomainKey-Signature From In-Reply-To Keywords List-Archive List-Help List-Id List-Owner List-Post List-Subscribe List-Unsubscribe Message-Id MIME-Version Received References Reply-To Return-Path Sender Subject Thread-Index Thread-Topic To User-Agent ); | |
| my %legal_headers; | |
| @legal_headers{@legal_headers} = (1) x @legal_headers; | |
| sub read_message { | |
| my $in_header = 1; | |
| my $in_body = 0; |
This file contains hidden or 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
| #!/bin/bash | |
| # Compellent CLI config | |
| WAL_ARCHIVE_DIR=/mnt/isilon/wal-archive/ | |
| TIMESTAMP_FILE="$WAL_ARCHIVE_DIR/`date +%s`.lock" | |
| JAVA=/usr/bin/java | |
| CML_JAR=CompCU.jar |
This file contains hidden or 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 | |
| use strict; | |
| use warnings; | |
| my @legal_headers = qw( Accept-Language Bcc Cc Comments Content-Type Content-Transfer-Encoding Content-ID Content-Description Content-Disposition Content-Language Date DKIM-Signature DomainKey-Signature From In-Reply-To Keywords List-Archive List-Help List-Id List-Owner List-Post List-Subscribe List-Unsubscribe Message-Id MIME-Version Received References Reply-To Return-Path Sender Subject Thread-Index Thread-Topic To User-Agent ); | |
| my %legal_headers; | |
| @legal_headers{@legal_headers} = (1) x @legal_headers; |
This file contains hidden or 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
| #!/bin/bash | |
| PS1='[\d \t \u@\h \# \W]\$ ' | |
| function settitle () { | |
| export PREV_COMMAND=${@} | |
| export CURR_CMD=${PREV_COMMAND} | |
| echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~} : ${CURR_CMD}\007" | |
| } |