我正在尝试为我在我的一门网络安全课程的教科书中看到的一个示例创建概念证明。我设置了所需的文件并尝试了它,但我只收到错误。
这是一个例子:
C:\> type C:\windows\system32\notepad.exe > c:\windows\system32\calc.exe:notepad.exe
这就是我所做的:
C:\> type c:\hello.exe > c:\README.txt:hello.exe
wherehello.exe
是一个可以打印的可执行文件hello world
,并且README.txt
是一个包含一些随机文本的文本文件。
我得到的错误是:
out-file: The given path's format is not supported.
当第一个参数和重定向运算符之间有空格时,并且
Get-Content : A positional parameter cannot be found that accepts argument 'C:\README.txt:hello.exe'.
没有空间的时候。
我尝试用 替换type
,cat
在运算符之间添加和删除空格,在尝试导入数据之前创建备用流,以及不同的文件类型。另外,切题的问题,我在::$DATA
处理 NTFS 文件时遇到了麻烦。它只是给cat : Cannot find path 'C:\hello.exe::' because it does not exist.