Here are the examples of the python api lib.sqlalchemy.get_open_ports_for_web_service taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
3
View Complete Implementation : web.py
Copyright GNU General Public License v3.0
Author : lavalamp-
Copyright GNU General Public License v3.0
Author : lavalamp-
@property
def open_ports_on_host(self):
"""
Get a list of tuples containing (1) the port number and (2) the protocol for all of the open ports found
on the server where this web service resides.
:return: A list of tuples containing (1) the port number and (2) the protocol for all of the open ports found
on the server where this web service resides.
"""
if self._open_ports_on_host is None:
self._open_ports_on_host = get_open_ports_for_web_service(
db_session=self.db_session,
web_service_uuid=self.web_service_uuid,
)
return self._open_ports_on_host
3
View Complete Implementation : test_web.py
Copyright GNU General Public License v3.0
Author : lavalamp-
Copyright GNU General Public License v3.0
Author : lavalamp-
def test_open_ports_on_host(self):
"""
Tests that the value of the open_ports_on_host property is correct.
:return: None
"""
open_ports = get_open_ports_for_web_service(
db_session=self.db_session,
web_service_uuid=self.web_service_scan.web_service.uuid,
)
self.astertTupleListsEqual(open_ports, self.inspector.open_ports_on_host)