Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
public-apis
Commits
8ac60e31
"...skin/git@ustchcs.com:gujinli1118/JSH_ERP.git" did not exist on "1fffd65cac5681ebd166d8c32ebbf95e70f7cba6"
Unverified
Commit
8ac60e31
authored
Jan 12, 2022
by
Matheus Felipe
Browse files
Remove whitespaces
parent
8136aa9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/validate/links.py
View file @
8ac60e31
...
@@ -91,14 +91,14 @@ def get_host_from_link(link: str) -> str:
...
@@ -91,14 +91,14 @@ def get_host_from_link(link: str) -> str:
def
has_cloudflare_protection
(
resp
:
Response
)
->
bool
:
def
has_cloudflare_protection
(
resp
:
Response
)
->
bool
:
"""Checks if there is any cloudflare protection in the response.
"""Checks if there is any cloudflare protection in the response.
Cloudflare implements multiple network protections on a given link,
Cloudflare implements multiple network protections on a given link,
this script tries to detect if any of them exist in the response from request.
this script tries to detect if any of them exist in the response from request.
Common protections have the following HTTP code as a response:
Common protections have the following HTTP code as a response:
- 403: When host header is missing or incorrect (and more)
- 403: When host header is missing or incorrect (and more)
- 503: When DDOS protection exists
- 503: When DDOS protection exists
See more about it at:
See more about it at:
- https://support.cloudflare.com/hc/en-us/articles/115003014512-4xx-Client-Error
- https://support.cloudflare.com/hc/en-us/articles/115003014512-4xx-Client-Error
- https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors
- https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors
...
...
Write
Preview
Supports
Markdown
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