Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
poolmon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Patrick Cernko
poolmon
Commits
e12de6fe
Commit
e12de6fe
authored
1 year ago
by
Patrick Cernko
Browse files
Options
Downloads
Patches
Plain Diff
option to disable hostname verification
(most likely fails as we use IPs as hostnames)
parent
92f4f97d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
poolmon
+9
-1
9 additions, 1 deletion
poolmon
with
9 additions
and
1 deletion
poolmon
+
9
−
1
View file @
e12de6fe
...
...
@@ -34,6 +34,7 @@ $SIG{'PIPE'} = 'IGNORE';
my
@PORTS
;
my
@SSL_PORTS
;
my
$NO_HOSTNAME_VERIFY
=
0
;
my
$DEBUG
=
0
;
my
$NOFORK
=
0
;
my
$DRY_RUN
=
0
;
...
...
@@ -55,6 +56,7 @@ my %WEIGHTS;
Getopt::Long::
Configure
("
bundling
");
GetOptions
('
p|port=s
'
=>
\
@PORTS
,
'
s|ssl=s
'
=>
\
@SSL_PORTS
,
'
no-hostname-verify
'
=>
\
$NO_HOSTNAME_VERIFY
,
'
d|debug
'
=>
\
$DEBUG
,
'
t|timeout=i
'
=>
\
$TIMEOUT
,
'
l|logfile=s
'
=>
\
$LOGFILE
,
...
...
@@ -125,6 +127,8 @@ Arguments:
You can force a protocol (IMAP or POP3) by specifying
it before the port, separated by a colon. Example:
--port POP3:110 --ssl IMAP:993
--no-hostname-verify Instruct IO::Socket::SSL to skip verifying given
hostname in certificate (default: false)
-c --credfile=PATH File with credentials to authenticate as, mode 0600.
- Username on 1st line.
- Password on 2nd line.
...
...
@@ -249,7 +253,11 @@ sub scan_port {
$sock
=
IO::Socket::
SSL
->
new
(
PeerAddr
=>
$host
,
PeerPort
=>
$port
,
Timeout
=>
$TIMEOUT
,
SSL_verify_mode
=>
1
);
SSL_verifycn_scheme
=>
(
$NO_HOSTNAME_VERIFY
?
'
none
'
:
'
default
'),
SSL_verify_mode
=>
1
)
or
eval
{
$DEBUG
&&
write_log
("
failed to accept or ssl handshake to
$host
:
$port
: '$!', SSL_ERROR='
"
.
$
IO::Socket::SSL::
SSL_ERROR
.
"
' NO_HOSTNAME_VERIFY=
$NO_HOSTNAME_VERIFY
");
return
0
;
}
}
else
{
$sock
=
IO::Socket::
INET6
->
new
(
PeerAddr
=>
$host
,
PeerPort
=>
$port
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment