Comments (9)
Line 179 contains this:
$Word.DisplayAlerts = $False
Outside of the version check loop when modifying an existing doc.
Perhaps the issue?
from nishang.
Fixing that, you then get another error...
Argument: '2' should be a System.Management.Automation.PSReference. Use [ref].
At C:\Out-Word.ps1:292 char:17
-
$Doc.Saveas([ref]$SavePath, 0)
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (:) [], MethodException
- FullyQualifiedErrorId : NonRefArgumentToRefParameterMsg
from nishang.
This seems to make it all play nice:
$SaveFormat = “microsoft.office.interop.word.WdSaveFormat” -as [type]
$Doc.Saveas([ref]$SavePath, [ref]$SaveFormat::wdFormatDocumentDefault)
from nishang.
Probably want [ref]0 or the Macro doesn't get embedded.
from nishang.
Thanks for the fix! Let me test this.
from nishang.
It works like charm on windows 7 with office 2013 - or maybe it's to do with AMSI ?
Regards,
from nishang.
Try it with a simple payload (like Get-Process), if the same error persists, its AMSI. Though I don't think it is AMSI. I will test it tomorrow and fix this issue.
from nishang.
Cool, trying now and keep you posted,
Regards
from nishang.
Closing this as no further information was provided.
from nishang.
Related Issues (20)
- Invoke-PowerShellTcpOneLine.ps1 prints newline between successive lines. HOT 4
- Error running Get-LsaSecret HOT 5
- Invoke-PowerShellTcpOneLine.ps1 errors HOT 1
- How to upgrade reverse shell netcat session to meterpreter? HOT 1
- Invoke-PowerShelltcpOneLine Windows10 errors HOT 4
- Copy-VSS fails when NTDS is not on C drive
- import module powerpreter HOT 1
- [Question] What's the meaning of `nishang`? HOT 1
- dpapi::chrome "/unprotect" error HOT 1
- Need Better Requirement Processing i.e. "modules specified by "#requires" are missing: ActiveDirectory. "
- What happend to Find-PSRemotingLocalAdminAccess.ps1? HOT 1
- salarydetails.doc file is not created as shown in the link http://www.labofapenetrationtester.com/2015/05/week-of-powershell-shel HOT 2
- The remote server returned an error: (404) Not Found.
- Why in mimikatz/kiwi cannot process first space when opening chrome database "Login Data" ?
- Invoke-PoshRatHttps 服务器提交了协议冲突. Section=ResponseStatusLine HOT 3
- Invoke-Encode's result doesn't work in powershell
- Out-word payload Errors HOT 2
- Invoke-CredentialsPhish.ps1 doesn't work on pin passwords
- Pastebin exfiltration help
- DNS_TXT_Pwnage bug when exfil and no authns especified HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nishang.