MCPcopy Create free account
hub / github.com/Hel10-Web/Databasetools / MssqlConnect

Function MssqlConnect

pac/mssql_connect.go:15–32  ·  view source on GitHub ↗
(Rhost string, Rport string, Ruser string, pwd string)

Source from the content-addressed store, hash-verified

13)
14
15func MssqlConnect(Rhost string, Rport string, Ruser string, pwd string) (err error, db *sql.DB, sign bool) {
16 connString := fmt.Sprintf("server=%s;port%d;database=%s;user id=%s;password=%s", Rhost, Rport, database, Ruser, pwd)
17
18 conn, err := sql.Open("mssql", connString)
19 if err != nil {
20 Err(err)
21 return nil, nil, false
22 }
23
24 err = conn.Ping()
25 if err != nil {
26 Err(err)
27 return nil, nil, false
28 }
29 sign = true
30
31 return err, conn, sign
32}
33
34func MssqlCrack(Rhost string, Rport string) {
35 Info("开始爆破,请稍等.....")

Callers 2

HelpFunction · 0.85
MssqlCrackFunction · 0.85

Calls 1

ErrFunction · 0.85

Tested by

no test coverage detected