owtf package

Subpackages

Submodules

owtf.cli module

owtf.constants module

owtf.constants

Ranking constants used across the framework.

owtf.core module

owtf.dependency_check module

owtf.dependency_check

This is the script which checks the owtf pip dependencies before loading the framework

owtf.dependency_check.is_present(module_name)[source]

Checks if module can be imported

Parameters:module_name (str) – Name of the module to import
Returns:True or False based on whether module can be imported
Return type:boolean
owtf.dependency_check.verify_dependencies(root_dir)[source]

Goes over the requirements file, parses it and checks if all requirements are satisfied

Parameters:root_dir (str) – Root directory for OWTF
Returns:
Return type:None

owtf.error_handler module

owtf.timer module

owtf.timer

The time module allows the rest of the framework to time how long it takes for certain actions to execute and present this information in both seconds and human-readable form.

class owtf.timer.Timer(datetime_format='%d/%m/%Y-%H:%M')[source]

Bases: owtf.dependency_management.dependency_resolver.BaseComponent, owtf.dependency_management.interfaces.TimerInterface

COMPONENT_NAME = 'timer'
end_timer(offset='0')[source]

Sets the end of the timer

Parameters:offset (str) – Timer index
Returns:
Return type:None
static get_current_date_time()[source]

Current timestamp

Returns:The current time as a timestamp
Return type:datetime
get_current_date_time_as_str()[source]

Returns a datetime object as a string in a particular format

Returns:Datetime object in string form
Return type:str
get_elapsed_time(offset='0')[source]

Gets the time elapsed between now and start of the timer in Unix epoch

Parameters:offset (str) – Timer index
Returns:Time difference
Return type:datetime
get_elapsed_time_as_str(offset='0')[source]

Returns the time elapsed a nice readable string

Parameters:offset (str) – Timer index
Returns:Time elapsed as a string
Return type:str
get_end_date_time(offset='0')[source]

Get the end time for the timer

Parameters:offset (str) – Timer index
Returns:End time for the timer as a timestamp
Return type:datetime
get_end_date_time_as_str(offset='0')[source]

Get the end time for the timer as a string

Parameters:offset (str) – Timer index
Returns:End time for the timer as a string
Return type:str
get_start_date_time(offset='0')[source]

Get the start time for the timer

Parameters:offset (str) – Timer index
Returns:Start time for the timer as a timestamp
Return type:datetime
get_start_date_time_as_str(offset='0')[source]

Get the start time for the timer as a string

Parameters:offset (str) – Timer index
Returns:Start time for the timer as a string
Return type:str
get_time_as_str(timedelta)[source]

Get the time difference as a human readable string

Parameters:timedelta (datetime.timedelta) – Time difference
Returns:Human readable form for the timedelta
Return type:str
get_time_human(seconds_str)[source]

Generates the human readable string for the timestamp

Parameters:seconds_str (str) – Unix style timestamp
Returns:Timestamp in a human readable string
Return type:str
start_timer(offset='0')[source]

Adds a start time to the timer

Parameters:offset (str) – Timer index
Returns:The start time for the timer
Return type:datetime
timers = {}

owtf.utils module

Module contents

owtf