""" Start a machine, create it if it does not exist """
raiseNotImplementedError
defhalt(self):
""" Halt a machine """
raiseNotImplementedError
defdestroy(self):
""" Destroy a machine """
raiseNotImplementedError
defconnect(self):
""" Connect to a machine """
raiseNotImplementedError
defremote_run(self,cmd,disown=False):
""" Connects to the machine and runs a command there
@paramcmd:commandtoruninthemachine's shell
@paramdisown:Sendtheconnectionintobackground
"""
raiseNotImplementedError
defdisconnect(self):
""" Disconnect from a machine """
raiseNotImplementedError
defput(self,src,dst):
""" Send a file to a machine
@paramsrc:sourcedir
@paramdst:destination
"""
raiseNotImplementedError
defget(self,src,dst):
""" Get a file to a machine
@paramsrc:sourcedir
@paramdst:destination
"""
raiseNotImplementedError
defis_running(self):
""" Returns if the machine is running """
returnself.get_state()==MachineStates.RUNNING
defget_state(self):
""" Get detailed state of a machine """
raiseNotImplementedError
defget_ip(self):
""" Return the IP of the machine. If there are several it should be the one accepting ssh or similar. If a resolver is running, a domain is also ok. """
raiseNotImplementedError
defget_playground(self):
""" path where all the attack tools will be copied to on a client. Your specific machine plugin can overwrite it. """
returnself.config.get_playground()
defget_vm_name(self):
""" Get the name of the machine """
returnself.config.vmname()
###############
# This is the interface from the main code to the plugin system. Do not touch