Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Poduptime
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
diasporg
Poduptime
Commits
53d8c2fb
Commit
53d8c2fb
authored
Jan 22, 2017
by
David Morley
Committed by
GitHub
Jan 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #87 from noplanman/fix_ip_from_dns_regex
Fix the regex to get the A value of a DNS entry.
parents
5047f166
bcdfcd3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
db/pull.php
db/pull.php
+2
-2
No files found.
db/pull.php
View file @
53d8c2fb
...
...
@@ -146,8 +146,8 @@ while ($row = pg_fetch_assoc($result)) {
exec
(
escapeshellcmd
(
'delv @74.82.42.42 '
.
$domain
),
$iplookup
);
if
(
$iplookup
)
{
_debug
(
'Iplookup'
,
$iplookup
,
true
);
$dnssec
=
in_array
(
'; fully validated'
,
$iplookup
)
??
false
;
$getaonly
=
array_values
(
preg_grep
(
'/
A\s
.*/'
,
$iplookup
));
$dnssec
=
in_array
(
'; fully validated'
,
$iplookup
,
true
)
??
false
;
$getaonly
=
array_values
(
preg_grep
(
'/
\s+IN\s+A\s+
.*/'
,
$iplookup
));
preg_match
(
'/A\s(.*)/'
,
$getaonly
[
0
],
$version
);
$ip
=
trim
(
$version
[
1
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment