Skip to content

Commit

Permalink
Add a small pause between connections
Browse files Browse the repository at this point in the history
  • Loading branch information
spotbot2k committed Nov 1, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3095d8f commit 8c93370
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ python pimcore-scan -vH example.com
-I, --ip Detect the ip adress of the server
-l, --login Check if login route is visible
-p, --ping Ping every entry in the sitemap and print the status
-P, --pause Pause between connections
-r, --robots Search robots.txt
-R, --redirects Detect and display domain redirection
-s, --status Check for SSL redirect
1 change: 1 addition & 0 deletions pimcore-scan.py
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
parser.add_argument('-I', '--ip', help='Detect the ip adress of the server', default=False, action='store_true')
parser.add_argument('-l', '--login', help='Check if login route is visible', default=False, action='store_true')
parser.add_argument('-p', '--ping', help='Ping every entry in the sitemap and print the status', default=False, action='store_true')
parser.add_argument('-P', '--pause', help='Pause between connections', default=0.05, type=float)
parser.add_argument('-r', '--robots', help='Search robots.txt', default=False, action='store_true')
parser.add_argument('-R', '--redirects', help='Detect host redirection', default=False, action='store_true')
parser.add_argument('-s', '--status', help='Check for SSL redirect', default=False, action='store_true')
3 changes: 2 additions & 1 deletion scanner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import requests, json, os, base64, re
import requests, json, os, base64, re, time
import xml.etree.ElementTree as xml

class scanner:
@@ -135,6 +135,7 @@ def __init__(self, host, args):
print(self.get_csv_string())

def host_has_file(self, host, file):
time.sleep(self.args.pause)
try:
response = requests.get(host + file, allow_redirects=True, headers=self.headers, verify=False, timeout=self.args.timeout)
if response.status_code == 200 \

0 comments on commit 8c93370

Please sign in to comment.