NetSPI / PowerUpSQL

PowerUpSQL: A PowerShell Toolkit for Attacking SQL Server
Other
2.47k stars 462 forks source link

Hardcoded Timeout of 1 in Get-SQLConnectionObject #67

Closed mgeeky closed 3 years ago

mgeeky commented 3 years ago

Hi!

There is a hardcoded timeout of 1 in Get-SQLConnectionObject specified in line 184:

        # Set authentcation type - current windows user
        if(-not $Username){

            # Set authentication type
            $AuthenticationType = "Current Windows Credentials"

            # Set connection string
            $Connection.ConnectionString = "Server=$DacConn$Instance;Database=$Database;Integrated Security=SSPI;Connection Timeout=1$AppNameString$EncryptString$TrustCertString$WorkstationString"
        }

Clearly connection string should state the following:

            $Connection.ConnectionString = "Server=$DacConn$Instance;Database=$Database;Integrated Security=SSPI;Connection Timeout=$TimeOut$AppNameString$EncryptString$TrustCertString$WorkstationString"

Kind regards, M.

mgeeky commented 3 years ago

That is now resolved in #68