Skip to content

Repository files navigation

Telnet

GitHub BuildCoverageGo Report CardGoDoc

7 Days to Die remote access to game Command Console. This is not full TELNET protocol implementation.

Supported Games

Open pull request if you have successfully used a package with another game with telnet support and add it to the list.

Install

go get github.com/gorcon/telnet

See Changelog for release details.

Usage

Execute single command

package main
import (
"log""fmt""github.com/gorcon/telnet"
)
funcmain() {
conn, err:=telnet.Dial("127.0.0.1:8081", "password")
iferr!=nil {
log.Fatal(err)
}
deferconn.Close()
response, err:=conn.Execute("help")
iferr!=nil {
log.Fatal(err)
}
fmt.Println(response) }

Interactive CLI mode

package main
import (
"log""os""github.com/gorcon/telnet"
)
funcmain() {
err:=telnet.DialInteractive(os.Stdin, os.Stdout, "127.0.0.1:8081", "")
iferr!=nil {
log.Println(err)
}
}

Requirements

Go 1.15 or higher

Contribute

Contributions are more than welcome!

If you think that you have found a bug, create an issue and publish the minimum amount of code triggering the bug so it can be reproduced.

If you want to fix the bug then you can create a pull request. If possible, write a test that will cover this bug.

License

MIT License, see LICENSE

About

TELNET Implementation for 7 Days to Die in Go.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages