Blame


1 db7236fb 2020-05-31 mischa #!/bin/sh
2 db7236fb 2020-05-31 mischa #
3 2c6743b8 2022-09-24 mischa # Copyright (c) 2019-2022 Mischa Peters <mischa @ openbsd.amsterdam>
4 db7236fb 2020-05-31 mischa #
5 2c06b26b 2020-05-31 mischa # Permission to use, copy, modify, and distribute this software for any
6 2c06b26b 2020-05-31 mischa # purpose with or without fee is hereby granted, provided that the above
7 2c06b26b 2020-05-31 mischa # copyright notice and this permission notice appear in all copies.
8 2c06b26b 2020-05-31 mischa #
9 2c06b26b 2020-05-31 mischa # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 2c06b26b 2020-05-31 mischa # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 2c06b26b 2020-05-31 mischa # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 2c06b26b 2020-05-31 mischa # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 2c06b26b 2020-05-31 mischa # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 2c06b26b 2020-05-31 mischa # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 2c06b26b 2020-05-31 mischa # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 2c06b26b 2020-05-31 mischa #
17 db7236fb 2020-05-31 mischa test -n "$1" || exit 1
18 db7236fb 2020-05-31 mischa HOST="$1"
19 2c6743b8 2022-09-24 mischa AUTHPASS="tropic shark reefs"
20 2c6743b8 2022-09-24 mischa USER="random"
21 2c6743b8 2022-09-24 mischa PRIVPASS="equ5xerhiffid7klevuk"
22 db7236fb 2020-05-31 mischa VERSIONINFO="/tmp/${HOST}-version.txt"
23 db7236fb 2020-05-31 mischa
24 2c6743b8 2022-09-24 mischa snmp get -A "${AUTHPASS}" -l authPriv -u ${USER} -X "${PRIVPASS}" ${HOST} sysDescr.0 | awk '{print $6,$7}' > ${VERSIONINFO}