mdns
xorrior 2017-08-14 18:11:01 -07:00
parent 629fd7c4e6
commit 6a13c5cbab
2 changed files with 4 additions and 1 deletions

View File

@ -1027,7 +1027,7 @@ function Get-FilePart {
$script:ResultIDs[$jobID]=$ResultID
}
catch {
Encode-Packet -type 0 -data '[!] File does not exist or cannot be accessed' -ResultID `$ResultID
Encode-Packet -type 0 -data '[!] File does not exist or cannot be accessed' -ResultID $ResultID
}
}
# file upload
@ -1299,9 +1299,11 @@ function Get-FilePart {
if(Get-DownloadJobCompleted -JobName $JobName) {
# the job has stopped, so receive results/cleanup
$Results = Stop-DownloadJob -JobName $JobName
"Final data: $($Results.Length)"
}
else {
$Results = Receive-DownloadJob -JobName $JobName
"Received Data: $($Results.Length)"
}
if($Results) {

View File

@ -312,6 +312,7 @@ class Agents:
# make the recursive directory structure if it doesn't already exist
if not os.path.exists(save_path):
os.makedirs(save_path)
print "Saving file download to: " + save_path
# save the file out
f = open(save_path + "/" + filename, 'w')