Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for agent/docs with spaces in the name
  • Loading branch information
Ivan committed Dec 12, 2014
1 parent 934fca7 commit 2cf574d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/edn2/2013-002-Word-TLS/build
Expand Up @@ -376,11 +376,11 @@ def edn_build(target_directory, ip, basedir, scout_name, scout_input_path, docx
# create docx
cwd = os.getcwd()
os.chdir(cwd + "/tmp")
os.system("zip -r ../{} *".format(os.path.basename(docx) ))
os.system('zip -r "../{}" *'.format(os.path.basename(docx) ))
os.chdir(cwd)

# create an archive containing the docx
os.system('zip {} {}'.format(output_file, os.path.basename(docx)))
os.system('zip "{}" "{}"'.format(output_file, os.path.basename(docx)))
os.remove(os.path.basename(docx))
shutil.move(output_file + '.zip', output_file)

Expand Down Expand Up @@ -480,9 +480,9 @@ def main():

# extract scout metadata
if platform.system() == 'Windows':
ouch = subprocess.check_output('python ../agentdetect.py --latest {}'.format(args.agent), shell=True )
ouch = subprocess.check_output('python ../agentdetect.py --latest "{}"'.format(args.agent), shell=True )
else:
ouch = subprocess.check_output('agentdetect --latest {}'.format(args.agent), shell=True )
ouch = subprocess.check_output('agentdetect --latest "{}"'.format(args.agent), shell=True )

if ouch.strip() == 'None':
print '[E] scout provided is not up to date'
Expand Down
8 changes: 4 additions & 4 deletions src/edn2/2013-003-PowerPoint-TLS/build
Expand Up @@ -371,13 +371,13 @@ def edn_build(target_directory, ip, basedir, scout_name, scout_input_path, ppsx
# create ppsx
cwd = os.getcwd()
os.chdir(cwd + "/tmp")
os.system("zip -r ../{} *".format(os.path.basename(ppsx) ))
os.system('zip -r "../{}" *'.format(os.path.basename(ppsx) ))
os.chdir(cwd)


# create an archive containing the ppsx
print 'zip {} {}'.format(output_file, os.path.basename(ppsx))
os.system('zip {} {}'.format(output_file, os.path.basename(ppsx)))
os.system('zip "{}" "{}"'.format(output_file, os.path.basename(ppsx)))
os.remove(os.path.basename(ppsx))
shutil.move(output_file + '.zip', output_file)

Expand Down Expand Up @@ -479,9 +479,9 @@ def main():

# extract scout metadata
if platform.system() == 'Windows':
ouch = subprocess.check_output('python ../agentdetect.py --latest {}'.format(args.agent), shell=True )
ouch = subprocess.check_output('python ../agentdetect.py --latest "{}"'.format(args.agent), shell=True )
else:
ouch = subprocess.check_output('agentdetect --latest {}'.format(args.agent), shell=True )
ouch = subprocess.check_output('agentdetect --latest "{}"'.format(args.agent), shell=True )

if ouch.strip() == 'None':
print '[E] scout provided is not up to date'
Expand Down
4 changes: 2 additions & 2 deletions src/edn2/2013-005-IE-TLS/build
Expand Up @@ -528,9 +528,9 @@ def main():

# extract scout metadata
if platform.system() == 'Windows':
ouch = subprocess.check_output('python ../agentdetect.py --latest {}'.format(args.agent), shell=True )
ouch = subprocess.check_output('python ../agentdetect.py --latest "{}"'.format(args.agent), shell=True )
else:
ouch = subprocess.check_output('agentdetect --latest {}'.format(args.agent), shell=True )
ouch = subprocess.check_output('agentdetect --latest "{}"'.format(args.agent), shell=True )


if ouch.strip() == 'None':
Expand Down

0 comments on commit 2cf574d

Please sign in to comment.