Since command addTarget reads and modifies .zs_api.ini, it raises a security concerns with leftovers target details after use and maintenance of config and targets.
On every zs-client.phar execution, the first line should be something like:
Config file: none
or
Config file: /path/to/.zs_api.ini
This way there is no mistake whether something is recorded on the system with sensitive data.
Next, these extra commands can come in handy:
zs-client.phar config (path)
display .zs_api.ini calculated path (matching the logic in addTarget - Windows or Home) and "Exists!" if exists
zs-client.phar config print
display config file content, or error if not available or empty
zs-client.phar config delete
or: zs-client.phar cleanup [--force](removes the config and any temp files after prompt or -f / --force).
zs-client.phar listTargets
zs-client.phar removeTarget --target=XYZ
zs-client,phar removeAllTargets
This is not the same as deleting config, since in the future we might like to see more configuration besides the ZS targets (user prefs, behaviour prefs, logging, command history, macros etc.)
Now who will beat me to implementing the above?!?
:)
Thanks Slavey! Very happy about the Target method additions, makes ZS SDK very usable for multi-targets :)
I'm forfeiting the "config" concept with more than just targets, this might be relevant in the future.
Since command addTarget reads and modifies .zs_api.ini, it raises a security concerns with leftovers target details after use and maintenance of config and targets.
On every zs-client.phar execution, the first line should be something like: Config file: none or Config file: /path/to/.zs_api.ini
This way there is no mistake whether something is recorded on the system with sensitive data.
Next, these extra commands can come in handy:
Now who will beat me to implementing the above?!? :)