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
0
Merge Requests
0
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
Vincent Pelletier
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
Show 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:
...
@@ -509,7 +509,7 @@ class WebBot:
checked_domain_dict
[
dns_change
[
"domain"
]]
=
{}
checked_domain_dict
[
dns_change
[
"domain"
]]
=
{}
checked_domain_dict
[
dns_change
[
"domain"
]][
checked_domain_dict
[
dns_change
[
"domain"
]][
dns_change
[
"rdtype"
]
dns_change
[
"rdtype"
]
]
=
dns_change
[
"response"
]
]
=
dns_change
result_dict
[
"dns_query"
].
append
(
result_dict
[
"dns_query"
].
append
(
{
{
...
@@ -524,9 +524,9 @@ class WebBot:
...
@@ -524,9 +524,9 @@ class WebBot:
for
domain
in
domain_list
:
for
domain
in
domain_list
:
if
domain
in
checked_domain_dict
:
if
domain
in
checked_domain_dict
:
if
"A"
in
checked_domain_dict
[
domain
]:
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
:
if
not
server_ip
:
# drop empty response
# drop empty response
continue
continue
...
@@ -543,9 +543,9 @@ class WebBot:
...
@@ -543,9 +543,9 @@ class WebBot:
)
)
if
"MX"
in
checked_domain_dict
[
domain
]:
if
"MX"
in
checked_domain_dict
[
domain
]:
if
checked_domain_dict
[
domain
][
"MX"
]:
if
checked_domain_dict
[
domain
][
"MX"
]
[
"response"
]
:
for
mx_domain
in
checked_domain_dict
[
domain
][
for
mx_domain
in
checked_domain_dict
[
domain
][
"MX"
][
"
MX
"
"
response
"
].
split
(
", "
):
].
split
(
", "
):
if
mx_domain
not
in
checked_domain_dict
:
if
mx_domain
not
in
checked_domain_dict
:
result_dict
[
"missing_data"
].
append
(
result_dict
[
"missing_data"
].
append
(
...
@@ -568,13 +568,24 @@ class WebBot:
...
@@ -568,13 +568,24 @@ class WebBot:
)
)
if
"TXT"
in
checked_domain_dict
[
domain
]:
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
(
result_dict
[
"warning"
].
append
(
{
{
"text"
:
"(No spf configured: %s) "
"text"
:
"(No spf configured: %s) "
%
str
(
checked_domain_dict
[
domain
][
"TXT"
])
%
str
(
checked_domain_dict
[
domain
][
"TXT"
][
"response"
]
)
+
domain
,
+
domain
,
"date"
:
result_dict
[
"bot_status"
][
0
][
"date"
],
"date"
:
rfc822
(
checked_domain_dict
[
domain
][
"TXT"
][
"status"
]
),
}
}
)
)
else
:
else
:
...
@@ -730,9 +741,7 @@ class WebBot:
...
@@ -730,9 +741,7 @@ class WebBot:
{
{
"text"
:
"(No Content-Type header) %s"
"text"
:
"(No Content-Type header) %s"
%
(
network_change
[
"url"
],),
%
(
network_change
[
"url"
],),
"date"
:
result_dict
[
"bot_status"
][
0
][
"date"
:
rfc822
(
network_change
[
"status"
]),
"date"
],
}
}
)
)
elif
network_change
[
"http_header_dict"
][
elif
network_change
[
"http_header_dict"
][
...
@@ -751,9 +760,7 @@ class WebBot:
...
@@ -751,9 +760,7 @@ class WebBot:
{
{
"text"
:
"(No Content-Security-Policy header) %s"
"text"
:
"(No Content-Security-Policy header) %s"
%
(
network_change
[
"url"
],),
%
(
network_change
[
"url"
],),
"date"
:
result_dict
[
"bot_status"
][
0
][
"date"
:
rfc822
(
network_change
[
"status"
]),
"date"
],
}
}
)
)
...
...
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