Re:Why Does Windows Use Backslash as Path Separator?
by sbelskie on Wednesday April 24, 2024 @06:13PM
(#40150473)
What different things do you think it is trying to be?
[ Parent
| on HN ]
Re:Why Does Windows Use Backslash as Path Separator?
by therein on Wednesday April 24, 2024 @06:26PM
(#40150601)
I have nothing against PowerShell. I've used it for avoiding detection etc. in the past. Fun tool that surprises and delights in unexpected ways.
It is pretty powerful/insane that stuff like this is a part of PowerShell and that's probably what the GP is talking about:
Add-Type -TypeDefinition @"
using System;
namespace DemoCode
{
public class DemoClass
{
public static void WriteHello()
{
Console.WriteLine("Hello");
}
}
}
"@
[DemoCode.DemoClass]::WriteHello()
Or LoadLibrary call and invocation from PowerShell. [0] [1]It blurs the lines as to what it is no matter how you look at it.
In contrast, try doing that in cmd.exe or invoking a function from a shared object after getting a pointer to it using dlopen through a POSIX shell.
[0] - https://www.powershellgallery.com/packages/PSReflect-Functio...