This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(test_snmp). | |
-export([main/0]). | |
main() -> | |
snmpm:start(), | |
EngineID = [128,0,0,0,6], | |
SecName = "v3_user", | |
AuthPass = "authpass", | |
AuthKey = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[10:29:32] jstorm[1]@alarbus:~$ (man hdparm; hdparm 2>&1) | | |
grep -i dangerous | | |
sed -E 's/(\w+ dangerous|dangerous)/\n\1\n/i' | | |
sed -e 's/^are //' | | |
grep -i dangerous | | |
sort | | |
uniq -c | |
14 DANGEROUS | |
2 EXCEPTIONALLY DANGEROUS | |
7 EXTREMELY DANGEROUS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Logging in as a user in wheel gives | |
# 'Failed to set ACL on /var/log/journal/...: Operation not supported'. | |
# | |
# `getfactl` shows incorrect permissions for `/var/log/journal`. | |
# | |
# Setting permissions manually with `setfacl` returns 'Operation not supported'. | |
# | |
# `tune2fs -l /dev/mmcblk1p2` shows 'user_xattr acl'. | |
# | |
# `# CONFIG_EXT4_FS_POSIX_ACL is not set` found in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From the server: | |
# | |
# Incoming SNMP packet | |
# *Mar 1 01:23:00.327: v3 packet security model: v3 security level: noauth | |
# *Mar 1 01:23:00.331: username: admin | |
# *Mar 1 01:23:00.331: snmpEngineID: 800000090300C2014D0C0000 | |
# *Mar 1 01:23:00.331: snmpEngineBoots: 0 snmpEngineTime: 0 | |
15:43:56.287684 12:a7:33:b9:da:d6 > c2:01:4d:0c:00:00, ethertype IPv4 (0x0800), length 160: (tos 0x0, ttl 64, id 16713, offset 0, flags [DF], proto UDP (17), length 146) | |
192.0.2.2.5000 > 192.0.2.3.161: [udp sum ok] { SNMPv3 { F=ar } { USM B=0 T=0 U="admin" } { ScopedPDU E=_80_00_00_09_03_00_c2_01_4d_0c_00_00 C="" { GetRequest(28) R=1582425448 .1.3.6.1.2.1.1.5.0 } } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(1)> SNMP.start | |
dets: file "/home/jstorm/dev/working/elixir/snmp-elixir/snmpm_config_db" not properly closed, repairing ... | |
:ok | |
iex(2)> cred = SNMP.credential [:v3, :no_auth_no_priv, "admin"] | |
%SNMP.USMNoAuthNoPrivCredential{sec_level: :noAuthNoPriv, sec_model: :usm, | |
sec_name: 'admin', version: :v3} | |
iex(3)> SNMP.get [1,3,6,1,2,1,1,5,0], "192.0.2.3", cred, engine_id: <<0x800000090300c2014d0c0000::12*8>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IPV6-TC.mib: 5: TEXTUAL-CONVENTION is only allowed in SNMPv2. | |
IPV6-TC.mib: 8: syntax error before: 'TEXTUAL-CONVENTION' | |
UCD-SNMP-MIB.mib: 785: Number of columns differs from SEQUENCE definition (object:dskTotalLow). | |
UCD-SNMP-MIB.mib: 794: Number of columns differs from SEQUENCE definition (object:dskTotalHigh). | |
UCD-SNMP-MIB.mib: 803: Number of columns differs from SEQUENCE definition (object:dskAvailLow). | |
UCD-SNMP-MIB.mib: 812: Number of columns differs from SEQUENCE definition (object:dskAvailHigh). | |
UCD-SNMP-MIB.mib: 821: Number of columns differs from SEQUENCE definition (object:dskUsedLow). | |
UCD-SNMP-MIB.mib: 830: Number of columns differs from SEQUENCE definition (object:dskUsedHigh). | |
UCD-SNMP-MIB.mib: 857: Number of columns differs from SEQUENCE definition (object:laTable). | |
UCD-SNMP-MIB.mib: 865: Number of columns differs from SEQUENCE definition (object:laEntry). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%% This file was automatically generated by snmpc_mib_to_hrl version 5.2.4 | |
%%% Date: 08-Mar-2017::07:42:27 | |
-ifndef('IP-FORWARD-MIB'). | |
-define('IP-FORWARD-MIB', true). | |
%% Oids | |
-define(ipForward, [1,3,6,1,2,1,4,24]). | |
-define(ipCidrRouteNumber, [1,3,6,1,2,1,4,24,3]). | |
-define(ipCidrRouteNumber_instance, [1,3,6,1,2,1,4,24,3,0]). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex> SNMP.start | |
{:ok, #PID<0.175.0>} | |
iex> cred = SNMP.credential [:v3, :no_auth_no_priv, "admin"] | |
[version: :v3, sec_model: :usm, sec_level: :noAuthNoPriv, sec_name: 'admin'] | |
iex> SNMP.get([1,3,6,1,2,1,1,5,0], URI.parse("snmp://192.0.2.3"), cred) | |
14:30:12.544 [debug] Will register agent snmp://192.0.2.3 with target [130, 219, 114, 183, 132, 30, 20, 148, 117, 155, 154, 175, 231, 194, 102, 115, 99, 57, 90, 71] and config [engine_id: [128, 0, 0, 0, 6], address: [192, 0, 2, 3], port: 161, tdomain: :transportDomainUdpIpv4, version: :v3, sec_model: :usm, sec_level: :noAuthNoPriv, sec_name: 'admin']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change MIB extensions from .txt to .mib | |
copy -r /usr/share/snmp/mibs /home/jstorm/mibs | |
cd /home/jstorm/mibs | |
rename '\.txt$' .mib * | |
# Replace instances of RowStatus with INTEGER in MIBs. | |
# Otherwise, expect compilation errors. | |
# Compile dependencies before target MIB (IP-FORWARD-MIB, in this case). | |
iex> :snmpc.compile('IANAifType-MIB', [i: ['/home/jstorm/mibs']]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Much of ASA syntax is ambiguous, over-determined, or just plain confused. | |
! Below is one such example. | |
! | |
! Name two interfaces using the real/mapped interface delimiter, ','. | |
! In general, ASA accepts a shocking variety of characters for names. | |
! Keywords are unreserved. | |
! Only naming conflicts occur with built-in objects. | |
! | |
ASA(config)# int po1.22 | |
ASA(config-subif)# vlan 22 |
NewerOlder