HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/osquery/share/osquery/lenses/ethers.aug
(* Parsing /etc/ethers *)

module Ethers =
  autoload xfm

  let sep_tab = Util.del_ws_tab

  let eol = del /[ \t]*\n/ "\n"
  let indent = del /[ \t]*/ ""

  let comment = Util.comment
  let empty   = [ del /[ \t]*#?[ \t]*\n/ "\n" ]

  let word = /[^# \n\t]+/
  let address =
    let hex = /[0-9a-fA-F][0-9a-fA-F]?/ in
      hex . ":" . hex . ":" . hex . ":" . hex . ":" . hex . ":" . hex

  let record = [ seq "ether" . indent .
                              [ label "mac" . store  address ] . sep_tab .
                              [ label "ip" . store word ] . eol ]

  let lns = ( empty | comment | record ) *

  let xfm = transform lns (incl "/etc/ethers")