File: sanitizer.rev1_60.t

package info (click to toggle)
sanitizer 1.76-5.1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 940 kB
  • sloc: perl: 5,276; sh: 2,107; makefile: 18
file content (120 lines) | stat: -rw-r--r-- 3,643 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/bin/sh
[ "$1" = "-h" ] && cat <<tac

This example tests the features/changes added for release 1.58:

   - MIME type regexp changes
   - Filename policy algorithm changes

tac

$ANOMY/bin/sanitizer -nofprot $SAN_CONF \
    'file_list_rules = 1' \
    'file_list_1_scanner = 0' \
    'file_list_1_policy = drop' \
    'file_list_1 = .exe$' \
    'file_default_policy = accept' \
    'file_default_filename = unknown.000' \
    'file_name_tpl = ./.tmp.$$$' \
    'system_mime_types = ./mime.types' \
    'header_rev = 0' \
    'feat_testing = 1' \
    'feat_boundaries = 1' \
    'feat_force_name = 1' \
    'feat_mime_files = 1' \
    'feat_log_trace = 1' \
    'feat_log_inline = 2' \
    'feat_log_stderr = 0' <<EOF 2>test.log >test.out
Date: Tue, 27 May 2003 12:19:14 GMT
From: aves-test-1054037954@bre.klaki.net
Message-Id: <200305271219.h4RCJE921460@is105.filter.complex.is>
To: bre@klaki.net
Subject: Pstsuprf (EXE skr), beta0.is105.filter.complex.is, 12:19 27-05-2003Content-Type: multipart/mixed; boundary="filter-test-boundary"
Content-Type: multipart/mixed; boundary="filter-test-boundary"
Content-Disposition: inline

--filter-test-boundary
Content-Type: multipart/alternative; boundary="filter-test-2bound"
Content-Disposition: inline

--filter-test-2bound
Content-Type: text/un.known+foo; charset=iso-8859-1
Content-Disposition: inline

etta er tilraunaskeyti til a lta reyna  uppsetningu pstsu fyrir
bre@klaki.net, sent gegnum vlina beta0.is105.filter.complex.is.

etta skeyti er me eitt vihengi sem ykist vera .EXE skr.

--
Bjarni R. Einarsson                      / FRISK Software International
--------------------------v--------------------------------------------
Email:     xxx@xxxxx.is   | Company home page:  http://www.frisk.is/
Phone/SMS: +354-XXXXXXX   | Personal home page: http://bre.klaki.net/

--filter-test-2bound
Content-Type: text/html; charset=iso-8859-1
Content-Disposition: inline

<html><body>
etta er tilraunaskeyti til a lta reyna  uppsetningu pstsu fyrir
bre@klaki.net, sent gegnum vlina beta0.is105.filter.complex.is. <p>

etta skeyti er me eitt vihengi sem ykist vera .EXE skr.
<p>

<pre>
--
Bjarni R. Einarsson                      / FRISK Software International
--------------------------v--------------------------------------------
Email:     xxx@xxxxx.is   | Company home page:  http://www.frisk.is/
Phone/SMS: +354-XXXXXXX   | Personal home page: http://bre.klaki.net/
</pre>
</body></html>

--filter-test-2bound--
--filter-test-boundary
Content-Type: text/plain; charset=us-ascii; name="foo.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="foo.txt"; 
  filename="test.exe";
  filename="foo.txt"

I'm a harmless fake .exe file.

--filter-test-boundary
Content-Type: application/x-ms-dos-executable; charset=us-ascii
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="foo.txt"; 

I'm another harmless fake .exe file.

--filter-test-boundary
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
Content-Description: evil.exe
Content-Disposition: attachment

I'm another harmless fake .exe file.

--filter-test-boundary
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
Content-ID: <evil.exe>>
Content-Disposition: attachment

I'm another harmless fake .exe file.

--filter-test-boundary
Content-Type: application/pdf; charset=us-ascii
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="foo.txt"; 
Content-ID: <alphabet>

This is text file with a PDF MIME type.

--filter-test-boundary--
EOF

echo "*** Exit code was $? ***" >>test.out
exit 0