Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sliver-client doesn't use correctly the configuration file provided as parameter #158

Closed
hypnoticpattern opened this issue Mar 17, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@hypnoticpattern
Copy link
Contributor

hypnoticpattern commented Mar 17, 2020

Describe the bug
Sliver-client doesn't use correctly the configuration file provided as parameter. What happens is that sliver-client stores the configuration file in the sliver-client conf folder (e.g. in MacOS ~/.sliver-client/conf), then load the configuration file from the conf folder and uses the first configuration regardless the file path specified in the command line.

To Reproduce
Steps to reproduce the behavior:

  1. Run sliver-server
  2. create a new player with the command new-player -h 127.0.0.1 -o user1 -s [PATH]
  3. create a new player with the command new-player -h 127.0.0.1 -o user2 -s [PATH]
  4. Run multiplayer
  5. On a different terminal run sliver-client -c [configuration-file-user-1]
  6. Exit sliver-client
  7. On a different terminal run sliver-client -c [configuration-file-user-2]
  8. At this point regardless the configuration file specified the sliver-client will always connect as user2 even when sliver-client -c [configuration-file-user-1] is used.

Expected behavior
sliver-client should save the configuration, if not present already, and then pass the conf file name to the function selectConfig() in console-cfg.go and load the proper profile.

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS
  • Version v0.0.7 - latest from master
@hypnoticpattern hypnoticpattern changed the title sliver-client doesn't use the configuration file provided as parameter sliver-client doesn't use correctly the configuration file provided as parameter Mar 17, 2020
@moloch-- moloch-- added the bug Something isn't working label Mar 17, 2020
@moloch--
Copy link
Member

In the short term if you save both config files to ~/.sliver-client/configs/ it should let you select from a menu which profile you want to use.

@hypnoticpattern
Copy link
Contributor Author

What menu? I am not using the GUI and I already have both config files in that folder. when I run sliver-client with or without parameter it connects as user2 regardless.

@moloch--
Copy link
Member

Ah okay, it's the same bug it we only read in one account per domain (data type is map[domian] = conf

@moloch--
Copy link
Member

Should be fixed a5ac3ad

@moloch--
Copy link
Member

Also, to be clear the -config flag is more of an "import config," should probably update the help info to reflect this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants