Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 如何使用Windows Netcat发送回车?_Powershell_Carriage Return_Netcat - Fatal编程技术网

Powershell 如何使用Windows Netcat发送回车?

Powershell 如何使用Windows Netcat发送回车?,powershell,carriage-return,netcat,Powershell,Carriage Return,Netcat,我也希望直接在Powershell提示符中键入,而不是在文本文件中键入管道 富尔不适合我。例如: echo "RJ`r`n" | .\nc.exe -u 192.168.1.247 2639 但我真正想做的是 .\nc.exe -u 192.168.1.247 2639 然后开始在提示中键入内容。尝试: "Foo`ndoes work for me" 如果需要完整的CRLF序列,则: "Foo`r`ndoes work for me" 请注意,转义字符仅在双引号字符串中工作,而不是在

我也希望直接在Powershell提示符中键入,而不是在文本文件中键入管道

富尔不适合我。例如:

echo "RJ`r`n" | .\nc.exe -u  192.168.1.247 2639
但我真正想做的是

.\nc.exe -u  192.168.1.247 2639
然后开始在提示中键入内容。

尝试:

"Foo`ndoes work for me"
如果需要完整的CRLF序列,则:

"Foo`r`ndoes work for me"
请注意,转义字符仅在双引号字符串中工作,而不是在单引号字符串中工作

更新:在

using System;
public class App
{
  public static void Main()
  {
    int ch;
    while ((ch = Console.In.Read()) != -1)
    {
      Console.Write((char)ch);
    }
  }
}
PS> "foo`r`n" | .\echostdin.exe
foo

PS>