There's a C version of pmcmd up on
ftp://ftp.cistron.nl/pub/people/miquels/radius/pmcmd.c
One of the nice things is that it presses Return for you (no more `more'
prompt) so that you can use it in scripts.
By the way, I mentioned it here before, but did you know that the Livingston
pm_command sends commands to the portmaster _all by itself_ without
you asking for it? It wants to dial out to some unknown location!!
Here's part of an strace:
$ time echo sh s10 | strace -s30 ./pm_command is-2.alp **** > /dev/null 2>la
send(4, "e\4\0\20dial ###_loc -x\0", 20, 0) = 20
oldselect(32, [4], NULL, NULL, {120, 0}) = 1 (in [4], left {119, 960000})
read(4, "e\t\0\1", 4) = 4
oldselect(32, [4], NULL, NULL, {120, 0}) = 1 (in [4], left {120, 0})
read(4, "f", 1) = 1
send(4, "e\16\0\1\0", 5, 0) = 5
oldselect(32, [4], NULL, NULL, {120, 0}) = 1 (in [4], left {119, 960000})
read(4, "e\t\0.", 4) = 4
oldselect(32, [4], NULL, NULL, {120, 0}) = 1 (in [4], left {120, 0})
read(4, "Couldn\'t find requested locat"..., 46) = 46
Especially note the command "dial ###_loc -x" and the reply from the
portmaster "Couldn\'t find requested locat"...
Hmm. Trojan horses in binary only programs?
Mike.
-- | Miquel van Smoorenburg | | | miquels@cistron.nl | Owners of digital watches, your days are numbered. | | PGP fingerprint: FE 66 52 4F CD 59 A5 36 7F 39 8B 20 F1 D6 74 02 |