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
dcdb21ef
Commit
dcdb21ef
authored
Dec 09, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
License
parent
649d546c
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
989 additions
and
3 deletions
+989
-3
CONTRIBUTE.md
CONTRIBUTE.md
+6
-3
COPYING
COPYING
+674
-0
setup.py
setup.py
+23
-0
test_urlchecker_bot.py
test_urlchecker_bot.py
+19
-0
test_urlchecker_db.py
test_urlchecker_db.py
+19
-0
test_urlchecker_dns.py
test_urlchecker_dns.py
+19
-0
test_urlchecker_http.py
test_urlchecker_http.py
+19
-0
test_urlchecker_network.py
test_urlchecker_network.py
+19
-0
test_urlchecker_status.py
test_urlchecker_status.py
+19
-0
urlchecker_bot.py
urlchecker_bot.py
+19
-0
urlchecker_cli.py
urlchecker_cli.py
+19
-0
urlchecker_configuration.py
urlchecker_configuration.py
+19
-0
urlchecker_db.py
urlchecker_db.py
+19
-0
urlchecker_dns.py
urlchecker_dns.py
+19
-0
urlchecker_http.py
urlchecker_http.py
+19
-0
urlchecker_network.py
urlchecker_network.py
+19
-0
urlchecker_platform.py
urlchecker_platform.py
+19
-0
urlchecker_status.py
urlchecker_status.py
+20
-0
No files found.
CONTRIBUTE.md
View file @
dcdb21ef
...
@@ -2,16 +2,19 @@
...
@@ -2,16 +2,19 @@
## Install development environnment
## Install development environnment
```
python3 -m venv venv
python3 -m venv venv
. venv/bin/activate
. venv/bin/activate
pip install
black pyflakes
pip install
--upgrade --editable ".[dev]"
pip install --upgrade --editable .
urlchecker -u URL
urlchecker bot URL
```
## Check the code
## Check the code
```
pyflakes *py
pyflakes *py
black -t py37 -l 79 *py
black -t py37 -l 79 *py
```
## SNI Support
## SNI Support
...
...
COPYING
0 → 100644
View file @
dcdb21ef
This diff is collapsed.
Click to expand it.
setup.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
from
setuptools
import
setup
from
setuptools
import
setup
setup
(
setup
(
name
=
"urlchecker"
,
name
=
"urlchecker"
,
version
=
"0.0.1"
,
version
=
"0.0.1"
,
license
=
"GPLv3+"
,
author
=
"Nexedi"
,
author_email
=
"romain@nexedi.com"
,
long_description
=
__doc__
,
long_description
=
__doc__
,
py_modules
=
[
py_modules
=
[
"urlchecker_bot"
,
"urlchecker_bot"
,
...
...
test_urlchecker_bot.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
unittest
import
unittest
from
urlchecker_bot
import
WebBot
from
urlchecker_bot
import
WebBot
import
mock
import
mock
...
...
test_urlchecker_db.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
unittest
import
unittest
from
urlchecker_db
import
LogDB
from
urlchecker_db
import
LogDB
...
...
test_urlchecker_dns.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
unittest
import
unittest
from
urlchecker_db
import
LogDB
from
urlchecker_db
import
LogDB
import
peewee
import
peewee
...
...
test_urlchecker_http.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
unittest
import
unittest
from
urlchecker_db
import
LogDB
from
urlchecker_db
import
LogDB
import
urlchecker_http
import
urlchecker_http
...
...
test_urlchecker_network.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
unittest
import
unittest
from
urlchecker_db
import
LogDB
from
urlchecker_db
import
LogDB
import
urlchecker_network
import
urlchecker_network
...
...
test_urlchecker_status.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
unittest
import
unittest
from
urlchecker_db
import
LogDB
from
urlchecker_db
import
LogDB
from
urlchecker_status
import
logStatus
from
urlchecker_status
import
logStatus
...
...
urlchecker_bot.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
time
import
time
from
urlchecker_db
import
LogDB
from
urlchecker_db
import
LogDB
from
urlchecker_configuration
import
createConfiguration
,
logConfiguration
from
urlchecker_configuration
import
createConfiguration
,
logConfiguration
...
...
urlchecker_cli.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
click
import
click
import
sys
import
sys
from
urlchecker_bot
import
create_bot
from
urlchecker_bot
import
create_bot
...
...
urlchecker_configuration.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
configparser
import
configparser
import
os
import
os
from
dns.resolver
import
get_default_resolver
from
dns.resolver
import
get_default_resolver
...
...
urlchecker_db.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
peewee
import
peewee
from
playhouse.migrate
import
migrate
,
SqliteMigrator
from
playhouse.migrate
import
migrate
,
SqliteMigrator
from
playhouse.sqlite_ext
import
SqliteExtDatabase
from
playhouse.sqlite_ext
import
SqliteExtDatabase
...
...
urlchecker_dns.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
dns
import
dns
from
urlchecker_network
import
logNetwork
from
urlchecker_network
import
logNetwork
from
peewee
import
fn
from
peewee
import
fn
...
...
urlchecker_http.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
requests
import
requests
from
urllib.parse
import
urlparse
,
urlunsplit
from
urllib.parse
import
urlparse
,
urlunsplit
from
forcediphttpsadapter.adapters
import
ForcedIPHTTPSAdapter
from
forcediphttpsadapter.adapters
import
ForcedIPHTTPSAdapter
...
...
urlchecker_network.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
socket
import
socket
import
errno
import
errno
from
peewee
import
fn
from
peewee
import
fn
...
...
urlchecker_platform.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
miniupnpc
import
miniupnpc
from
dns.resolver
import
get_default_resolver
from
dns.resolver
import
get_default_resolver
import
platform
import
platform
...
...
urlchecker_status.py
View file @
dcdb21ef
# Copyright (C) 2019 Nexedi SA and Contributors.
# Romain Courteaud <romain@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
def
reportStatus
(
db
):
def
reportStatus
(
db
):
return
db
.
Status
.
select
().
order_by
(
db
.
Status
.
id
.
desc
()).
limit
(
1
)
return
db
.
Status
.
select
().
order_by
(
db
.
Status
.
id
.
desc
()).
limit
(
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