Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
url-checker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
url-checker
Commits
b6e99072
Commit
b6e99072
authored
Dec 09, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve date stdout
parent
74e39c3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
urlchecker_bot.py
urlchecker_bot.py
+5
-5
No files found.
urlchecker_bot.py
View file @
b6e99072
...
@@ -105,7 +105,7 @@ class WebBot:
...
@@ -105,7 +105,7 @@ class WebBot:
# Report the bot status
# Report the bot status
print
(
"# STATUS"
)
print
(
"# STATUS"
)
status
=
reportStatus
(
self
.
_db
).
get
()
status
=
reportStatus
(
self
.
_db
).
get
()
print
(
" "
,
status
.
text
,
status
.
timestamp
)
print
(
" "
,
status
.
text
,
status
.
timestamp
.
isoformat
(
timespec
=
"minutes"
)
)
# Report the list of DNS server status
# Report the list of DNS server status
query
=
reportNetwork
(
query
=
reportNetwork
(
...
@@ -123,7 +123,7 @@ class WebBot:
...
@@ -123,7 +123,7 @@ class WebBot:
" "
,
" "
,
network_change
[
"ip"
],
network_change
[
"ip"
],
network_change
[
"state"
],
network_change
[
"state"
],
network_change
[
"timestamp"
],
network_change
[
"timestamp"
]
.
isoformat
(
timespec
=
"minutes"
)
,
)
)
if
not
resolver_ip_list
:
if
not
resolver_ip_list
:
...
@@ -144,7 +144,7 @@ class WebBot:
...
@@ -144,7 +144,7 @@ class WebBot:
" "
,
" "
,
dns_change
[
"domain"
],
dns_change
[
"domain"
],
dns_change
[
"resolver_ip"
],
dns_change
[
"resolver_ip"
],
dns_change
[
"timestamp"
],
dns_change
[
"timestamp"
]
.
isoformat
(
timespec
=
"minutes"
)
,
dns_change
[
"response"
],
dns_change
[
"response"
],
)
)
for
server_ip
in
dns_change
[
"response"
].
split
(
", "
):
for
server_ip
in
dns_change
[
"response"
].
split
(
", "
):
...
@@ -171,7 +171,7 @@ class WebBot:
...
@@ -171,7 +171,7 @@ class WebBot:
network_change
[
"ip"
],
network_change
[
"ip"
],
network_change
[
"state"
],
network_change
[
"state"
],
network_change
[
"port"
],
network_change
[
"port"
],
network_change
[
"timestamp"
],
network_change
[
"timestamp"
]
.
isoformat
(
timespec
=
"minutes"
)
,
", "
.
join
(
server_ip_dict
[
network_change
[
"ip"
]]),
", "
.
join
(
server_ip_dict
[
network_change
[
"ip"
]]),
)
)
if
network_change
[
"state"
]
==
"open"
:
if
network_change
[
"state"
]
==
"open"
:
...
@@ -204,7 +204,7 @@ class WebBot:
...
@@ -204,7 +204,7 @@ class WebBot:
network_change
[
"status_code"
],
network_change
[
"status_code"
],
network_change
[
"url"
],
network_change
[
"url"
],
network_change
[
"ip"
],
network_change
[
"ip"
],
network_change
[
"timestamp"
],
network_change
[
"timestamp"
]
.
isoformat
(
timespec
=
"minutes"
)
,
)
)
def
stop
(
self
):
def
stop
(
self
):
...
...
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