forked from SteelHouseLabs/vFense
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merging all the fixes that were made in the decouple branch as well as
the RethinkDB 1.12 compatability changes
- Loading branch information
Allen Sanabria
committed
Mar 27, 2014
1 parent
f9636dd
commit 0aa4f59
Showing
41 changed files
with
27,456 additions
and
11,594 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
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
Empty file.
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,44 @@ | ||
from datetime import datetime | ||
import tornado.httpserver | ||
import tornado.web | ||
|
||
import simplejson as json | ||
|
||
from vFense.server.handlers import BaseHandler | ||
import logging | ||
import logging.config | ||
|
||
from vFense.errorz.error_messages import GenericResults, PackageResults | ||
|
||
from vFense.plugins.cve.search.by_cve_id import RetrieveByCveId | ||
from vFense.plugins.cve import * | ||
|
||
from vFense.server.hierarchy.manager import get_current_customer_name | ||
from vFense.server.hierarchy.decorators import authenticated_request, permission_check | ||
from vFense.server.hierarchy.decorators import convert_json_to_arguments | ||
from vFense.server.hierarchy.permissions import Permission | ||
|
||
logging.config.fileConfig('/opt/TopPatch/conf/logging.config') | ||
logger = logging.getLogger('rvapi') | ||
|
||
|
||
class CveIdHandler(BaseHandler): | ||
@authenticated_request | ||
def get(self, cve_id): | ||
username = self.get_current_user().encode('utf-8') | ||
customer_name = get_current_customer_name(username) | ||
uri = self.request.uri | ||
method = self.request.method | ||
vuln = ( | ||
RetrieveByCveId( | ||
username, customer_name, cve_id, | ||
uri, method | ||
) | ||
) | ||
results = vuln.get_cve() | ||
|
||
self.set_status(results['http_status']) | ||
self.set_header('Content-Type', 'application/json') | ||
self.write(json.dumps(results, indent=4)) | ||
|
||
|
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,44 @@ | ||
from datetime import datetime | ||
import tornado.httpserver | ||
import tornado.web | ||
|
||
import simplejson as json | ||
|
||
from vFense.server.handlers import BaseHandler | ||
import logging | ||
import logging.config | ||
|
||
from vFense.errorz.error_messages import GenericResults, PackageResults | ||
|
||
from vFense.plugins.cve.search.by_vuln_id import RetrieveByVulnerabilityId | ||
from vFense.plugins.cve import * | ||
|
||
from vFense.server.hierarchy.manager import get_current_customer_name | ||
from vFense.server.hierarchy.decorators import authenticated_request, permission_check | ||
from vFense.server.hierarchy.decorators import convert_json_to_arguments | ||
from vFense.server.hierarchy.permissions import Permission | ||
|
||
logging.config.fileConfig('/opt/TopPatch/conf/logging.config') | ||
logger = logging.getLogger('rvapi') | ||
|
||
|
||
class VulnIdHandler(BaseHandler): | ||
@authenticated_request | ||
def get(self, vuln_id): | ||
username = self.get_current_user().encode('utf-8') | ||
customer_name = get_current_customer_name(username) | ||
uri = self.request.uri | ||
method = self.request.method | ||
vuln = ( | ||
RetrieveByVulnerabilityId( | ||
username, customer_name, vuln_id, | ||
uri, method | ||
) | ||
) | ||
results = vuln.get_vuln() | ||
|
||
self.set_status(results['http_status']) | ||
self.set_header('Content-Type', 'application/json') | ||
self.write(json.dumps(results, indent=4)) | ||
|
||
|
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
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
Oops, something went wrong.