<s> '''<STR_LIT>''' <EOL> from framework . dependency_management . dependency_resolver import BaseComponent <EOL> from framework . lib . general import * <EOL> import time <EOL> SCRIPT_DELAY = <NUM_LIT:2> <EOL> class SpearPhishing ( BaseComponent ) : <EOL> COMPONENT_NAME = "<STR_LIT>" <EOL> def __init__ ( self , set ) : <EOL> self . register_in_service_locator ( ) <EOL> self . config = self . get_component ( "<STR_LIT>" ) <EOL> self . error_handler = self . get_component ( "<STR_LIT>" ) <EOL> self . set = set <EOL> def Run ( self , Args , PluginInfo ) : <EOL> Output = '<STR_LIT>' <EOL> if self . Init ( Args ) : <EOL> self . set . Open ( { <EOL> '<STR_LIT>' : self . config . GetResources ( '<STR_LIT>' ) <EOL> , '<STR_LIT>' : None <EOL> , '<STR_LIT>' : Args [ '<STR_LIT>' ] <EOL> , '<STR_LIT>' : Args [ '<STR_LIT>' ] <EOL> , '<STR_LIT>' : Args [ '<STR_LIT>' ] <EOL> } , PluginInfo ) <EOL> if Args [ '<STR_LIT>' ] : <EOL> Args [ '<STR_LIT>' ] = Args [ '<STR_LIT>' ] + "<STR_LIT:/>" + Args [ <EOL> '<STR_LIT>' ] <EOL> for Script in self . GetSETScripts ( Args ) : <EOL> cprint ( "<STR_LIT>" + Script ) <EOL> Output += self . set . RunScript ( Script , Args , Debug = False ) <EOL> cprint ( "<STR_LIT>" + str ( SCRIPT_DELAY ) + "<STR_LIT>" ) <EOL> time . sleep ( int ( SCRIPT_DELAY ) ) <EOL> self . set . Close ( PluginInfo ) <EOL> return Output <EOL> def GetSETScripts ( self , Args ) : <EOL> return [ <EOL> Args [ '<STR_LIT>' ] + "<STR_LIT>" <EOL> , Args [ '<STR_LIT>' ] + "<STR_LIT>" + Args [ '<STR_LIT>' ] + "<STR_LIT>" <EOL> , Args [ '<STR_LIT>' ] + "<STR_LIT>" <EOL> ] <EOL> def InitPaths ( self , Args ) : <EOL> MandatoryPaths = self . config . GetAsList ( <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> if not PathsExist ( MandatoryPaths ) or not PathsExist ( self . GetSETScripts ( Args ) ) : <EOL> self . error_handler . FrameworkAbort ( "<STR_LIT>" , '<STR_LIT:user>' ) <EOL> return False <EOL> return True <EOL> def Init ( self , Args ) : <EOL> if not self . InitPaths ( Args ) : <EOL> return False <EOL> return True </s>
