Anyone written a POE::Filter for modsec_audit.log?

2010-04-29 Thread Mike Schroeder
I know Rocco wrote POE::Filter::Snort - just wondering if anyone has written
a filter for the audit log from the mod_security web application firewall?
 If not, we will write one and contribute it back, just wanted to make sure
we weren't reinventing the wheel. (no poe pun intended).
 POE::Filter::ModSecurity sound like an ok name space?

Mike.


Re: A Gtk2 Chat Client

2008-01-04 Thread Mike Schroeder
Is the window disappearing or is the script exiting?  I know with 
POE::Loop::Wx you sometimes need to add a keep alive loop in POE...



On 03/01/08 06:04 PM, Jamie Lahowetz wrote:

I would like to create a Gtk2 based Chat client that can be used with the
chat server on the POE cookbook. To do this I have to sort of reteach myself
on using Gtk2 in the POE loop. Currently I am trying to get the program to
create a simple window. I'm having trouble with this, the window seems to
just disappear with no warnings. Any ideas?

#!/usr/bin/perl
use warnings;
use strict;

use Gtk2 -init;
use Glib qw/TRUE FALSE/;
use POE::Kernel { loop = Glib };
use POE::Session;

# Create the session that will drive the user interface.

POE::Session-create(
inline_states = {
_start   = \ui_start,
#ev_count = \ui_count,
#ev_clear = \ui_clear,
  }
);

# Run the program until it is exited.

$poe_kernel-run();
exit 0;

sub ui_start {
my ( $kernel, $session, $heap ) = @_[ KERNEL, SESSION, HEAP ];

$heap-{main_window} = Gtk2::Window-new(toplevel);
$kernel-signal_ui_destroy( $heap-{main_window} );

my $table = Gtk2::Table-new(3, 1, FALSE);

my $label = Gtk2::Label-new(Chat Client Test);

$table-attach_defaults($label, 0, 1, 0, 1);

my $buffer = Gtk2::TextBuffer-new;
my $textview = Gtk2::TextView-new_with_buffer( $buffer);

$table-attach_defaults($textview, 0, 1, 1, 2);

my $button = Gtk2::Button-new(Connect);

$table-attach_defaults($button, 0, 1, 2, 3);

$heap-{main_window}-add($table);

$heap-{main_window}-show_all();
}

  


Buffering in PoCo::Child

2006-12-14 Thread Mike Schroeder
We have a POE app that reads multiple input files, reformats them and 
the posts them to various binaries wrapped with PoCo::Child that in turn 
load the data into our underlying system.  The problem we are running 
into is that PoCo::Child seems to be buffering two or three records at a 
time.  Sometimes we have interdependencies between records going into 
various loaders, so we need these to be unbuffered. 

In looking at PoCo::Child, I see how it uses POE::Wheel::Run, which in 
turn uses POE::Driver::SysRW and that Driver::SysRW has a flush() method.


Do I need to patch PoCo::Child's write() to flush() after each write()? 
Or is there some setting or a better way to get unbuffered writes to 
PoCo::Child?



Thanks in advance for any advice.


Re: Retrieving IP address remote IKC client

2005-07-04 Thread Mike Schroeder

[EMAIL PROTECTED] wrote:

Doing it that way makes encapsulation gods cry.  
 

My apologies to the encapsulation gods... Just wanted to make sure the 
data existed *somewhere* before asking how to get at it correctly...



{remote} is part of IKC::responder.  It's a hash of every remote kernel,
keyed on kernel ID, kernel name (as passed to IKC::Client) and kernel
aliases.  As such, it won't be useful for finding out what new kernel has
connected.

What do you want the IP for?  Would ARG0 (that is, the name you registered
to monitor) or ARG1 (name or alias of remote IKC) do?  For logging or
uniquely IDing stuff, they should be sufficient.  
 

What I'm really interested in is looking at the remote IP during 
registration and potentially rejecting the connection if it is coming 
from an unapproved address or block.  Is there a better way to do that?




Re: POE::Component::Client::SMTP?

2005-03-28 Thread Mike Schroeder
Are you planning on using PoCoCl::DNS for non-blocking DNS?  I'm 
interested in a PoCoCl::SMTP module, so let me know if you want 
help/collaboration/etc.

Pedro Melo Cunha wrote:
Hi,
before I hack this away, does anybody has one?
Thanks,



Re: anyone using any of the HTTP server components in a heavy use environment?

2005-03-28 Thread Mike Schroeder
Kaare Rasmussen wrote:
I used PoCo::Server::SimpleHTTP to create an application server that
uses YAML for serialization (we call it YOAP since it is replacing SOAP
which is just getting too slow to use).
   

Interesting, this Yoap. Can it be made secure with SSL or otherwise?
 

I *have* used it with SSL, but found it not as stable/fast as I wanted, 
so I added optional symmetric blowfish encryption in the client and server.


Re: anyone using any of the HTTP server components in a heavy use environment?

2005-03-28 Thread Mike Schroeder

Ton Hospel wrote:
Unfortunately the standard YAML parser is unsafe, it allows the external 
data to do things to your setup.
 

That is good to know -- do you have any links or references that I could 
read?


Re: POE::Loop::Wx

2004-12-22 Thread Mike Schroeder
Rocco Caputo wrote:
3) It's not quite there yet -- on exit, which calls 
Wx::wxTheApp-ExitMainLoop();
I get the following messages.  Being relatively new to this level of 
POE internals, any suggestions of how to plug these leaks?

!!! Leaked session ID: 3 = POE::Session=ARRAY(0x8066448)
   

