Skip to content

Commit

Permalink
Minor changes to Out-Excel
Browse files Browse the repository at this point in the history
  • Loading branch information
samratashok committed Nov 12, 2017
1 parent 606bbff commit cfe2a5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Client/Out-Excel.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function Out-Excel

<#
.SYNOPSIS
Nishang Script which can generate and "infect" existing excel files with an auto executable macro.
Nishang Script which can generate and "infect" existing excel files with an auto executable macro or DDE.
.DESCRIPTION
The script can create as well as "infect" existing excel files with an auto executable macro or DDE. Powershell or other payloads
Expand Down Expand Up @@ -405,6 +405,7 @@ https://github.com/samratashok/nishang
Write-Output "Deleting $($ExcelFile.FullName)"
Remove-Item -Path $ExcelFile.FullName
}
#Cleanup Excel COM
$Excel.Quit()
[System.GC]::Collect()
[System.GC]::WaitForPendingFinalizers()
Expand Down Expand Up @@ -463,6 +464,8 @@ https://github.com/samratashok/nishang

$WorkBook.SaveAs($OutputFile, 18)
Write-Output "Saved to file $OutputFile"

#Cleanup Excel COM
$Excel.Workbooks.Close()
$Excel.Quit()
[System.GC]::Collect()
Expand Down

0 comments on commit cfe2a5f

Please sign in to comment.