Core tests sleep between each request

This commit is contained in:
Théophile Diot 2023-06-02 09:49:25 -04:00
parent 9829ef7525
commit 1eeefead95
No known key found for this signature in database
GPG Key ID: E752C80DB72BB014
3 changed files with 11 additions and 0 deletions

View File

@ -51,6 +51,8 @@ try:
print(" Navigating to http://www.example.com ...", flush=True)
driver.get("http://www.example.com")
sleep(2)
try:
driver.find_element(By.XPATH, "//img[@alt='NGINX Logo']")
except NoSuchElementException:
@ -85,6 +87,8 @@ try:
print("❌ The page is accessible without auth-basic ...", flush=True)
exit(1)
sleep(2)
print(
f" Trying to access http://{auth_basic_username}:{auth_basic_password}@www.example.com ...",
flush=True,

View File

@ -50,6 +50,7 @@ try:
"http://www.example.com/?id=/etc/passwd",
headers={"Host": "www.example.com"},
)
sleep(1)
sleep(1)

View File

@ -52,6 +52,8 @@ try:
print(f" Status code: {status_code}", flush=True)
sleep(2)
if status_code == 403:
if not use_greylist:
print(
@ -95,6 +97,8 @@ try:
)
exit(1)
sleep(2)
print("✅ Request was not rejected, User Agent is in the greylist ...")
print(
" Sending a request to http://www.example.com/?id=/etc/passwd with User-Agent BunkerBot ...",
@ -128,6 +132,8 @@ try:
)
exit(1)
sleep(2)
print("✅ Request was not rejected, URI is in the greylist ...")
print(
" Sending a request to http://www.example.com/admin/?id=/etc/passwd ...",