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
f4b012fc
Commit
f4b012fc
authored
Dec 10, 2021
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use crawling date
parent
4c93910e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
16 deletions
+23
-16
src/surykatka/bot.py
src/surykatka/bot.py
+23
-16
No files found.
src/surykatka/bot.py
View file @
f4b012fc
...
...
@@ -509,7 +509,7 @@ class WebBot:
checked_domain_dict
[
dns_change
[
"domain"
]]
=
{}
checked_domain_dict
[
dns_change
[
"domain"
]][
dns_change
[
"rdtype"
]
]
=
dns_change
[
"response"
]
]
=
dns_change
result_dict
[
"dns_query"
].
append
(
{
...
...
@@ -524,9 +524,9 @@ 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"
]
.
split
(
"
,
"
):
for
server_ip
in
checked_domain_dict
[
domain
][
"A"
]
[
"
response
"
].
split
(
", "
):
if
not
server_ip
:
# drop empty response
continue
...
...
@@ -543,9 +543,9 @@ class WebBot:
)
if
"MX"
in
checked_domain_dict
[
domain
]:
if
checked_domain_dict
[
domain
][
"MX"
]:
for
mx_domain
in
checked_domain_dict
[
domain
][
"
MX
"
if
checked_domain_dict
[
domain
][
"MX"
]
[
"response"
]
:
for
mx_domain
in
checked_domain_dict
[
domain
][
"MX"
][
"
response
"
].
split
(
", "
):
if
mx_domain
not
in
checked_domain_dict
:
result_dict
[
"missing_data"
].
append
(
...
...
@@ -568,13 +568,24 @@ class WebBot:
)
if
"TXT"
in
checked_domain_dict
[
domain
]:
if
'"v=spf'
not
in
checked_domain_dict
[
domain
][
"TXT"
]:
if
(
'"v=spf'
not
in
checked_domain_dict
[
domain
][
"TXT"
][
"response"
]
):
result_dict
[
"warning"
].
append
(
{
"text"
:
"(No spf configured: %s) "
%
str
(
checked_domain_dict
[
domain
][
"TXT"
])
%
str
(
checked_domain_dict
[
domain
][
"TXT"
][
"response"
]
)
+
domain
,
"date"
:
result_dict
[
"bot_status"
][
0
][
"date"
],
"date"
:
rfc822
(
checked_domain_dict
[
domain
][
"TXT"
][
"status"
]
),
}
)
else
:
...
...
@@ -730,9 +741,7 @@ class WebBot:
{
"text"
:
"(No Content-Type header) %s"
%
(
network_change
[
"url"
],),
"date"
:
result_dict
[
"bot_status"
][
0
][
"date"
],
"date"
:
rfc822
(
network_change
[
"status"
]),
}
)
elif
network_change
[
"http_header_dict"
][
...
...
@@ -751,9 +760,7 @@ class WebBot:
{
"text"
:
"(No Content-Security-Policy header) %s"
%
(
network_change
[
"url"
],),
"date"
:
result_dict
[
"bot_status"
][
0
][
"date"
],
"date"
:
rfc822
(
network_change
[
"status"
]),
}
)
...
...
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