|
@@ -2,18 +2,30 @@ package SimplyGit::Git;
|
|
use strict;
|
|
use strict;
|
|
use warnings;
|
|
use warnings;
|
|
use Log::Log4perl qw(:easy);
|
|
use Log::Log4perl qw(:easy);
|
|
-use lib ".";
|
|
|
|
-use SimplyGit::Shellex qw(shellex findBin knocker);
|
|
|
|
|
|
+use lib "/usr/local/lib/";
|
|
|
|
+use Shellex::Shellex qw(shellex findBin);
|
|
use Exporter qw(import);
|
|
use Exporter qw(import);
|
|
our @EXPORT_OK = qw(
|
|
our @EXPORT_OK = qw(
|
|
readConfig getStatus returnState addFiles
|
|
readConfig getStatus returnState addFiles
|
|
commitChanges pushChanges stashAndReset resetFromUpstream
|
|
commitChanges pushChanges stashAndReset resetFromUpstream
|
|
updateGitIgnore appendRepoUserConfig parseSGConfig
|
|
updateGitIgnore appendRepoUserConfig parseSGConfig
|
|
- warnOnUser basicClone basicPull
|
|
|
|
|
|
+ warnOnUser basicClone basicPull knocker
|
|
);
|
|
);
|
|
|
|
|
|
# TODO: Add info/debug logging for all subroutines
|
|
# TODO: Add info/debug logging for all subroutines
|
|
|
|
|
|
|
|
+sub knocker($$$) {
|
|
|
|
+
|
|
|
|
+ my $target = shift;
|
|
|
|
+ my $portRef = shift;
|
|
|
|
+ my $logger = shift;
|
|
|
|
+ my $nmapCmd = findBin("nmap",$logger);
|
|
|
|
+ foreach my $port (@$portRef) {
|
|
|
|
+ shellex("$nmapCmd -Pn --host_timeout 201 --max-retries 0 -p $port $target > /dev/null",$logger);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
sub checkPath($$) {
|
|
sub checkPath($$) {
|
|
|
|
|
|
my $path = shift;
|
|
my $path = shift;
|