Skip to content

Commit 6a1d403

Browse files
committed
Added completer for protocol sequence.
1 parent af3c70d commit 6a1d403

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

NtObjectManager/RpcFunctions.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
$protseq_completer = {
16+
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
17+
@("ncalrpc", "ncacn_np", "ncacn_ip_tcp", "ncacn_http") | Where-Object { $_ -like "$wordToComplete*" }
18+
}
19+
1520
<#
1621
.SYNOPSIS
1722
Get a list of ALPC Ports that can be opened by a specified token.
@@ -177,6 +182,8 @@ function Get-RpcEndpoint {
177182
}
178183
}
179184

185+
Register-ArgumentCompleter -CommandName Get-RpcEndpoint -ParameterName ProtocolSequence -ScriptBlock $protseq_completer
186+
180187
<#
181188
.SYNOPSIS
182189
Get the RPC servers from a DLL.
@@ -643,6 +650,8 @@ function Connect-RpcClient {
643650
}
644651
}
645652

653+
Register-ArgumentCompleter -CommandName Connect-RpcClient -ParameterName ProtocolSequence -ScriptBlock $protseq_completer
654+
646655
<#
647656
.SYNOPSIS
648657
Disconnect an RPC client.
@@ -900,6 +909,8 @@ function Get-RpcStringBinding {
900909
[NtApiDotNet.Win32.Rpc.RpcUtils]::ComposeStringBinding($objuuid_str, $ProtocolSequence, $NetworkAddress, $Endpoint, $Options)
901910
}
902911

912+
Register-ArgumentCompleter -CommandName Get-RpcStringBinding -ParameterName ProtocolSequence -ScriptBlock $protseq_completer
913+
903914
<#
904915
.SYNOPSIS
905916
Creates a NDR parser for a process.

0 commit comments

Comments
 (0)