-
Notifications
You must be signed in to change notification settings - Fork 4
/
RPCBind.cs
29 lines (28 loc) · 959 Bytes
/
RPCBind.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Collections.Generic;
using System.Drawing;
namespace Reecon
{
class RPCBind
{
public static (string, string) GetInfo(string target, int port)
{
// rpcinfo has no Port parameter - Weird...
string toReturn = "";
if (!General.IsInstalledOnLinux("rpcinfo"))
{
toReturn = "- " + "Error: Cannot find rpcinfo - Unable to enumerate - install rpcbind".Recolor(Color.Red);
}
else
{
List<string> processOutput = General.GetProcessOutput("rpcinfo", "-p " + target);
foreach (string item in processOutput)
{
toReturn += "- " + item + Environment.NewLine;
}
}
toReturn = toReturn.Trim(Environment.NewLine.ToCharArray());
return ("RPCBind", toReturn);
}
}
}