You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
507 B
Go

package sshd
import (
"fmt"
"testing"
)
func TestSSH(t *testing.T) {
myssh := new(StarSSH)
err := myssh.Connect("root", "sakua", "9sday.me", "C:\\id_rsa", 22)
if err != nil {
t.Fatalf("%e", err)
}
shell, err := myssh.NewShell()
if err != nil {
fmt.Println(err)
t.Fatalf("%e", err)
}
shell.isprint = false
fmt.Println(myssh.Exists("/root"))
fmt.Println(myssh.IsFile("/root"))
fmt.Println(myssh.IsFolder("/root"))
a, b, err := shell.ShellClear("whoami", 2000)
fmt.Println(a, b, err)
}