Re: security/hatchet broken???

2008-11-30 Thread Jason Dixon
On Fri, Nov 28, 2008 at 06:59:34PM +, Sevan / Venture37 wrote:
 giovanni wrote:
 maybe this is the fix...

 --- hatchet.origFri Nov  7 08:23:37 2008
 +++ hatchet Fri Nov 28 12:57:35 2008
 @@ -214,7 +214,7 @@
  sub insert_table {
 my ($date, $points, $rulenum, $action, $interface, $src_host,
 $src_port, $dst_host, $dst_port, $proto) = @_;
 $date =~ /^(\w+) (\d+) (\d+)\:(\d+)\:(\d+)$/;
 -   my ($month, $mday, $hour, $min, $sec, $year) = ($1, $2, $3,
 $4, $5, [split(/ /,localtime)]-[5]);
 +   my ($month, $mday, $hour, $min, $sec, $year) = ($1, $2, $3,
 $4, $5, [localtime]-[5]);
 my %months = qw( Jan 0 Feb 1 Mar 2 Apr 3 May 4 Jun 5 Jul 6 Aug
 7 Sep 8 Oct 9 Nov 10 Dec 11 );
 my $epoch = timelocal_nocheck($sec, $min, $hour, $mday,
 $months{$month}, $year);
 unless ($existing-{$epoch $points}) {

 Perfect, that did the trick nicely
 Thank you very much! :)

I've released 0.9.2 which includes this fix, and updated the port as
well.

-- 
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net/



Re: security/hatchet broken???

2008-11-28 Thread giovanni
maybe this is the fix...

--- hatchet.origFri Nov  7 08:23:37 2008
+++ hatchet Fri Nov 28 12:57:35 2008
@@ -214,7 +214,7 @@
 sub insert_table {
my ($date, $points, $rulenum, $action, $interface, $src_host,
$src_port, $dst_host, $dst_port, $proto) = @_;
$date =~ /^(\w+) (\d+) (\d+)\:(\d+)\:(\d+)$/;
-   my ($month, $mday, $hour, $min, $sec, $year) = ($1, $2, $3,
$4, $5, [split(/ /,localtime)]-[5]);
+   my ($month, $mday, $hour, $min, $sec, $year) = ($1, $2, $3,
$4, $5, [localtime]-[5]);
my %months = qw( Jan 0 Feb 1 Mar 2 Apr 3 May 4 Jun 5 Jul 6 Aug
7 Sep 8 Oct 9 Nov 10 Dec 11 );
my $epoch = timelocal_nocheck($sec, $min, $hour, $mday,
$months{$month}, $year);
unless ($existing-{$epoch $points}) {

-- 
see ya,
giovanni



Re: security/hatchet broken???

2008-11-28 Thread Jason Dixon
On Fri, Nov 28, 2008 at 04:23:44PM +0100, giovanni wrote:
 maybe this is the fix...
 
 --- hatchet.origFri Nov  7 08:23:37 2008
 +++ hatchet Fri Nov 28 12:57:35 2008
 @@ -214,7 +214,7 @@
  sub insert_table {
 my ($date, $points, $rulenum, $action, $interface, $src_host,
 $src_port, $dst_host, $dst_port, $proto) = @_;
 $date =~ /^(\w+) (\d+) (\d+)\:(\d+)\:(\d+)$/;
 -   my ($month, $mday, $hour, $min, $sec, $year) = ($1, $2, $3,
 $4, $5, [split(/ /,localtime)]-[5]);
 +   my ($month, $mday, $hour, $min, $sec, $year) = ($1, $2, $3,
 $4, $5, [localtime]-[5]);
 my %months = qw( Jan 0 Feb 1 Mar 2 Apr 3 May 4 Jun 5 Jul 6 Aug
 7 Sep 8 Oct 9 Nov 10 Dec 11 );
 my $epoch = timelocal_nocheck($sec, $min, $hour, $mday,
 $months{$month}, $year);
 unless ($existing-{$epoch $points}) {

Yes, this was committed months ago but I apparently forgot to roll an
update to the port.  I'll update it this weekend.

http://code.google.com/p/hatchet/source/detail?r=26

-- 
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net/



Re: security/hatchet broken???

2008-11-28 Thread Sevan / Venture37

giovanni wrote:

maybe this is the fix...

--- hatchet.origFri Nov  7 08:23:37 2008
+++ hatchet Fri Nov 28 12:57:35 2008
@@ -214,7 +214,7 @@
 sub insert_table {
my ($date, $points, $rulenum, $action, $interface, $src_host,
$src_port, $dst_host, $dst_port, $proto) = @_;
$date =~ /^(\w+) (\d+) (\d+)\:(\d+)\:(\d+)$/;
-   my ($month, $mday, $hour, $min, $sec, $year) = ($1, $2, $3,
$4, $5, [split(/ /,localtime)]-[5]);
+   my ($month, $mday, $hour, $min, $sec, $year) = ($1, $2, $3,
$4, $5, [localtime]-[5]);
my %months = qw( Jan 0 Feb 1 Mar 2 Apr 3 May 4 Jun 5 Jul 6 Aug
7 Sep 8 Oct 9 Nov 10 Dec 11 );
my $epoch = timelocal_nocheck($sec, $min, $hour, $mday,
$months{$month}, $year);
unless ($existing-{$epoch $points}) {



Perfect, that did the trick nicely
Thank you very much! :)


Sevan / Venture37