Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
contact-scan
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
Ivaylo Ivanov
contact-scan
Commits
c6800ae5
Commit
c6800ae5
authored
Dec 19, 2018
by
Ivaylo Ivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add skipping HTTPS check
parent
d279e453
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
lib/scanner.py
lib/scanner.py
+6
-1
No files found.
lib/scanner.py
View file @
c6800ae5
from
requests
import
get
from
requests.exceptions
import
RequestException
from
requests.packages
import
urllib3
from
urllib3.exceptions
import
InsecureRequestWarning
from
contextlib
import
closing
from
selenium
import
webdriver
from
selenium.webdriver.chrome.options
import
Options
...
...
@@ -37,10 +39,13 @@ class Scanner:
chrome_options
.
add_argument
(
"--window-size=1920x1080"
)
driver
=
webdriver
.
Chrome
(
chrome_options
=
chrome_options
)
# Disable HTTPS request warnings
urllib3
.
disable_warnings
(
category
=
InsecureRequestWarning
)
# Loop through all pages
for
url
in
self
.
urls
:
try
:
with
closing
(
get
(
url
,
stream
=
True
))
as
resp
:
with
closing
(
get
(
url
,
stream
=
True
,
verify
=
False
))
as
resp
:
if
self
.
response_is_correct
(
resp
):
print
(
"################################"
)
print
(
"INFO: Scraping {0}"
.
format
(
url
))
...
...
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