App-tcpproxy

 view release on metacpan or  search on metacpan

bin/tcpproxy.pl  view on Meta::CPAN

  };
}

unless(@ARGV == 3) {
    print <<"END_USAGE";
usage: $0 [<ip:>localport] [remotehost] [remoteport]

END_USAGE
  exit 0
}

my ( $port, $remote_host, $remote_port ) = @ARGV;

my $cond = AnyEvent->condvar;

my $proxy = create_proxy($port, $remote_host, $remote_port);

$cond->recv;

__END__

=pod

=head1 NAME

tcpproxy.pl - Simple TCP proxy for debugging connections

=head1 VERSION

version 0.005

=head1 SYNOPSIS

  $ tcpproxy.pl 2300 localhost 23
  starting proxy on 127.0.0.1:2300
  received connection from 127.0.0.1:37978
   IN [<ff><fd>[CAN]<ff><fd> <ff><fd>#<ff><fd>']
  OUT [<ff><fb>[CAN]<ff><fb> <ff><fb>#<ff><fb>']
   IN [<ff><fa> [NUL]<ff><f0><ff><fa>#[NUL]<ff><f0><ff><fa>'[NUL]<ff><f0><ff><fa>[CAN][NUL]<ff><f0>]
  OUT [<ff><fa> <00>38400,38400<ff><f0><ff><fa>#<00>localhost:16.0<ff><f0><ff><fa>'<00><00>DISPLAY[NUL]localhost:16.0<ff><f0><ff><fa>[CAN]<00>xterm<ff><f0>]
   IN [<ff><fb>[STX]<ff><fd>[NUL]<ff><fd>[US]<ff><fb>[ENQ]<ff><fd>!]
  OUT [<ff><fd>[STX]<ff><fc>[NUL]<ff><fb>[US]<ff><fa>[US]<00>c<00>v<ff><f0><ff><fd>[ENQ]<ff><fb>!]
   IN [<ff><fb>[NUL]]
  OUT [<ff><fd>[NUL]]
   IN [Debian GNU/Linux 7[CR][LF]]
   IN [bigbird login: ]
  OUT [a]
   IN [a]
  OUT [t]
   IN [t]
  OUT [c]
   IN [c]
  OUT [[CR]<00>]
   IN [[CR][LF]]
   IN [Password: ]
  OUT [a]
  OUT [t]
  OUT [c]
  OUT [[CR]<00>]
   IN [[CR][LF]]
   IN [Last login: Fri Dec  5 01:58:51 CET 2014 from localhost on pts/7[CR][LF]Linux bigbird 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u1 x86_64[CR][LF][CR][LF]The programs included with the Debian GNU/Linux system are free software;[CR][LF]the exact ...
   IN [[ESC]]0;atc@bigbird: ~[BEL]atc@bigbird:~$ ]
  OUT [[ETX]]
   IN [logout[CR][LF]]

=head1 DESCRIPTION

A simple tcpproxy for analyzing traffic between a tcp client and a tcp server.
Cyan colored data is hex value of the char at this position, while red colored
data are the special control sequences at the beginning of the ASCII table.

=head1 SUPPORT

IRC

  Join #vonbienenstock on irc.freenode.net. Highlight Getty for fast reaction :).

Repository

  http://github.com/Getty/p5-app-tcpproxy
  Pull request and additional contributors are welcome

Issue Tracker

  http://github.com/Getty/p5-app-tcpproxy/issues

=head1 AUTHOR

Torsten Raudssus <torsten@raudss.us>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut



( run in 2.143 seconds using v1.01-cache-2.11-cpan-2398b32b56e )