File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ # encoding: binary
1
2
require 'rex/parser/group_policy_preferences'
2
3
3
4
xml_group = '
76
77
</Groups>
77
78
'
78
79
80
+ cpassword_utf7 = 'EqWFlA4kn2T6PHvGi09M7seHuqCYK/slkJWIl7mK+wFSuDccBEp/4l5EuKnwF0WS•ªH~AA'
79
81
cpassword_normal = "j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw"
80
82
cpassword_bad = "blah"
81
83
85
87
##
86
88
# Decrypt
87
89
##
88
- it "Decrypt returns Local*P4ssword! for normal cpassword" do
90
+ it "Decrypt returns Local*P4ssword! for normal cpassword" do
89
91
result = GPP . decrypt ( cpassword_normal )
90
92
result . should eq ( "Local*P4ssword!" )
91
93
end
95
97
result . should eq ( "" )
96
98
end
97
99
98
- it "Decrypt returns blank for nil cpassword" do
100
+ it "Decrypt returns blank for nil cpassword" do
99
101
result = GPP . decrypt ( nil )
100
102
result . should eq ( "" )
101
103
end
102
104
105
+ it 'Decrypts a cpassword containing UTF7' do
106
+ result = GPP . decrypt ( cpassword_utf7 )
107
+ result . should eq ( 'N3v3rGunnaG!veYouUp' )
108
+ end
109
+
103
110
##
104
111
# Parse
105
112
##
You can’t perform that action at this time.
0 commit comments