File: simplify.multipart.t

package info (click to toggle)
sanitizer 1.76-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 940 kB
  • ctags: 184
  • sloc: perl: 5,276; sh: 2,107; makefile: 51
file content (123 lines) | stat: -rw-r--r-- 3,689 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
121
122
123
#!/bin/sh
[ "$1" = "-h" ] && cat <<tac

This example tests the simplifier's basic functionality.

tac

mkdir .tmp

$ANOMY/bin/simplify \
    "mime=no" \
    "testing=yes" \
    "url=http://blah/" \
    "temp=./.tmp" \
    "header=HEADER" <<EOF 2>test.log >test.out
From xxx@example.com  Thu Aug  3 07:32:10 2000
Return-Path: <xxx@example.com>
Received: from example.com (root@example.com [149.144.245.5])
	by example.com (8.9.3/8.9.3) with ESMTP id HAA01305
	for <bre@example.com>; Thu, 3 Aug 2000 07:32:03 GMT
From: xxx@example.com
Date: Thu, 3 Aug 2000 06:39:59 GMT
Message-Id: <200008030639.GAA23780@example.com>
MIME-Version: 1.0
Sender: xxx@example.com
Subject: moo
To: fake@example.com
Content-Type: multipart/mixed; boundary="=ABACAB:=_0006@@UtD0uere5ZCIrVlOp0vV"

This is MIME preamble.  Blah blah!  Blah!

--=ABACAB:=_0006@@UtD0uere5ZCIrVlOp0vV
Content-Type: application/ms-tnef; charset="iso-8859-1"
Content-Disposition: attachment
Content-Transfer-Encoding: 8bit

this is a very evil file.

--=ABACAB:=_0006@@UtD0uere5ZCIrVlOp0vV
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Here comes=20a=20word=20with=20no=20spaces!

--=ABACAB:=_0006@@UtD0uere5ZCIrVlOp0vV
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: attachment;
 filename="aaaaaaaaa0aaaaaaaaa1aaaaaaaaa2aaaaaaaaa3aaaaaaaaa4aaaaaaaaa5aaaaaaaaa6aaaaaaaaa7aaaaaaaa.vbs.txt"
Content-Transfer-Encoding: 8bit

this is also a very evil file.

--=ABACAB:=_0006@@UtD0uere5ZCIrVlOp0vV--

This is MIME postamble!  Is that a word?

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

$ANOMY/bin/simplify "testing=yes" "temp=./.tmp" \
      "url=http://blah/" "header=HEADER2" <<EOF 2>>test.log >>test.out
From xxx@example.com  Thu Aug  3 07:32:10 2000
Return-Path: <xxx@example.com>
Received: from example.com (root@example.com [149.144.245.5])
	by example.com (8.9.3/8.9.3) with ESMTP id HAA01305
	for <bre@example.com>; Thu, 3 Aug 2000 07:32:03 GMT
From: xxx@example.com
Date: Thu, 3 Aug 2000 06:39:59 GMT
Message-Id: <200008030639.GAA23780@example.com>
Sender: xxx@example.com
Subject: moo
To: fake@example.com

This is a plain text message, old old style!  Blah blah!

EOF
echo "*** Exit code was $? ***" >>test.out
$ANOMY/bin/simplify "testing=yes"  "temp=./.tmp" "url=http://blah/" "header=HEADER2" <<EOF 2>>test.log >>test.out
From xxx@example.com  Thu Aug  3 07:32:10 2000
Return-Path: <xxx@example.com>
Received: from example.com (root@example.com [149.144.245.5])
	by example.com (8.9.3/8.9.3) with ESMTP id HAA01305
	for <bre@example.com>; Thu, 3 Aug 2000 07:32:03 GMT
From: xxx@example.com
Date: Thu, 3 Aug 2000 06:39:59 GMT
Message-Id: <200008030639.GAA23780@example.com>
MIME-Version: 1.0
Sender: xxx@example.com
Subject: moo
To: fake@example.com
Content-Type: multipart/mixed; boundary="=ABACAB:=_0006@@UtD0uere5ZCIrVlOp0vV"

This is MIME preamble.  Blah blah!  Blah!

--=ABACAB:=_0006@@UtD0uere5ZCIrVlOp0vV
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

<html><body>this is an HTML part</body></html>

--=ABACAB:=_0006@@UtD0uere5ZCIrVlOp0vV
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Here comes=20a=20word=20with=20no=20spaces!

--=ABACAB:=_0006@@UtD0uere5ZCIrVlOp0vV
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: attachment;
 filename="aaaaaaaaa0aaaaaaaaa1aaaaaaaaa2aaaaaaaaa3aaaaaaaaa4aaaaaaaaa5aaaaaaaaa6aaaaaaaaa7aaaaaaaa.vbs.txt"
Content-Transfer-Encoding: 8bit

this is also a very evil file.

--=ABACAB:=_0006@@UtD0uere5ZCIrVlOp0vV--

This is MIME postamble!  Is that a word?

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

rm -rf .tmp
exit 0