Skip to content

Commit 1fb4216

Browse files
committed
Update spec
1 parent f737108 commit 1fb4216

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

spec/lib/rex/parser/group_policy_preferences_spec.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# encoding: binary
12
require 'rex/parser/group_policy_preferences'
23

34
xml_group = '
@@ -76,6 +77,7 @@
7677
</Groups>
7778
'
7879

80+
cpassword_utf7 = 'EqWFlA4kn2T6PHvGi09M7seHuqCYK/slkJWIl7mK+wFSuDccBEp/4l5EuKnwF0WS•ªH~AA'
7981
cpassword_normal = "j1Uyj3Vx8TY9LtLZil2uAuZkFQA/4latT76ZwgdHdhw"
8082
cpassword_bad = "blah"
8183

@@ -85,7 +87,7 @@
8587
##
8688
# Decrypt
8789
##
88-
it "Decrypt returns Local*P4ssword! for normal cpassword" do
90+
it "Decrypt returns Local*P4ssword! for normal cpassword" do
8991
result = GPP.decrypt(cpassword_normal)
9092
result.should eq("Local*P4ssword!")
9193
end
@@ -95,11 +97,16 @@
9597
result.should eq("")
9698
end
9799

98-
it "Decrypt returns blank for nil cpassword" do
100+
it "Decrypt returns blank for nil cpassword" do
99101
result = GPP.decrypt(nil)
100102
result.should eq("")
101103
end
102104

105+
it 'Decrypts a cpassword containing UTF7' do
106+
result = GPP.decrypt(cpassword_utf7)
107+
result.should eq('N3v3rGunnaG!veYouUp')
108+
end
109+
103110
##
104111
# Parse
105112
##

0 commit comments

Comments
 (0)