RdpChecker icon indicating copy to clipboard operation
RdpChecker copied to clipboard

Port and domain configuration is ignored

Open mmiszczyk opened this issue 5 years ago • 3 comments

This is configuration syntax described in README:

[Ip Address]:[port]@[Machine name]\[Username];[Password]

example: 4.2.2.4:3389@noise\administrator;root

This is code which parses configuration lines in Main.cs:

                string i = line.Substring(0, line.IndexOf(":"));
                string u = line.Substring(line.IndexOf("\\") + 1);
                u = u.Substring(0, u.IndexOf(";"));
                string p = line.Substring(line.IndexOf(";") + 1);
                hosts.Add(new Tuple<string, string, string>(i, u, p));

Unlike the README description, this does not use the port and machine name (or domain in AD context). To confirm, simply make a program which does this:

            var line = @"ip:port@domain\login;pass";
            string i = line.Substring(0, line.IndexOf(":"));
            string u = line.Substring(line.IndexOf("\\") + 1);
            u = u.Substring(0, u.IndexOf(";"));
            string p = line.Substring(line.IndexOf(";") + 1);
            Console.WriteLine(i);
            Console.WriteLine(u);
            Console.WriteLine(p);

The output will be this:

ip
login
pass

This makes it impossible to use RDPChecker to verify credentials if RDP is using a non-standard port or if the user belongs to a domain, despite the configuration syntax and the README file claiming that it's possible.

mmiszczyk avatar May 28 '20 16:05 mmiszczyk

Yes, you're right, but i'v just did this in few hours.

Anyway you can parse and add the port's to the list (correct my mistake) And use this snippet to connect trough different port's (Main.cs line 30): rdp.AdvancedSettings2.RDPPort = rdpport;

Also, i'll gladly accepted your pull request.

n0ise9914 avatar Jun 03 '20 19:06 n0ise9914

what about Domain instead of the machine name , still did not work ?

protrading104 avatar Aug 04 '22 15:08 protrading104