diff options
author | 2023-03-02 10:34:03 -0500 | |
---|---|---|
committer | 2023-03-02 10:34:03 -0500 | |
commit | 336ecb5d651f22e5a3722ead843181a86dcc066d (patch) | |
tree | e733078e8b3ae1c6d0d7e236911c0f12ae556baa /test/network/netfilter-template.exp | |
parent | gajim: allow loading plugins (#5705) (diff) | |
download | firejail-336ecb5d651f22e5a3722ead843181a86dcc066d.tar.gz firejail-336ecb5d651f22e5a3722ead843181a86dcc066d.tar.zst firejail-336ecb5d651f22e5a3722ead843181a86dcc066d.zip |
network testing; merges
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" | ||