Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to open a named pipe with command line in windows?

I want to interact with the pipe manually , but so far I can only do this in the programe,which is not very intuitive.

The effect I want to achieve is a little similar to :

telnet localhost 3306

tail -f file.txt

Anyone get my idea?

like image 752
Alan Avatar asked Sep 08 '10 16:09

Alan


People also ask

How do you open a named pipe?

A name-pipe can be opened with either open() or fopen() by a single process.

Can you pipe in Windows command-line?

The | command is called a pipe. It is used to pipe, or transfer, the standard output from the command on its left into the standard input of the command on its right. # First, echo "Hello World" will send Hello World to the standard output.

How does pipe work in cmd?

Pipe is used to combine two or more commands, and in this, the output of one command acts as input to another command, and this command's output may act as input to the next command and so on. It can also be visualized as a temporary connection between two or more commands/ programs/ processes.

How do you make a named pipe in Windows?

To create an instance of a named pipe by using CreateNamedPipe, the user must have FILE_CREATE_PIPE_INSTANCE access to the named pipe object. If a new named pipe is being created, the access control list (ACL) from the security attributes parameter defines the discretionary access control for the named pipe.


1 Answers

From PowerShell

PS>$pipe = New-Object System.IO.Pipes.NamedPipeServerStream("DummyPipe", "InOut")

PS>Get-ChildItem -Path "\\.\pipe\" -Filter *DummyPipe*

More explanation: https://decoder.cloud/2019/03/06/windows-named-pipes-impersonation/

like image 64
mavijana Avatar answered Oct 06 '22 10:10

mavijana