Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
surykatka
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
surykatka
Commits
d43fcee8
Commit
d43fcee8
authored
Mar 01, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bot: warn about domain linking to a single IP
parent
f4b012fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
src/surykatka/bot.py
src/surykatka/bot.py
+18
-6
No files found.
src/surykatka/bot.py
View file @
d43fcee8
...
...
@@ -524,12 +524,24 @@ class WebBot:
for
domain
in
domain_list
:
if
domain
in
checked_domain_dict
:
if
"A"
in
checked_domain_dict
[
domain
]:
for
server_ip
in
checked_domain_dict
[
domain
][
"A"
][
# Drop empty response
domain_server_ip_list
=
[
x
for
x
in
checked_domain_dict
[
domain
][
"A"
][
"response"
].
split
(
", "
):
if
not
server_ip
:
# drop empty response
continue
].
split
(
", "
)
if
x
]
if
len
(
domain_server_ip_list
)
==
1
:
result_dict
[
"warning"
].
append
(
{
"text"
:
"(A) single IP for: %s"
%
(
domain
,),
"date"
:
result_dict
[
"bot_status"
][
0
][
"date"
],
}
)
for
server_ip
in
domain_server_ip_list
:
if
server_ip
not
in
server_ip_dict
:
server_ip_dict
[
server_ip
]
=
[]
if
domain
not
in
server_ip_dict
[
server_ip
]:
...
...
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