diff options
Diffstat (limited to 'test/network/netfilter-template.exp')
-rwxr-xr-x | test/network/netfilter-template.exp | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/test/network/netfilter-template.exp b/test/network/netfilter-template.exp deleted file mode 100755 index 0a3386965..000000000 --- a/test/network/netfilter-template.exp +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | |||
11 | send -- "firejail --net=br1 --ip=10.10.30.10 --name=test1 --netfilter=/etc/firejail/blablabla\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 0\n";exit} | ||
14 | "invalid network filter file" | ||
15 | } | ||
16 | sleep 1 | ||
17 | |||
18 | send -- "firejail --net=br1 --ip=10.10.30.10 --name=test1 --netfilter=/etc/firejail/tcpserver.net,5555 ./tcpserver 5555\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 1\n";exit} | ||
21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
22 | } | ||
23 | sleep 1 | ||
24 | |||
25 | spawn $env(SHELL) | ||
26 | send -- "firejail --netfilter.print=test1\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
29 | "Chain INPUT" | ||
30 | } | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
33 | "Chain FORWARD" | ||
34 | } | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 1.3\n";exit} | ||
37 | "Chain OUTPUT" | ||
38 | } | ||
39 | sleep 1 | ||
40 | |||
41 | send -- "telnet 10.10.30.10 5555\r" | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 2\n";exit} | ||
44 | "Connected to 10.10.30.10" | ||
45 | } | ||
46 | sleep 1 | ||
47 | |||
48 | send "sdfklsjadfl;ksadjfl;sdkfj\r" | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 3\n";exit} | ||
51 | "response" | ||
52 | } | ||
53 | expect { | ||
54 | timeout {puts "TESTING ERROR 4\n";exit} | ||
55 | "Connection closed" | ||
56 | } | ||
57 | sleep 1 | ||
58 | |||
59 | send -- "telnet 10.10.30.10 5556\r" | ||
60 | expect { | ||
61 | timeout {puts "OK\n"} | ||
62 | "Connected to 10.10.30.10" {puts "TESTING ERROR 6\n";exit} | ||
63 | "dikasdfjasdjf" | ||
64 | } | ||
65 | |||
66 | after 100 | ||
67 | puts "all done\n" | ||