mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-16 06:06:03 -06:00
141 lines
2.2 KiB
Text
Executable file
141 lines
2.2 KiB
Text
Executable file
#!/usr/bin/expect -f
|
|
# This file is part of Firejail project
|
|
# Copyright (C) 2014-2018 Firejail Authors
|
|
# License GPL v2
|
|
|
|
set timeout 10
|
|
spawn $env(SHELL)
|
|
match_max 100000
|
|
|
|
send -- "firejail --net=eth0\r"
|
|
expect {
|
|
timeout {puts "TESTING ERROR 1\n";exit}
|
|
"lo"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 2\n";exit}
|
|
"127.0.0.1"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 3\n";exit}
|
|
"255.0.0.0"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 4\n";exit}
|
|
"UP"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 5\n";exit}
|
|
"eth0-"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 6\n";exit}
|
|
"255.255.255.0"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 7\n";exit}
|
|
"UP"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 8\n";exit}
|
|
"Default gateway"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 9\n";exit}
|
|
"Child process initialized"
|
|
}
|
|
sleep 1
|
|
send -- "exit\r"
|
|
sleep 1
|
|
|
|
send -- "firejail --net=eth0 --net=eth0 --net=eth0 --net=eth0\r"
|
|
expect {
|
|
timeout {puts "TESTING ERROR 11\n";exit}
|
|
"lo"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 12\n";exit}
|
|
"127.0.0.1"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 13\n";exit}
|
|
"255.0.0.0"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 14\n";exit}
|
|
"UP"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 15\n";exit}
|
|
"eth0-"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 16\n";exit}
|
|
"255.255.255.0"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 17\n";exit}
|
|
"UP"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 18\n";exit}
|
|
"eth1-"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 19\n";exit}
|
|
"255.255.255.0"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 20\n";exit}
|
|
"UP"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 5\n";exit}
|
|
"eth2-"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 21\n";exit}
|
|
"255.255.255.0"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 22\n";exit}
|
|
"UP"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 23\n";exit}
|
|
"eth3-"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 24\n";exit}
|
|
"255.255.255.0"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 25\n";exit}
|
|
"UP"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 26\n";exit}
|
|
"Default gateway"
|
|
}
|
|
expect {
|
|
timeout {puts "TESTING ERROR 27\n";exit}
|
|
"Child process initialized"
|
|
}
|
|
sleep 1
|
|
send -- "exit\r"
|
|
sleep 1
|
|
|
|
send -- "firejail --net=eth0 --ip=10.10.20.1\r"
|
|
expect {
|
|
timeout {puts "TESTING ERROR 27\n";exit}
|
|
"the IP address is not in the interface range"
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
after 100
|
|
|
|
puts "\n"
|