Open sborrill opened 5 months ago
Wrong way around:
python3 pykms_Client.py 192.168.10.1 -m Windows10
First the positional arguments, then the optional ones.
This contradicts the documentation (and also every other *nix utility). Note that --help shows the options should come before the positional arguments as is conventional:
% python3.11 pykms_Client.py --help
py-kms: KMS Client Emulator written in Python
---------------------------------------------
usage: pykms_Client.py [-m {WindowsVista,Windows7,Windows8,Windows8.1,Windows10,Office2010,Office2013,Office2016,Office2019}] [-c CMID] [-n MACHINE] [-t0 TIMEOUTIDLE] [-t1 TIMEOUTSNDRCV] [-y]
[-V {CRITICAL,ERROR,WARNING,INFO,DEBUG,MININFO}] [-F LOGFILE [LOGFILE ...]] [-S LOGSIZE] [-D DISCOVERY] [-h]
[ip] [port]
Hmm, this is indeed strange! The help being wrong is really strange, as that part should come 1:1 from argparse
, although the original author did quite some magic with combining multiple sub-parsers. Idk, I think I'll reopen this to either fix the documentation or the command argument order (I think the first will be better for compatibility).
If anybody wants to take a shot at this, please go ahead!
When specifying a positional argument, using the -m flag appears to read the wrong parameter:
% python3.11 pykms_Client.py -m Windows10 192.168.10.1 optional py-kms client argument
-m
: expected one argument, unrecognized: '192.168.10.1'. Exiting...