Peter,

Peter Marschall wrote:
Hi Hans,

On Tuesday, 24. January 2006 21:18, [EMAIL PROTECTED] wrote:
  
I noticed in the TODO that there was a request for a simple proxy which
can act as a man-in-the-middle.

Well, the attached script provides such a proxy, it is really a simple
proxy as it can currently handle only one client at the time, it will
dump requests and responses to STDOUT both in ASN1 and as perl structure.
    

I have committed the file (with a few slight changes) to the contrib section 
of perl-ldap's SVN.

Thanks
Peter
  
Thanks for cleaning up and committing. The SVN version has one bug which is fixed by the attached patch.

Cheers,

Hans
Index: simple-proxy.pl
===================================================================
--- simple-proxy.pl     (revision 493)
+++ simple-proxy.pl     (working copy)
@@ -12,7 +12,7 @@
 use Data::Dumper;
 use Convert::ASN1 qw(asn_read);
 use Net::LDAP::ASN qw(LDAPRequest LDAPResponse);
-our $VERSION = '0.1';
+our $VERSION = '0.2';
 use fields qw(socket target);
 
 
@@ -73,7 +73,7 @@
   my $listenersock = shift;
   my $targetsock = shift;
 
-  return unless ($listenersock i && $targetsock);
+  return unless ($listenersock && $targetsock);
   
   my $sel = IO::Select->new($listenersock);
   my %Handlers;

Reply via email to