Skip to content

Commit

Permalink
enter password implicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
ESNI-WorkSpace committed Nov 29, 2022
1 parent cf82250 commit de7afc8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Binary file removed mclient/mclient
Binary file not shown.
16 changes: 15 additions & 1 deletion mclient/mclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@ import (
"log"
"net"
"os"
"fmt"
"golang.org/x/crypto/ssh/terminal"

"golang.org/x/crypto/ssh"
)

var (
serverAddress = "www.zhanmabigdata.top"
password = os.Args[2]
//password = os.Args[2]
user = os.Args[1]
msgPort = "9658"
cliport = "9656"
)

var password string

func handleMsg(conn net.Conn) {

buffer := make([]byte, 1)
Expand Down Expand Up @@ -110,6 +114,16 @@ func handleMsg(conn net.Conn) {

func main() {

fmt.Println("Enter password: ")
p, errs := terminal.ReadPassword(0)
password = string(p)

if errs != nil {
fmt.Println("\nCould not read password:")
log.Fatal(errs)
os.Exit(1)
}

log.Println("staring esni-shell-channel multi client now")

msgConn, err := net.Dial("tcp", serverAddress+":"+msgPort)
Expand Down

0 comments on commit de7afc8

Please sign in to comment.