[... and a lot of other leak messages ...]
This looks like ExitMainLoop() is being called while sessions are
still active.  All the data structures are being cross checked for
improper shutdown, and they're coming up with positive hits.
Standard operating procedure is to keep the event loop running until
after the last user session has stopped.
I'll need to install WxPerl to run the test program and find out more.
Traditionally I haven't had much luck with WxPerl, though.
 

Figured it out -- instead of the app calling ExitMainLoop, it needs to 
call POE::Kernel-stop(), which will nicely call the loop_halt() in 
POE::Loop::Wx after cleaning up -- and loop_halt() calls ExitMainLoop -- 
no more leaks.




POE::Loop::Wx

2004-12-21 Thread Mike Schroeder
Mattia Barbon (the maintainer for wxPerl) created a POE::Loop::Wx module 
a while back.  It worked until the POE 3.003 release, but a few simple 
tweaks (looking at POE::Loop::Gtk) was enough to get it working again.  
I have attached the module and a minimalpoe.pl wxPerl script.

I have a few questions for the list (thanks in advance for any help):
1) the http://poe.perl.org/?POE_Components_List page lists Michael 
Fowler as the author of an unposted version of POE::Loop::Wx.  I sent an 
email to him back on October but have not received any response.  What 
is the process for getting this new version on the site? 

2) Would it be possible to get this supported in the main POE distro 
(along with Tk and Gtk)?

3) It's not quite there yet -- on exit, which calls 
Wx::wxTheApp-ExitMainLoop();
I get the following messages.  Being relatively new to this level of 
POE internals, any suggestions of how to plug these leaks?

!!! Leaked session ID: 3 = POE::Session=ARRAY(0x8066448)
!!! Leaked session ID: mbs.dwvpn.net-41c8745a4ad4 = 
POE::Kernel=ARRAY(0x837f6e8)
!!! Leaked session ID: 2 = POE::Session=ARRAY(0x8129580)
!!! Leak sid cross-reference: POE::Session=ARRAY(0x8066448) = 3
!!! Leak sid cross-reference: POE::Session=ARRAY(0x8129580) = 2
!!! Leak sid cross-reference: POE::Kernel=ARRAY(0x837f6e8) = 
mbs.dwvpn.net-41c8745a4ad4
!!! Leaked alias: MyApp = POE::Session=ARRAY(0x8066448)
!!! Leaked alias cross-reference: POE::Session=ARRAY(0x8066448) (MyApp)
!!! Leaked event-to count: POE::Session=ARRAY(0x8066448) = 0
!!! Leaked event-to count: POE::Session=ARRAY(0x8129580) = 1
!!! Leaked event-to count: POE::Kernel=ARRAY(0x837f6e8) = 1
!!! Leaked event-from count: POE::Session=ARRAY(0x8066448) = 0
!!! Leaked event-from count: POE::Session=ARRAY(0x8129580) = 1
!!! Leaked event-from count: POE::Kernel=ARRAY(0x837f6e8) = 1
!!! Leaked session: POE::Session=ARRAY(0x8066448)
!!! refcnt = 1
!!! parent = POE::Kernel=ARRAY(0x837f6e8)
!!! childs =
!!! procs  =
!!! Leaked session: POE::Session=ARRAY(0x8129580)
!!! refcnt = 2
!!! parent = POE::Kernel=ARRAY(0x837f6e8)
!!! childs =
!!! procs  =
!!! Leaked session: POE::Kernel=ARRAY(0x837f6e8)
!!! refcnt = 4
!!! parent =
!!! childs = POE::Session=ARRAY(0x8066448); 
POE::Session=ARRAY(0x8129580)
!!! procs  =




WxLoop.tar.gz
Description: GNU Zip compressed data


Re: PoCo::Child

2004-12-18 Thread Mike Schroeder
Erick Calder wrote:
Mike, for examples of how to read/write, see the PoCo::Player components
e.g. Mp3, Enc, Slideshow.
 

Thanks Erick -- that's exactly what I did and got it working for the 
most part.

However, I'm not sure how to get rid of the thing!  When I am done
sending info to the STDIN, I send a $c-quit(), (and checking the
process list the process is indeed gone), but something seems to be
hanging on -- POE won't wrap up and clean up after itself -- it just
hangs.  I tried using PoCo::DebugShell, but PoCo::DebugShell and
PoCo::Child seem to fight over STDOUT:
   

this likely has to do with the fact that ::Child is not closing the pipe...
Philip Gwyn sent me a patch months ago but only now am I getting around to
applying it.  I should have something ready for release soon.  will post to
this list then.
 

Great to hear -- this is the only remaining issue for me with the great 
component.

Regards,
Mike.


PoCo::Child

2004-12-14 Thread Mike Schroeder
The PoCo::Child examples all use ls as the child program.  This is 
fine for showing how to work with a child that wants some command line 
arguments to generate STDOUT, but I need a solution that lets me write 
to STDIN and respond to STDOUT.  So I reworked the example to use nl 
to accept some $c-write() commands and add a line number -- with a 
little tweaking (had to use conduit = 'pty' instead of pipe), this 
works quite well. 

However, I'm not sure how to get rid of the thing!  When I am done 
sending info to the STDIN, I send a $c-quit(), (and checking the 
process list the process is indeed gone), but something seems to be 
hanging on -- POE won't wrap up and clean up after itself -- it just 
hangs.  I tried using PoCo::DebugShell, but PoCo::DebugShell and  
PoCo::Child seem to fight over STDOUT:

   Can't locate object method OPEN via package 
POE::Component::DebugShell::Output (perhaps you forgot to load 
POE::Component::DebugShell::Output?) at 
/usr/lib/perl5/site_perl/5.6.1/POE/Wheel/Run.pm line 379.

Any suggestions on where to go next?