Permalink
Browse files

Parameterization of the ssh port.

  • Loading branch information...
1 parent 4af46ee commit 1dfe10ed389d8bbcd00e453030cd4aa91787a5fc Davi Gomes committed Feb 13, 2012
@@ -50,7 +50,7 @@ public class ProbeHelper
var fakePassword = password ?? "123";
var fakeDomain = domain ?? "D";
var fakeHostname = hostname ?? "remotehost";
-
+
var fakeCredentials = new Credentials(fakeDomain, fakeUsername, fakePassword, null);
return new TargetInfoFactory(fakeHostname, fakeDomain, fakeUsername, fakePassword).Create();
@@ -112,20 +112,23 @@ public class TargetInfoFactory
private string Username;
private string Password;
private string AdminPassword;
+ private string PortNum;
- public TargetInfoFactory(String ipAddress, String domain, String username, String password, String administrativePassword = null)
+ public TargetInfoFactory(String ipAddress, String domain, String username, String password, String administrativePassword = null, String portNum = null)
{
this.IpAddress = ipAddress;
this.Domain = domain;
this.Username = username;
this.Password = password;
this.AdminPassword = administrativePassword;
+ this.PortNum = portNum;
}
public TargetInfo Create()
{
var newTargetInfo = new TargetInfo();
newTargetInfo.Add(TargetParameters.IPAddr.ToString(), this.IpAddress);
+ newTargetInfo.Add(TargetParameters.PortNum.ToString(), this.PortNum);
newTargetInfo.credentials = new Credentials(this.Domain, this.Username, this.Password, this.AdminPassword);
return newTargetInfo;
Oops, something went wrong.

0 comments on commit 1dfe10e

Please sign in to comment.