Skip to content

Commit

Permalink
v2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
skahwah authored Jun 29, 2022
1 parent 0315ee2 commit daa55a2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions SQLRecon/SQLRecon/authentication/ArgumentLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class ArgumentLogic
private static SqlConnection con = null;
private static String authType = "";
private static String sqlServer = "";
private static String port = "1433";
private static String database = "";
private static String domain = "";
private static String user = "";
Expand All @@ -36,6 +37,14 @@ public void AuthenticationType(Dictionary<string, string> argDict)
authType = argDict["a"].ToLower();
sqlServer = argDict["s"].ToLower();
database = argDict["d"].ToLower();

// optional argument for port, defaults to 1433
if (argDict.ContainsKey("r"))
{
port = argDict["r"];
}

sqlServer = sqlServer + "," + port;
WindowsAuth WindowsAuth = new WindowsAuth();
con = WindowsAuth.Send(sqlServer, database);
EvaluateTheArguments(argDict);
Expand All @@ -59,6 +68,14 @@ public void AuthenticationType(Dictionary<string, string> argDict)
database = argDict["d"].ToLower();
user = argDict["u"];
pass = argDict["p"];

// optional argument for port, defaults to 1433
if (argDict.ContainsKey("r"))
{
port = argDict["r"];
}

sqlServer = sqlServer + "," + port;
LocalAuth LocalAuth = new LocalAuth();
con = LocalAuth.Send(sqlServer, database, user, pass);
EvaluateTheArguments(argDict);
Expand Down

0 comments on commit daa55a2

Please sign in to comment.