Browse Source

add git links and update README/changes for release

tags/0.0.0
Zane C. B-H 4 months ago
parent
commit
477905f567
3 changed files with 71 additions and 15 deletions
  1. +2
    -3
      Net-Connection-Match/Changes
  2. +64
    -11
      Net-Connection-Match/README
  3. +5
    -1
      Net-Connection-Match/lib/Net/Connection/Match.pm

+ 2
- 3
Net-Connection-Match/Changes View File

@@ -1,5 +1,4 @@
Revision history for Net-Connection-Match

0.01 Date/time
First version, released on an unsuspecting world.

0.0.0 2019-07-17/05:15
- Initial release.

+ 64
- 11
Net-Connection-Match/README View File

@@ -1,16 +1,66 @@
Net-Connection-Match

The README is used to introduce the module and provide instructions on
how to install the module, any machine dependencies it may have (for
example C compilers and installed libraries) and any other information
that should be provided before the module is installed.

A README file is required for CPAN modules since CPAN extracts the README
file from a module distribution so that people browsing the archive
can use it to get an idea of the module's uses. It is usually a good idea
to provide version information here so that people can decide whether
fixes for the module are worth downloading.

Provides a easy to use method for checking if a Net::Connection
object mathes a series of checks.

Currently can do matching based off of the following.

* CIDR
* Ports
* Protocol
* State
* PTR

use Net::Connection::Match;
use Net::Connection;
my $connection_args={
foreign_host=>'10.0.0.1',
foreign_port=>'22',
local_host=>'10.0.0.2',
local_port=>'12322',
proto=>'tcp4',
state=>'LISTEN',
};
my $conn=Net::Connection->new( $connection_args );
my %args=(
checks=>[
{
type=>'Ports',
invert=>0,
args=>{
ports=>[
'22',
],
lports=>[
'53',
],
fports=>[
'12345',
],
}
},
{
type=>'Protos',
invert=>0,
args=>{
protos=>[
'tcp4',
],
}
}
]
);
my $checker;
eval{
$checker=Net::Connection::Match->new( \%args );
} or die "New failed with...".$@;
if ( $check->match( $conn ) ){
print "It matched!\n";
}

INSTALLATION

@@ -42,6 +92,9 @@ You can also look for information at:
Search CPAN
https://metacpan.org/release/Net-Connection-Match

Git Repo
https://gitea.eesdp.org/vvelox/Net-Connection-Match


LICENSE AND COPYRIGHT


+ 5
- 1
Net-Connection-Match/lib/Net/Connection/Match.pm View File

@@ -65,7 +65,7 @@ our $VERSION = '0.0.0';
my $checker;
eval{
$checker=Net::Connection::Match->new( \%args );
};
} or die "New failed with...".$@;
if ( $check->match( $conn ) ){
print "It matched!\n";
@@ -335,6 +335,10 @@ L<https://cpanratings.perl.org/d/Net-Connection-Match>

L<https://metacpan.org/release/Net-Connection-Match>

=item * Git Repo

L<https://gitea.eesdp.org/vvelox/Net-Connection-Match>

=back



Loading…
Cancel
Save