|
| 1 | +# -*- coding: binary -*- |
| 2 | +require 'rex/post/meterpreter/extensions/stdapi/railgun/const_manager' |
| 3 | + |
| 4 | +module Rex |
| 5 | +module Post |
| 6 | +module Meterpreter |
| 7 | +module Extensions |
| 8 | +module Stdapi |
| 9 | +module Railgun |
| 10 | +module Def |
| 11 | + |
| 12 | +# |
| 13 | +# A container holding useful Linux API Constants. |
| 14 | +# |
| 15 | +class DefApiConstants_linux < ApiConstants |
| 16 | + |
| 17 | + # |
| 18 | + # Slurp in a giant list of known constants. |
| 19 | + # |
| 20 | + def self.add_constants(const_mgr) |
| 21 | + const_mgr.add_const('MAP_FILE', 0x00) |
| 22 | + const_mgr.add_const('MAP_SHARED', 0x01) |
| 23 | + const_mgr.add_const('MAP_PRIVATE', 0x02) |
| 24 | + const_mgr.add_const('MAP_FIXED', 0x10) |
| 25 | + const_mgr.add_const('MAP_ANON', 0x20) |
| 26 | + const_mgr.add_const('MAP_ANONYMOUS', 0x20) |
| 27 | + const_mgr.add_const('PROT_NONE', 0x00) |
| 28 | + const_mgr.add_const('PROT_READ', 0x01) |
| 29 | + const_mgr.add_const('PROT_WRITE', 0x02) |
| 30 | + const_mgr.add_const('PROT_EXEC', 0x04) |
| 31 | + const_mgr.add_const('PROT_GROWSDOWN', 0x01000000) |
| 32 | + const_mgr.add_const('PROT_GROWSUP', 0x02000000) |
| 33 | + |
| 34 | + const_mgr.add_const("PF_UNSPEC", 0x00000000) |
| 35 | + const_mgr.add_const("PF_LOCAL", 0x00000001) |
| 36 | + const_mgr.add_const("PF_UNIX", 0x00000000) |
| 37 | + const_mgr.add_const("PF_FILE", 0x00000000) |
| 38 | + const_mgr.add_const("PF_INET", 0x00000002) |
| 39 | + const_mgr.add_const("PF_AX25", 0x00000003) |
| 40 | + const_mgr.add_const("PF_IPX", 0x00000004) |
| 41 | + const_mgr.add_const("PF_APPLETALK", 0x00000005) |
| 42 | + const_mgr.add_const("PF_NETROM", 0x00000006) |
| 43 | + const_mgr.add_const("PF_BRIDGE", 0x00000007) |
| 44 | + const_mgr.add_const("PF_ATMPVC", 0x00000008) |
| 45 | + const_mgr.add_const("PF_X25", 0x00000009) |
| 46 | + const_mgr.add_const("PF_INET6", 0x0000000a) |
| 47 | + const_mgr.add_const("PF_ROSE", 0x0000000b) |
| 48 | + const_mgr.add_const("PF_DECnet", 0x0000000c) |
| 49 | + const_mgr.add_const("PF_NETBEUI", 0x0000000d) |
| 50 | + const_mgr.add_const("PF_SECURITY", 0x0000000e) |
| 51 | + const_mgr.add_const("PF_KEY", 0x0000000f) |
| 52 | + const_mgr.add_const("PF_NETLINK", 0x00000010) |
| 53 | + const_mgr.add_const("PF_ROUTE", 0x00000000) |
| 54 | + const_mgr.add_const("PF_PACKET", 0x00000011) |
| 55 | + const_mgr.add_const("PF_ASH", 0x00000012) |
| 56 | + const_mgr.add_const("PF_ECONET", 0x00000013) |
| 57 | + const_mgr.add_const("PF_ATMSVC", 0x00000014) |
| 58 | + const_mgr.add_const("PF_RDS", 0x00000015) |
| 59 | + const_mgr.add_const("PF_SNA", 0x00000016) |
| 60 | + const_mgr.add_const("PF_IRDA", 0x00000017) |
| 61 | + const_mgr.add_const("PF_PPPOX", 0x00000018) |
| 62 | + const_mgr.add_const("PF_WANPIPE", 0x00000019) |
| 63 | + const_mgr.add_const("PF_LLC", 0x0000001a) |
| 64 | + const_mgr.add_const("PF_IB", 0x0000001b) |
| 65 | + const_mgr.add_const("PF_MPLS", 0x0000001c) |
| 66 | + const_mgr.add_const("PF_CAN", 0x0000001d) |
| 67 | + const_mgr.add_const("PF_TIPC", 0x0000001e) |
| 68 | + const_mgr.add_const("PF_BLUETOOTH", 0x0000001f) |
| 69 | + const_mgr.add_const("PF_IUCV", 0x00000020) |
| 70 | + const_mgr.add_const("PF_RXRPC", 0x00000021) |
| 71 | + const_mgr.add_const("PF_ISDN", 0x00000022) |
| 72 | + const_mgr.add_const("PF_PHONET", 0x00000023) |
| 73 | + const_mgr.add_const("PF_IEEE802154", 0x00000024) |
| 74 | + const_mgr.add_const("PF_CAIF", 0x00000025) |
| 75 | + const_mgr.add_const("PF_ALG", 0x00000026) |
| 76 | + const_mgr.add_const("PF_NFC", 0x00000027) |
| 77 | + const_mgr.add_const("PF_VSOCK", 0x00000028) |
| 78 | + const_mgr.add_const("PF_KCM", 0x00000029) |
| 79 | + const_mgr.add_const("PF_MAX", 0x0000002a) |
| 80 | + |
| 81 | + const_mgr.add_const("AF_UNSPEC", 0x00000000) |
| 82 | + const_mgr.add_const("AF_LOCAL", 0x00000001) |
| 83 | + const_mgr.add_const("AF_UNIX", 0x00000000) |
| 84 | + const_mgr.add_const("AF_FILE", 0x00000000) |
| 85 | + const_mgr.add_const("AF_INET", 0x00000002) |
| 86 | + const_mgr.add_const("AF_AX25", 0x00000003) |
| 87 | + const_mgr.add_const("AF_IPX", 0x00000004) |
| 88 | + const_mgr.add_const("AF_APPLETALK", 0x00000005) |
| 89 | + const_mgr.add_const("AF_NETROM", 0x00000006) |
| 90 | + const_mgr.add_const("AF_BRIDGE", 0x00000007) |
| 91 | + const_mgr.add_const("AF_ATMPVC", 0x00000008) |
| 92 | + const_mgr.add_const("AF_X25", 0x00000009) |
| 93 | + const_mgr.add_const("AF_INET6", 0x0000000a) |
| 94 | + const_mgr.add_const("AF_ROSE", 0x0000000b) |
| 95 | + const_mgr.add_const("AF_DECnet", 0x0000000c) |
| 96 | + const_mgr.add_const("AF_NETBEUI", 0x0000000d) |
| 97 | + const_mgr.add_const("AF_SECURITY", 0x0000000e) |
| 98 | + const_mgr.add_const("AF_KEY", 0x0000000f) |
| 99 | + const_mgr.add_const("AF_NETLINK", 0x00000010) |
| 100 | + const_mgr.add_const("AF_ROUTE", 0x00000000) |
| 101 | + const_mgr.add_const("AF_PACKET", 0x00000011) |
| 102 | + const_mgr.add_const("AF_ASH", 0x00000012) |
| 103 | + const_mgr.add_const("AF_ECONET", 0x00000013) |
| 104 | + const_mgr.add_const("AF_ATMSVC", 0x00000014) |
| 105 | + const_mgr.add_const("AF_RDS", 0x00000015) |
| 106 | + const_mgr.add_const("AF_SNA", 0x00000016) |
| 107 | + const_mgr.add_const("AF_IRDA", 0x00000017) |
| 108 | + const_mgr.add_const("AF_PPPOX", 0x00000018) |
| 109 | + const_mgr.add_const("AF_WANPIPE", 0x00000019) |
| 110 | + const_mgr.add_const("AF_LLC", 0x0000001a) |
| 111 | + const_mgr.add_const("AF_IB", 0x0000001b) |
| 112 | + const_mgr.add_const("AF_MPLS", 0x0000001c) |
| 113 | + const_mgr.add_const("AF_CAN", 0x0000001d) |
| 114 | + const_mgr.add_const("AF_TIPC", 0x0000001e) |
| 115 | + const_mgr.add_const("AF_BLUETOOTH", 0x0000001f) |
| 116 | + const_mgr.add_const("AF_IUCV", 0x00000020) |
| 117 | + const_mgr.add_const("AF_RXRPC", 0x00000021) |
| 118 | + const_mgr.add_const("AF_ISDN", 0x00000022) |
| 119 | + const_mgr.add_const("AF_PHONET", 0x00000023) |
| 120 | + const_mgr.add_const("AF_IEEE802154", 0x00000024) |
| 121 | + const_mgr.add_const("AF_CAIF", 0x00000025) |
| 122 | + const_mgr.add_const("AF_ALG", 0x00000026) |
| 123 | + const_mgr.add_const("AF_NFC", 0x00000027) |
| 124 | + const_mgr.add_const("AF_VSOCK", 0x00000028) |
| 125 | + const_mgr.add_const("AF_KCM", 0x00000029) |
| 126 | + const_mgr.add_const("AF_MAX", 0x0000002a) |
| 127 | + |
| 128 | + const_mgr.add_const("SOL_RAW", 0x000000ff) |
| 129 | + const_mgr.add_const("SOL_DECNET", 0x00000105) |
| 130 | + const_mgr.add_const("SOL_X25", 0x00000106) |
| 131 | + const_mgr.add_const("SOL_PACKET", 0x00000107) |
| 132 | + const_mgr.add_const("SOL_ATM", 0x00000108) |
| 133 | + const_mgr.add_const("SOL_AAL", 0x00000109) |
| 134 | + const_mgr.add_const("SOL_IRDA", 0x0000010a) |
| 135 | + const_mgr.add_const("SOL_NETBEUI", 0x0000010b) |
| 136 | + const_mgr.add_const("SOL_LLC", 0x0000010c) |
| 137 | + const_mgr.add_const("SOL_DCCP", 0x0000010d) |
| 138 | + const_mgr.add_const("SOL_NETLINK", 0x0000010e) |
| 139 | + const_mgr.add_const("SOL_TIPC", 0x0000010f) |
| 140 | + const_mgr.add_const("SOL_RXRPC", 0x00000110) |
| 141 | + const_mgr.add_const("SOL_PPPOL2TP", 0x00000111) |
| 142 | + const_mgr.add_const("SOL_BLUETOOTH", 0x00000112) |
| 143 | + const_mgr.add_const("SOL_PNPIPE", 0x00000113) |
| 144 | + const_mgr.add_const("SOL_RDS", 0x00000114) |
| 145 | + const_mgr.add_const("SOL_IUCV", 0x00000115) |
| 146 | + const_mgr.add_const("SOL_CAIF", 0x00000116) |
| 147 | + const_mgr.add_const("SOL_ALG", 0x00000117) |
| 148 | + const_mgr.add_const("SOL_NFC", 0x00000118) |
| 149 | + const_mgr.add_const("SOL_KCM", 0x00000119) |
| 150 | + end |
| 151 | +end |
| 152 | + |
| 153 | +end; end; end; end; end; end; end |
0 commit comments