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

Fix various typos. #28

Merged
merged 1 commit into from
Nov 5, 2018
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions ospd_openvas/openvas_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

""" Functios to retrieve and store data from redis-based OpenVAS Scanner database. """
""" Functions to retrieve and store data from redis-based OpenVAS Scanner database. """

# Needed to say that when we import ospd, we mean the package and not the
# module in that directory.
Expand Down Expand Up @@ -63,7 +63,7 @@
"NVT_VERSION_POS",]

def get_db_connection():
""" Retrive the db address from openvassd config.
""" Retrieve the db address from openvassd config.
"""
global DB_ADDRESS
try:
Expand Down
14 changes: 7 additions & 7 deletions ospd_openvas/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def load_vts(self):

@staticmethod
def get_custom_vt_as_xml_str(custom):
""" Return custom since it is already formated as string. """
""" Return custom since it is already formatted as string. """

nvt = Element('vt')
for key, val in custom.items():
Expand All @@ -293,7 +293,7 @@ def get_custom_vt_as_xml_str(custom):

@staticmethod
def get_params_vt_as_xml_str(vt_params):
""" Return custom since it is already formated as string. """
""" Return custom since it is already formatted as string. """
vt_params_xml = Element('vt_params')
for prefs in vt_params.items():
vt_param = Element('vt_param')
Expand All @@ -314,7 +314,7 @@ def get_params_vt_as_xml_str(vt_params):

@staticmethod
def get_refs_vt_as_xml_str(vt_refs):
""" Return custom since it is already formated as string. """
""" Return custom since it is already formatted as string. """
vt_refs_xml = Element('vt_prefs')
for ref_type, ref_values in vt_refs.items():
for value in ref_values:
Expand Down Expand Up @@ -421,9 +421,9 @@ def scan_is_finished(self, scan_id):
return status == 'finished'

def scan_is_stopped(self, scan_id):
""" Check if the parent process has recieved the stop_scan order.
""" Check if the parent process has received the stop_scan order.
@in scan_id: ID to identify the scan to be stopped.
@return 1 if yes, None in oder case.
@return 1 if yes, None in other case.
"""
ctx = openvas_db.kb_connect(dbnum=MAIN_KBINDEX)
openvas_db.set_global_redisctx(ctx)
Expand Down Expand Up @@ -477,7 +477,7 @@ def get_vts_in_groups(ctx, filters):
return vts_list

def get_vt_param_type(self, vtid, vt_param_id):
""" Return the type of the vt paramater from the vts dictionary. """
""" Return the type of the vt parameter from the vts dictionary. """
vt_params_list = self.vts[vtid].get("vt_params")
return vt_params_list[vt_param_id]["type"]

Expand Down Expand Up @@ -624,7 +624,7 @@ def exec_scan(self, scan_id, target):
MAIN_KBINDEX = openvas_db.DB_INDEX

# To avoid interference between scan process during a parallel scanning
# new uuid is used internaly for each scan.
# new uuid is used internally for each scan.
openvas_scan_id = str(uuid.uuid4())
openvas_db.item_add_single(('internal/%s' % openvas_scan_id), ['new', ])
openvas_db.item_add_single(('internal/%s/globalscanid' % scan_id), [openvas_scan_id, ])
Expand Down