def start(encoded_sample):
sample = base64.b64decode(encoded_sample)
random_str = ''.join(random.choice(ascii_lowercase) for _ in range(10))
sample_fname = os.path.join(options['samples_folder'], random_str + '.exe')
sample_file = open(sample_fname, 'wb')
sample_file.write(sample)
sample_file.close()
print 'Launching sample'
cmd = options['cmd'].split(' ')
cmd.append(sample_fname)
os.chdir('C:\\pin')
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
sleep(options['timeout'])
print 'Sending log'
send_log()
print 'Execution completed'
评论列表
文章目录