This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Module support works * Added HttpOnly, Secure attribute checks * Added djangochecks module * Enabled dns override switch * Added support for target files * Added support
- Loading branch information
Yvan Boily
committed
Sep 14, 2011
1 parent
447cabe
commit 00a906c
Showing
6 changed files
with
127 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,9 @@ dist/ | |
*.egg-info/ | ||
*.pyc | ||
garmr-results.xml | ||
|
||
.project | ||
|
||
.pydevproject | ||
|
||
targets.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from urlparse import urlparse | ||
import requests | ||
from scanner import ActiveTest, PassiveTest, Scanner, get_url | ||
|
||
|
||
class AdminAvailable(ActiveTest): | ||
run_passives = True | ||
|
||
def do_test(self, url): | ||
u = urlparse(url) | ||
adminurl="%s://%s/admin" % (u.scheme, u.netloc) | ||
response = requests.get(adminurl) | ||
if response.status_code == 200: | ||
result = self.result("Pass", "Django admin page is present.", response.content) | ||
else: | ||
result = self.result("Fail", "Default Django admin page is not present ", None) | ||
return (result, response); | ||
|
||
|
||
def configure(scanner): | ||
if isinstance(scanner, Scanner) == False: | ||
raise Exception("Cannot configure a non-scanner object!") | ||
scanner.register_test(AdminAvailable()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters