use https://github.com/gliderlabs/ssh and make a basic app, here’s the requirements:…
- User
use https://github.com/gliderlabs/ssh and make a basic app, here’s the requirements: Login which checks against a list of usernames and passwords welcome message with the username three commands: ‘help’ - shows all commands including this one with descriptions ‘whoami’ - displays your username ‘clear’ - clears screen and displaays welcome message
I also want the prompt to include the users name in this format: [user@cartel]~$
remember, use https://github.com/gliderlabs/ssh. plese do not use the crypto library
- Assistant
Sure! Here's an example of a basic app that meets your requirements using the
github.com/gliderlabs/sshpackage:go - User
PS C:\Users\Se1zed\Desktop\folder\serumc2\src\cnc> go run main.go
command-line-arguments
.\main.go:20:5: s.ReadPassword undefined (type "github.com/gliderlabs/ssh".Session has no field or method ReadPassword) .\main.go:36:17: s.ReadLine undefined (type "github.com/gliderlabs/ssh".Session has no field or method ReadLine)
- Assistant
Apologies for the confusion. It seems that the and methods are not available directly on the type. To achieve the desired functionality, we need to use the package, which is an extension of the package. Here's an updated version of the code that works with the package:
- User
just make it a custom login prompt
- Assistant