Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue with x-frame-options value not recognized #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions cmsmap/lib/genericchecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ def DirectoryListing(self, relPath):
report.verbose(msg)
requester.request(self.url + self.relPath, data=None)
dirList = re.search("<title>Index of", requester.htmltext, re.IGNORECASE)
if dirList:
if dirList:
msg = self.url + self.relPath
report.low(msg)

# Check if website is over HTTPS
def HTTPSCheck(self):
msg = "Checking if the website is in HTTPS ..."
Expand Down Expand Up @@ -86,7 +86,7 @@ def HeadersCheck(self):
msg = "X-XSS-Protection Disabled"
report.high(msg)
if not requester.response.info().get('x-frame-options') or (
requester.response.info().get('x-frame-options').lower() != 'sameorigin' or 'deny'):
requester.response.info().get('x-frame-options').lower() not in ['sameorigin', 'deny']):
msg = "X-Frame-Options: Not Enforced"
report.low(msg)
if not requester.response.info().get('strict-transport-security'):
Expand All @@ -98,7 +98,7 @@ def HeadersCheck(self):
if not requester.response.info().get('x-content-type-options'):
msg = "X-Content-Type-Options: Not Enforced"
report.info(msg)

# Check if AutoComplete is set to Off on login pages
def AutocompleteOff(self, relPath):
msg = "Checking Autocomplete Off on the login page ..."
Expand All @@ -109,7 +109,7 @@ def AutocompleteOff(self, relPath):
if not autoComp:
msg = "Autocomplete Off Not Found: " + self.url + self.relPath
report.info(msg)

# Check if robots.txt is available
def RobotsTXT(self):
msg = "Checking Robots.txt File ..."
Expand All @@ -121,7 +121,7 @@ def RobotsTXT(self):
else:
msg = "No Robots.txt Found"
report.low(msg)


# Extract error codes and page length from a not existing web page
def NotExistingURL(self):
Expand Down Expand Up @@ -151,7 +151,7 @@ def CommonFiles(self):
# Add all plugins to the queue
for commFilesIndex, file in enumerate(self.commFiles):
q.put(file + ext)
sys.stdout.write("\r" + str((100 * ((len(self.commFiles) * extIndex) + commFilesIndex) /
sys.stdout.write("\r" + str((100 * ((len(self.commFiles) * extIndex) + commFilesIndex) /
(len(self.commFiles) * len(self.commExt)))) + "% " + file + ext + " ")
sys.stdout.flush()
q.join()
Expand Down