rww_auth 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +16 -0
- data/Manifest.txt +9 -0
- data/README.rdoc +41 -0
- data/Rakefile +16 -0
- data/lib/rmww_auth.rb +97 -0
- data/test/cassettes/failing_auth_with_SSL.yml +496 -0
- data/test/cassettes/passing_auth_with_SSL.yml +288 -0
- data/test/test_rmwwauth.rb +27 -0
- metadata +88 -0
data/.gemtest
ADDED
File without changes
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/Manifest.txt
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
= rww_auth
|
2
|
+
|
3
|
+
* http://github.com/julik/rww_auth
|
4
|
+
|
5
|
+
== Description
|
6
|
+
|
7
|
+
Allows password checks against a Remote Web Workplace server (a.k.a. Outlook Webmail)
|
8
|
+
|
9
|
+
== Synopsis
|
10
|
+
|
11
|
+
server = RemoteWorkplaceAuth.new("server.enterprise.uz", use_ssl = true)
|
12
|
+
server.auth("john", "secret") #=> returns true if the password is correct
|
13
|
+
|
14
|
+
== INSTALL:
|
15
|
+
|
16
|
+
* gem install rww_auth
|
17
|
+
|
18
|
+
== LICENSE:
|
19
|
+
|
20
|
+
(The MIT License)
|
21
|
+
|
22
|
+
Copyright (c) 2011 Julik Tarkhanov
|
23
|
+
|
24
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
25
|
+
a copy of this software and associated documentation files (the
|
26
|
+
'Software'), to deal in the Software without restriction, including
|
27
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
28
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
29
|
+
permit persons to whom the Software is furnished to do so, subject to
|
30
|
+
the following conditions:
|
31
|
+
|
32
|
+
The above copyright notice and this permission notice shall be
|
33
|
+
included in all copies or substantial portions of the Software.
|
34
|
+
|
35
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
36
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
37
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
38
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
39
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
40
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
41
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'hoe'
|
5
|
+
require './lib/rmww_auth'
|
6
|
+
|
7
|
+
Hoe::RUBY_FLAGS.gsub!(/^\-w/, '') # No thanks undefined ivar warnings
|
8
|
+
Hoe.spec 'rww_auth' do | s |
|
9
|
+
s.version = RemoteWorkplaceAuth::VERSION
|
10
|
+
s.readme_file = 'README.rdoc'
|
11
|
+
s.developer('Julik', 'me@julik.nl')
|
12
|
+
s.extra_dev_deps = {"vcr" => "~> 1.0.0"}
|
13
|
+
s.clean_globs = %w( **/.DS_Store coverage.info **/*.rbc .idea .yardoc)
|
14
|
+
end
|
15
|
+
|
16
|
+
# vim: syntax=ruby
|
data/lib/rmww_auth.rb
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'net/https'
|
3
|
+
|
4
|
+
=begin
|
5
|
+
ActiveDirectory-Exchange-Blaggh authentication guerilla-style. Will take the give username and password and try to authenticate
|
6
|
+
them against the give Remote Web Workplace server. This assumes that the user on a domain also has an email address
|
7
|
+
with OWA of course. If the user is found RWW will give us a specific response. No credentials or user information is
|
8
|
+
retrieved. Please go and make OpenID frontends from that, I dare you!
|
9
|
+
|
10
|
+
Usage:
|
11
|
+
|
12
|
+
rww_servr = RemoteWebWorkplaceAuth.new("intranet.bigenterprise.com" use_ssl = true)
|
13
|
+
if rww_servr.authenticate("julik", "topsecret")
|
14
|
+
puts "Yuppie!"
|
15
|
+
else
|
16
|
+
puts "No donut"
|
17
|
+
end
|
18
|
+
|
19
|
+
=end
|
20
|
+
|
21
|
+
class RemoteWorkplaceAuth
|
22
|
+
VERSION = "1.0.0"
|
23
|
+
VIEW_STATE_PAT = /name="__VIEWSTATE" value="([^"]+)"/
|
24
|
+
|
25
|
+
attr_accessor :server, :use_ssl
|
26
|
+
|
27
|
+
def initialize(hostname, use_ssl = true)
|
28
|
+
@server = hostname
|
29
|
+
@base_login_url = '/Remote/logon.aspx?ReturnUrl=%2fRemote%2fDefault.aspx'
|
30
|
+
@outlook = if use_ssl
|
31
|
+
o = Net::HTTP.new(@server, 443)
|
32
|
+
o.use_ssl = true
|
33
|
+
o.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
34
|
+
o
|
35
|
+
else
|
36
|
+
Net::HTTP.new(@server)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Will run the auth
|
41
|
+
def auth(user, password)
|
42
|
+
with_viewstate do | payload |
|
43
|
+
login_form_values = {
|
44
|
+
"txtUserName" => user.to_s,
|
45
|
+
"txtUserPass" => password.to_s,
|
46
|
+
"cmdLogin" => "cmdLogin",
|
47
|
+
"listSpeed" => "Broadband",
|
48
|
+
"__VIEWSTATE" => payload,
|
49
|
+
}
|
50
|
+
|
51
|
+
begin
|
52
|
+
@outlook.start do |http|
|
53
|
+
form_post = Net::HTTP::Post.new("/Remote/logon.aspx")
|
54
|
+
form_post.set_form_data(login_form_values, '&')
|
55
|
+
response = http.request(form_post); response.value
|
56
|
+
end
|
57
|
+
rescue Net::HTTPRetriableError => e
|
58
|
+
if e.message =~ /302/ # RWW will return a redirect if the user is found
|
59
|
+
return true
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
return false
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
private
|
68
|
+
def with_viewstate
|
69
|
+
viewstate_payload = @outlook.start do |http|
|
70
|
+
request = Net::HTTP::Get.new(@base_login_url)
|
71
|
+
response = http.request(request); response.value
|
72
|
+
response.body.scan(VIEW_STATE_PAT).pop.pop
|
73
|
+
end
|
74
|
+
yield viewstate_payload
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
if __FILE__ == $0
|
79
|
+
p "Your server: "
|
80
|
+
p(server = gets.chomp)
|
81
|
+
|
82
|
+
p "Use HTTPS? [y/n]: "
|
83
|
+
p(use_ssl = !!(gets =~ /y/i))
|
84
|
+
p "Username: "
|
85
|
+
p(login = gets.chomp)
|
86
|
+
p "Password: "
|
87
|
+
pass = gets.chomp
|
88
|
+
|
89
|
+
a = RemoteWorkplaceAuth.new(server, use_ssl)
|
90
|
+
if a.auth(login, pass)
|
91
|
+
puts "========================"
|
92
|
+
puts "Auth passed, user exists"
|
93
|
+
else
|
94
|
+
puts "==========="
|
95
|
+
puts "Auth failed"
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,496 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://mail.enterprise.co.uk:443/Remote/logon.aspx?ReturnUrl=/Remote/Default.aspx
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
response: !ruby/struct:VCR::Response
|
9
|
+
status: !ruby/struct:VCR::ResponseStatus
|
10
|
+
code: 200
|
11
|
+
message: OK
|
12
|
+
headers:
|
13
|
+
date:
|
14
|
+
- Sat, 02 Jul 2011 20:42:18 GMT
|
15
|
+
server:
|
16
|
+
- Microsoft-IIS/6.0
|
17
|
+
microsoftofficewebserver:
|
18
|
+
- 5.0_Pub
|
19
|
+
x-powered-by:
|
20
|
+
- ASP.NET
|
21
|
+
x-aspnet-version:
|
22
|
+
- 1.1.4322
|
23
|
+
cache-control:
|
24
|
+
- no-cache
|
25
|
+
pragma:
|
26
|
+
- no-cache
|
27
|
+
expires:
|
28
|
+
- "-1"
|
29
|
+
content-type:
|
30
|
+
- text/html; charset=utf-8
|
31
|
+
content-length:
|
32
|
+
- "8779"
|
33
|
+
body: "\r\n\
|
34
|
+
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" >\r\n\
|
35
|
+
\r\n\
|
36
|
+
<HTML xmlns:IE>\r\n\
|
37
|
+
\t<HEAD>\r\n\
|
38
|
+
\t\t<title>Hectic Electric Remote Web Workplace</title>\r\n\
|
39
|
+
\t\t<meta name=\"GENERATOR\" Content=\"Microsoft Visual Studio 7.0\">\r\n\
|
40
|
+
\t\t<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\r\n\
|
41
|
+
\t\t<META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">\r\n\
|
42
|
+
\t\t<meta name=\"CODE_LANGUAGE\" Content=\"C#\">\r\n\
|
43
|
+
\t\t<meta name=\"vs_defaultClientScript\" content=\"JavaScript\">\r\n\
|
44
|
+
\t\t<meta name=\"vs_targetSchema\" content=\"http://schemas.microsoft.com/intellisense/ie5\">\r\n\
|
45
|
+
\t\t<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, NOFOLLOW\">\r\n\
|
46
|
+
\t\t<STYLE>\r\n\
|
47
|
+
\t\t .headerBackground { background-image: url(images/login.gif); background-repeat: no-repeat; }\r\n\
|
48
|
+
\t\t\t.headerLogo { FONT-SIZE: 14pt; FONT-WEIGHT: bold; COLOR: white; FONT-FAMILY: Tahoma } \r\n\
|
49
|
+
\t\t\t.subHeader { FONT-SIZE: 12pt; COLOR: white; FONT-FAMILY: Tahoma }\r\n\
|
50
|
+
\t\t\t.linkText { FONT-SIZE: 80%; COLOR: black; FONT-FAMILY: Tahoma }\r\n\
|
51
|
+
\t\t\tA { COLOR: #183c84; TEXT-DECORATION: none } \r\n\
|
52
|
+
\t\t\tA:hover { TEXT-DECORATION: underline } \r\n\
|
53
|
+
\t\t\tA:visited { COLOR: #183c84 } \r\n\
|
54
|
+
\t\t\t\r\n\
|
55
|
+
\t\t\t@media all \r\n\
|
56
|
+
\t\t\t{\r\n\
|
57
|
+
\t\t\t\tIE\\:clientCaps { behavior:url(#default#clientcaps) }\r\n\
|
58
|
+
\t\t\t}\t\t\r\n\
|
59
|
+
\t\t</STYLE>\r\n\
|
60
|
+
\t\t<script language=\"javascript\">\r\n\
|
61
|
+
\t\t\r\n\
|
62
|
+
\t\tvar g_bFocus = true;\r\n\
|
63
|
+
\t\t\t\r\n\
|
64
|
+
\t\tfunction isIE6sp1()\r\n\
|
65
|
+
\t\t{\r\n\
|
66
|
+
\t\t\tvar nVerOffset = navigator.appVersion.indexOf(\"MSIE \");\r\n\
|
67
|
+
\t\t\tif( nVerOffset == -1 ) return true;\r\n\
|
68
|
+
\t\t\t\r\n\
|
69
|
+
\t\t\tvar nVersion = parseFloat(navigator.appVersion.substring(nVerOffset + 5, nVerOffset + 8));\r\n\
|
70
|
+
\r\n\
|
71
|
+
\t\t\tif (!isNaN(nVersion))\r\n\
|
72
|
+
\t\t\t{\r\n\
|
73
|
+
\t\t\t\tif (nVersion > 6)\r\n\
|
74
|
+
\t\t\t\t{\r\n\
|
75
|
+
\t\t\t\t\treturn true;\r\n\
|
76
|
+
\t\t\t\t}\r\n\
|
77
|
+
\t\t\t\telse if (nVersion == 6)\r\n\
|
78
|
+
\t\t\t\t{\r\n\
|
79
|
+
\t\t\t\t\tvar nSPOffset = navigator.appMinorVersion.indexOf(\"SP\");\r\n\
|
80
|
+
\t\t\t\t\tif (nSPOffset != -1)\r\n\
|
81
|
+
\t\t\t\t\t{\r\n\
|
82
|
+
\t\t\t\t\t\tvar nVerSP = parseInt(navigator.appMinorVersion.substring(nSPOffset + 2, nSPOffset + 3), 10);\r\n\
|
83
|
+
\t\t\t\t\t\tif (!isNaN(nVerSP) && (nVerSP >= 1))\r\n\
|
84
|
+
\t\t\t\t\t\t\treturn true;\r\n\
|
85
|
+
\t\t\t\t\t}\r\n\
|
86
|
+
\t\t\t\t\t\r\n\
|
87
|
+
\t\t\t\t\tvar strIEFullVersion = oClientCaps.getComponentVersion(\"{89820200-ECBD-11CF-8B85-00AA005B4383}\",\"ComponentID\");\t\t\t\t\t\r\n\
|
88
|
+
\t\t\t\t\tif (strIEFullVersion != null)\r\n\
|
89
|
+
\t\t\t\t\t{\r\n\
|
90
|
+
\t\t\t\t\t\tvar aVersionPart = strIEFullVersion.split(\",\");\r\n\
|
91
|
+
\t\t\t\t\t\tif( aVersionPart != null && aVersionPart.length > 3 )\r\n\
|
92
|
+
\t\t\t\t\t\t{\t\t\t\t\t\t\t\r\n\
|
93
|
+
\t\t\t\t\t\t\tvar nBuildNum = parseInt(aVersionPart[2], 10);\r\n\
|
94
|
+
\t\t\t\t\t\t\tif( !isNaN(nBuildNum) && nBuildNum >= 3790 )\r\n\
|
95
|
+
\t\t\t\t\t\t\t\treturn true;\r\n\
|
96
|
+
\t\t\t\t\t\t}\r\n\
|
97
|
+
\t\t\t\t\t}\t\t\t\t\t\r\n\
|
98
|
+
\t\t\t\t}\r\n\
|
99
|
+
\t\t\t}\r\n\
|
100
|
+
\t\t\treturn false;\r\n\
|
101
|
+
\t\t}\r\n\
|
102
|
+
\r\n\
|
103
|
+
\t\tfunction onLoad()\r\n\
|
104
|
+
\t\t{\r\n\
|
105
|
+
\t\t\tif (top.header != null)\r\n\
|
106
|
+
\t\t\t{\r\n\
|
107
|
+
\t\t\t\ttop.location = \"logon.aspx\";\r\n\
|
108
|
+
\t\t\t}\r\n\
|
109
|
+
\t\t\t\r\n\
|
110
|
+
\t\t\t\r\n\
|
111
|
+
\t\t\t\t\tif(g_bFocus && document.logon.txtUserName.value == \"\")\r\n\
|
112
|
+
\t\t\t\t\t{\r\n\
|
113
|
+
\t\t\t\t\t\tdocument.logon.txtUserName.focus();\r\n\
|
114
|
+
\t\t\t\t\t}\r\n\
|
115
|
+
\t\t\t\r\n\
|
116
|
+
\t\t\t\r\n\
|
117
|
+
\t\t\t// Clear the cache at all times\r\n\
|
118
|
+
\t\t\tdocument.execCommand(\"ClearAuthenticationCache\",\"false\");\t\t\t\r\n\
|
119
|
+
\t\t\tdocument.cookie = \"IE6SP1=\" + isIE6sp1();\r\n\
|
120
|
+
\t\t\t\r\n\
|
121
|
+
\t\t\tvar nVerOffset = navigator.appVersion.indexOf(\"MSIE \");\r\n\
|
122
|
+
\t\t\tif( nVerOffset != -1 )\r\n\
|
123
|
+
\t\t\t{\r\n\
|
124
|
+
\t\t\t if (isIE6sp1())\r\n\
|
125
|
+
\t\t\t {\r\n\
|
126
|
+
\t\t\t var bFound = false;\r\n\
|
127
|
+
\t\t\t var aCookie = document.cookie.split(\"; \");\r\n\
|
128
|
+
\t\t\t for (var i = 0; i < aCookie.length && !bFound; i++)\r\n\
|
129
|
+
\t\t\t {\r\n\
|
130
|
+
\t\t\t var aCrumb = aCookie[i].split(\"=\");\r\n\
|
131
|
+
\t\t\t if (aCrumb[0] == \"Trusted\")\r\n\
|
132
|
+
\t\t\t {\r\n\
|
133
|
+
\t\t\t if (document.logon.checkPublic != null)\r\n\
|
134
|
+
\t\t\t {\r\n\
|
135
|
+
\t\t\t if (aCrumb[1] == \"True\")\r\n\
|
136
|
+
\t\t\t document.logon.checkPublic.checked = true;\r\n\
|
137
|
+
\t\t\t else if (aCrumb[1] == \"False\")\r\n\
|
138
|
+
\t\t\t document.logon.checkPublic.checked = false;\r\n\
|
139
|
+
\t\t\t }\r\n\
|
140
|
+
\t\t\t else if (document.logon.checkPublic2 != null)\r\n\
|
141
|
+
\t\t\t {\r\n\
|
142
|
+
\t\t\t if (aCrumb[1] == \"True\")\r\n\
|
143
|
+
\t\t\t document.logon.checkPublic2.checked = true;\r\n\
|
144
|
+
\t\t\t else if (aCrumb[1] == \"False\")\r\n\
|
145
|
+
\t\t\t document.logon.checkPublic2.checked = false;\r\n\
|
146
|
+
\t\t\t }\r\n\
|
147
|
+
\t\t\t bFound = true;\r\n\
|
148
|
+
\t\t\t } \r\n\
|
149
|
+
\t\t\t } \r\n\
|
150
|
+
\t\t\t }\r\n\
|
151
|
+
\t\t\t}\r\n\
|
152
|
+
\t\t}\r\n\
|
153
|
+
\t\t\t\t\r\n\
|
154
|
+
\t\tfunction validatePwd()\r\n\
|
155
|
+
\t\t{\r\n\
|
156
|
+
\t\t\tif (document.logon.txtChangeUserPassNew.value != document.logon.txtChangeUserPassConfirm.value)\r\n\
|
157
|
+
\t\t\t{\r\n\
|
158
|
+
\t\t\t\talert('The new password and the confirmation password do not match. Type the same password in both boxes.');\r\n\
|
159
|
+
\t\t\t\treturn false;\r\n\
|
160
|
+
\t\t\t}\r\n\
|
161
|
+
\t\t}\r\n\
|
162
|
+
\t\t</script>\r\n\
|
163
|
+
\t</HEAD>\r\n\
|
164
|
+
\t<body MS_POSITIONING=\"GridLayout\" onload=\"onLoad()\" bgcolor=\"#3A6EA5\">\r\n\
|
165
|
+
\t\t<IE:CLIENTCAPS ID=\"oClientCaps\" />\r\n\
|
166
|
+
\t\t<form name=\"logon\" method=\"post\" action=\"logon.aspx?ReturnUrl=%2fRemote%2fDefault.aspx\" id=\"logon\" autocomplete=\"off\">\r\n\
|
167
|
+
<input type=\"hidden\" name=\"__VIEWSTATE\" value=\"dDwtMTk3ODkzNzE3NTt0PHA8bDxydXBGYWlsZWQ7cnVwUGFnZU1vZGU7PjtsPG88Zj47Rm9ybVNhbXBsZTEubG9nb24rUEFHRV9NT0RFLCBSRU1PVEUsIFZlcnNpb249NS4yLjI4OTMuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0zMWJmMzg1NmFkMzY0ZTM1PFBBR0VNT0RFX0xPR09OPjs+PjtsPGk8MD47PjtsPHQ8O2w8aTwxPjtpPDM+Oz47bDx0PDtsPGk8MD47aTwxPjtpPDI+O2k8Mz47aTw0PjtpPDU+O2k8Nj47PjtsPHQ8cDxsPHN0eWxlOz47bDxXSURUSDoyODhweF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\" />\r\n\
|
168
|
+
\r\n\
|
169
|
+
\t\t\t\r\n\
|
170
|
+
\t\t\t<table id=\"panelLogon\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td>\r\n\
|
171
|
+
\r\n\
|
172
|
+
\t\t\t\t<table align=center cellpadding=\"0\" cellspacing=\"0\" width=\"448px\" border=\"0\" ID=\"Table5\">\t\t\t\t\t\r\n\
|
173
|
+
\t\t\t\t\t<tr height=\"100px\"><td> </td></tr>\r\n\
|
174
|
+
\t\t\t\t\t<tr height=\"110px\">\r\n\
|
175
|
+
\t\t\t\t\t\t<td>\r\n\
|
176
|
+
\t\t\t\t\t\t\t<table width=\"448px\" height=\"110px\" cellspacing=\"12\" class=\"headerBackground\" ID=\"Table6\">\r\n\
|
177
|
+
\t\t\t\t\t\t\t\t<tr height=\"20px\"><td> </td></tr>\r\n\
|
178
|
+
\t\t\t\t\t\t\t\t<tr height=\"52px\">\r\n\
|
179
|
+
\t\t\t\t\t\t\t\t\t<td width=\"51px\"> </td>\r\n\
|
180
|
+
\t\t\t\t\t\t\t\t\t<td width=\"32px\"><img src=\"images/winxp.gif\"></td>\r\n\
|
181
|
+
\t\t\t\t\t\t\t\t\t<td>\r\n\
|
182
|
+
\t\t\t\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ID=\"Table7\" height=\"32px\">\r\n\
|
183
|
+
\t\t\t\t\t\t\t\t\t\t\t<tr><td class=\"subHeader\">\tHectic Electric</td></tr>\r\n\
|
184
|
+
\t\t\t\t\t\t\t\t\t\t\t<tr><td class=\"headerLogo\">Remote Web Workplace</td></tr>\r\n\
|
185
|
+
\t\t\t\t\t\t\t\t\t\t</table>\r\n\
|
186
|
+
\t\t\t\t\t\t\t\t\t</td>\r\n\
|
187
|
+
\t\t\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\r\n\
|
188
|
+
\t\t\t\t\t\t\t</table>\r\n\
|
189
|
+
\t\t\t\t\t\t</td>\r\n\
|
190
|
+
\t\t\t\t\t</tr>\r\n\
|
191
|
+
\t\t\t\t\t<tr>\r\n\
|
192
|
+
\t\t\t\t\t\t<td class=linkText>\r\n\
|
193
|
+
\t\t\t\t\t\t\t<table bgcolor=White ID=\"Table8\" width=\"448px\" cellspacing=\"12\">\r\n\
|
194
|
+
\t\t\t\t\t\t\t\t\r\n\
|
195
|
+
\t\t\t\t\t\t\t\t<tr height=\"15px\">\r\n\
|
196
|
+
\t\t\t\t\t\t\t\t\t<td colspan=3> </td>\r\n\
|
197
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
198
|
+
\t\t\t\t\t\t\t\t\r\n\
|
199
|
+
\t\t\t\t\t\t\t\t\r\n\
|
200
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
201
|
+
\t\t\t\t\t\t\t\t\t<td align=right class=linkText>User name:</td>\r\n\
|
202
|
+
\t\t\t\t\t\t\t\t\t<TD class=\"linkText\"><input name=\"txtUserName\" id=\"txtUserName\" type=\"text\" tabIndex=\"1\" style=\"WIDTH:288px;\" /></TD>\r\n\
|
203
|
+
\t\t\t\t\t\t\t\t\t<td class=\"linkText\"></td>\r\n\
|
204
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
205
|
+
\t\t\t\t\t\t\t\t\r\n\
|
206
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
207
|
+
\t\t\t\t\t\t\t\t\t<td align=right class=linkText>Password:</td>\r\n\
|
208
|
+
\t\t\t\t\t\t\t\t\t<TD class=\"linkText\"><input name=\"txtUserPass\" id=\"txtUserPass\" type=\"password\" tabIndex=\"2\" onfocus=\"g_bFocus=false;\" style=\"WIDTH:288px;\" /></TD>\t\t\t\t\t\t\t\t\t\r\n\
|
209
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
210
|
+
\t\t\t\t\t\t\t\t\r\n\
|
211
|
+
\t\t\t\t\t\t\t\t<tr height=\"20px\">\r\n\
|
212
|
+
\t\t\t\t\t\t\t\t\t<td colspan=3 align=right><input name=\"cmdLogin\" id=\"cmdLogin\" type=\"submit\" tabIndex=\"3\" value=\"Log On\" /></td>\r\n\
|
213
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
214
|
+
\t\t\t\t\t\t\t\t\r\n\
|
215
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
216
|
+
\t\t\t\t\t\t\t\t\t<td align=right class=linkText>Connection speed:</td>\r\n\
|
217
|
+
\t\t\t\t\t\t\t\t\t<td><select name=\"listSpeed\" id=\"listSpeed\" tabindex=\"4\" class=\"linkText\">\r\n\
|
218
|
+
\t\t<option value=\"Modem (28.8 Kbps)\">Modem (28.8 Kbps)</option>\r\n\
|
219
|
+
\t\t<option value=\"Modem (56 Kbps)\">Modem (56 Kbps)</option>\r\n\
|
220
|
+
\t\t<option selected=\"selected\" value=\"Broadband\">Broadband</option>\r\n\
|
221
|
+
\t\t<option value=\"Small Business Network\">Small Business Network</option>\r\n\
|
222
|
+
\r\n\
|
223
|
+
\t</select></td>\r\n\
|
224
|
+
\t\t\t\t\t\t\t\t\t<td class=\"linkText\"></td>\r\n\
|
225
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
226
|
+
\t\t\t\t\t\t\t\t\r\n\
|
227
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
228
|
+
\t\t\t\t\t\t\t\t\t<td></td>\r\n\
|
229
|
+
\t\t\t\t\t\t\t\t\t<td><span class=\"linkText\"><input id=\"checkPublic\" type=\"checkbox\" name=\"checkPublic\" checked=\"checked\" tabindex=\"5\" /><label for=\"checkPublic\">I'm using a public or shared computer</label></span></td>\r\n\
|
230
|
+
\t\t\t\t\t\t\t\t\t<td class=\"linkText\"></td>\r\n\
|
231
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
232
|
+
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\
|
233
|
+
\t\t\t\t\t\t\t\t<tr height=\"20px\"><td colspan=3 align=right><img src=\"images/RwwOEMLogo.gif\"></td></tr>\r\n\
|
234
|
+
\t\t\t\t\t\t\t</table>\r\n\
|
235
|
+
\t\t\t\t\t\t</td>\r\n\
|
236
|
+
\t\t\t\t\t</tr>\t\t\t\t\t\r\n\
|
237
|
+
\t\t\t\t</table>\r\n\
|
238
|
+
\t\t\t\r\n\
|
239
|
+
</td></tr></table>\r\n\
|
240
|
+
\t\t</form>\r\n\
|
241
|
+
\t</body>\r\n\
|
242
|
+
</HTML>\r\n"
|
243
|
+
http_version: "1.1"
|
244
|
+
- !ruby/struct:VCR::HTTPInteraction
|
245
|
+
request: !ruby/struct:VCR::Request
|
246
|
+
method: :post
|
247
|
+
uri: https://mail.enterprise.co.uk:443/Remote/logon.aspx
|
248
|
+
body: txtUserName=julik&txtUserPass=fake&cmdLogin=cmdLogin&listSpeed=Broadband&__VIEWSTATE=dDwtMTk3ODkzNzE3NTt0PHA8bDxydXBGYWlsZWQ7cnVwUGFnZU1vZGU7PjtsPG88Zj47Rm9ybVNhbXBsZTEubG9nb24rUEFHRV9NT0RFLCBSRU1PVEUsIFZlcnNpb249NS4yLjI4OTMuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0zMWJmMzg1NmFkMzY0ZTM1PFBBR0VNT0RFX0xPR09OPjs%2bPjtsPGk8MD47PjtsPHQ8O2w8aTwxPjtpPDM%2bOz47bDx0PDtsPGk8MD47aTwxPjtpPDI%2bO2k8Mz47aTw0PjtpPDU%2bO2k8Nj47PjtsPHQ8cDxsPHN0eWxlOz47bDxXSURUSDoyODhweFw7Oz4%2bOzs%2bO3Q8cDxsPHN0eWxlOz47bDxXSURUSDoyODhweFw7Oz4%2bOzs%2bO3Q8cDxsPHN0eWxlOz47bDxXSURUSDoyODhweFw7Oz4%2bOzs%2bO3Q8cDxsPHN0eWxlOz47bDxXSURUSDoyODhweFw7Oz4%2bOzs%2bO3Q8cDxsPHZhbHVlOz47bDxPSzs%2bPjs7Pjt0PHQ8O3Q8aTw0PjtAPE1vZGVtICgyOC44IEticHMpO01vZGVtICg1NiBLYnBzKTtCcm9hZGJhbmQ7U21hbGwgQnVzaW5lc3MgTmV0d29yazs%2bO0A8TW9kZW0gKDI4LjggS2Jwcyk7TW9kZW0gKDU2IEticHMpO0Jyb2FkYmFuZDtTbWFsbCBCdXNpbmVzcyBOZXR3b3JrOz4%2bO2w8aTwyPjs%2bPjs7Pjt0PHA8cDxsPFRleHQ7PjtsPEknbSB1c2luZyBhIHB1YmxpYyBvciBzaGFyZWQgY29tcHV0ZXI7Pj47Pjs7Pjs%2bPjt0PDtsPGk8MD47aTwxPjtpPDI%2bO2k8Mz47aTw0Pjs%2bO2w8dDxwPGw8c3R5bGU7PjtsPFdJRFRIOjI4OHB4XDs7Pj47Oz47dDxwPGw8c3R5bGU7PjtsPFdJRFRIOjI4OHB4XDs7Pj47Oz47dDxwPGw8dmFsdWU7PjtsPExvZyBPbjs%2bPjs7Pjt0PHQ8O3Q8aTw0PjtAPE1vZGVtICgyOC44IEticHMpO01vZGVtICg1NiBLYnBzKTtCcm9hZGJhbmQ7U21hbGwgQnVzaW5lc3MgTmV0d29yazs%2bO0A8TW9kZW0gKDI4LjggS2Jwcyk7TW9kZW0gKDU2IEticHMpO0Jyb2FkYmFuZDtTbWFsbCBCdXNpbmVzcyBOZXR3b3JrOz4%2bOz47Oz47dDxwPHA8bDxUZXh0Oz47bDxJJ20gdXNpbmcgYSBwdWJsaWMgb3Igc2hhcmVkIGNvbXB1dGVyOz4%2bOz47Oz47Pj47Pj47Pj47bDxjaGVja1B1YmxpYzs%2bPnyFSxZizxHwX9XoFsADoxqhiqak
|
249
|
+
headers:
|
250
|
+
content-type:
|
251
|
+
- application/x-www-form-urlencoded
|
252
|
+
response: !ruby/struct:VCR::Response
|
253
|
+
status: !ruby/struct:VCR::ResponseStatus
|
254
|
+
code: 200
|
255
|
+
message: OK
|
256
|
+
headers:
|
257
|
+
date:
|
258
|
+
- Sat, 02 Jul 2011 20:42:18 GMT
|
259
|
+
server:
|
260
|
+
- Microsoft-IIS/6.0
|
261
|
+
microsoftofficewebserver:
|
262
|
+
- 5.0_Pub
|
263
|
+
x-powered-by:
|
264
|
+
- ASP.NET
|
265
|
+
x-aspnet-version:
|
266
|
+
- 1.1.4322
|
267
|
+
set-cookie:
|
268
|
+
- ASP.NET_SessionId=2tkorz45i2cqu2bje2fdrt45; path=/
|
269
|
+
cache-control:
|
270
|
+
- no-cache
|
271
|
+
pragma:
|
272
|
+
- no-cache
|
273
|
+
expires:
|
274
|
+
- "-1"
|
275
|
+
content-type:
|
276
|
+
- text/html; charset=utf-8
|
277
|
+
content-length:
|
278
|
+
- "9368"
|
279
|
+
body: "\r\n\
|
280
|
+
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" >\r\n\
|
281
|
+
\r\n\
|
282
|
+
<HTML xmlns:IE>\r\n\
|
283
|
+
\t<HEAD>\r\n\
|
284
|
+
\t\t<title>Hectic Electric Remote Web Workplace</title>\r\n\
|
285
|
+
\t\t<meta name=\"GENERATOR\" Content=\"Microsoft Visual Studio 7.0\">\r\n\
|
286
|
+
\t\t<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\r\n\
|
287
|
+
\t\t<META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">\r\n\
|
288
|
+
\t\t<meta name=\"CODE_LANGUAGE\" Content=\"C#\">\r\n\
|
289
|
+
\t\t<meta name=\"vs_defaultClientScript\" content=\"JavaScript\">\r\n\
|
290
|
+
\t\t<meta name=\"vs_targetSchema\" content=\"http://schemas.microsoft.com/intellisense/ie5\">\r\n\
|
291
|
+
\t\t<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, NOFOLLOW\">\r\n\
|
292
|
+
\t\t<STYLE>\r\n\
|
293
|
+
\t\t .headerBackground { background-image: url(images/login.gif); background-repeat: no-repeat; }\r\n\
|
294
|
+
\t\t\t.headerLogo { FONT-SIZE: 14pt; FONT-WEIGHT: bold; COLOR: white; FONT-FAMILY: Tahoma } \r\n\
|
295
|
+
\t\t\t.subHeader { FONT-SIZE: 12pt; COLOR: white; FONT-FAMILY: Tahoma }\r\n\
|
296
|
+
\t\t\t.linkText { FONT-SIZE: 80%; COLOR: black; FONT-FAMILY: Tahoma }\r\n\
|
297
|
+
\t\t\tA { COLOR: #183c84; TEXT-DECORATION: none } \r\n\
|
298
|
+
\t\t\tA:hover { TEXT-DECORATION: underline } \r\n\
|
299
|
+
\t\t\tA:visited { COLOR: #183c84 } \r\n\
|
300
|
+
\t\t\t\r\n\
|
301
|
+
\t\t\t@media all \r\n\
|
302
|
+
\t\t\t{\r\n\
|
303
|
+
\t\t\t\tIE\\:clientCaps { behavior:url(#default#clientcaps) }\r\n\
|
304
|
+
\t\t\t}\t\t\r\n\
|
305
|
+
\t\t</STYLE>\r\n\
|
306
|
+
\t\t<script language=\"javascript\">\r\n\
|
307
|
+
\t\t\r\n\
|
308
|
+
\t\tvar g_bFocus = true;\r\n\
|
309
|
+
\t\t\t\r\n\
|
310
|
+
\t\tfunction isIE6sp1()\r\n\
|
311
|
+
\t\t{\r\n\
|
312
|
+
\t\t\tvar nVerOffset = navigator.appVersion.indexOf(\"MSIE \");\r\n\
|
313
|
+
\t\t\tif( nVerOffset == -1 ) return true;\r\n\
|
314
|
+
\t\t\t\r\n\
|
315
|
+
\t\t\tvar nVersion = parseFloat(navigator.appVersion.substring(nVerOffset + 5, nVerOffset + 8));\r\n\
|
316
|
+
\r\n\
|
317
|
+
\t\t\tif (!isNaN(nVersion))\r\n\
|
318
|
+
\t\t\t{\r\n\
|
319
|
+
\t\t\t\tif (nVersion > 6)\r\n\
|
320
|
+
\t\t\t\t{\r\n\
|
321
|
+
\t\t\t\t\treturn true;\r\n\
|
322
|
+
\t\t\t\t}\r\n\
|
323
|
+
\t\t\t\telse if (nVersion == 6)\r\n\
|
324
|
+
\t\t\t\t{\r\n\
|
325
|
+
\t\t\t\t\tvar nSPOffset = navigator.appMinorVersion.indexOf(\"SP\");\r\n\
|
326
|
+
\t\t\t\t\tif (nSPOffset != -1)\r\n\
|
327
|
+
\t\t\t\t\t{\r\n\
|
328
|
+
\t\t\t\t\t\tvar nVerSP = parseInt(navigator.appMinorVersion.substring(nSPOffset + 2, nSPOffset + 3), 10);\r\n\
|
329
|
+
\t\t\t\t\t\tif (!isNaN(nVerSP) && (nVerSP >= 1))\r\n\
|
330
|
+
\t\t\t\t\t\t\treturn true;\r\n\
|
331
|
+
\t\t\t\t\t}\r\n\
|
332
|
+
\t\t\t\t\t\r\n\
|
333
|
+
\t\t\t\t\tvar strIEFullVersion = oClientCaps.getComponentVersion(\"{89820200-ECBD-11CF-8B85-00AA005B4383}\",\"ComponentID\");\t\t\t\t\t\r\n\
|
334
|
+
\t\t\t\t\tif (strIEFullVersion != null)\r\n\
|
335
|
+
\t\t\t\t\t{\r\n\
|
336
|
+
\t\t\t\t\t\tvar aVersionPart = strIEFullVersion.split(\",\");\r\n\
|
337
|
+
\t\t\t\t\t\tif( aVersionPart != null && aVersionPart.length > 3 )\r\n\
|
338
|
+
\t\t\t\t\t\t{\t\t\t\t\t\t\t\r\n\
|
339
|
+
\t\t\t\t\t\t\tvar nBuildNum = parseInt(aVersionPart[2], 10);\r\n\
|
340
|
+
\t\t\t\t\t\t\tif( !isNaN(nBuildNum) && nBuildNum >= 3790 )\r\n\
|
341
|
+
\t\t\t\t\t\t\t\treturn true;\r\n\
|
342
|
+
\t\t\t\t\t\t}\r\n\
|
343
|
+
\t\t\t\t\t}\t\t\t\t\t\r\n\
|
344
|
+
\t\t\t\t}\r\n\
|
345
|
+
\t\t\t}\r\n\
|
346
|
+
\t\t\treturn false;\r\n\
|
347
|
+
\t\t}\r\n\
|
348
|
+
\r\n\
|
349
|
+
\t\tfunction onLoad()\r\n\
|
350
|
+
\t\t{\r\n\
|
351
|
+
\t\t\tif (top.header != null)\r\n\
|
352
|
+
\t\t\t{\r\n\
|
353
|
+
\t\t\t\ttop.location = \"logon.aspx\";\r\n\
|
354
|
+
\t\t\t}\r\n\
|
355
|
+
\t\t\t\r\n\
|
356
|
+
\t\t\t\r\n\
|
357
|
+
\t\t\t\t\tif(g_bFocus && document.logon.txtUserName.value == \"\")\r\n\
|
358
|
+
\t\t\t\t\t{\r\n\
|
359
|
+
\t\t\t\t\t\tdocument.logon.txtUserName.focus();\r\n\
|
360
|
+
\t\t\t\t\t}\r\n\
|
361
|
+
\t\t\t\r\n\
|
362
|
+
\t\t\t\r\n\
|
363
|
+
\t\t\t// Clear the cache at all times\r\n\
|
364
|
+
\t\t\tdocument.execCommand(\"ClearAuthenticationCache\",\"false\");\t\t\t\r\n\
|
365
|
+
\t\t\tdocument.cookie = \"IE6SP1=\" + isIE6sp1();\r\n\
|
366
|
+
\t\t\t\r\n\
|
367
|
+
\t\t\tvar nVerOffset = navigator.appVersion.indexOf(\"MSIE \");\r\n\
|
368
|
+
\t\t\tif( nVerOffset != -1 )\r\n\
|
369
|
+
\t\t\t{\r\n\
|
370
|
+
\t\t\t if (isIE6sp1())\r\n\
|
371
|
+
\t\t\t {\r\n\
|
372
|
+
\t\t\t var bFound = false;\r\n\
|
373
|
+
\t\t\t var aCookie = document.cookie.split(\"; \");\r\n\
|
374
|
+
\t\t\t for (var i = 0; i < aCookie.length && !bFound; i++)\r\n\
|
375
|
+
\t\t\t {\r\n\
|
376
|
+
\t\t\t var aCrumb = aCookie[i].split(\"=\");\r\n\
|
377
|
+
\t\t\t if (aCrumb[0] == \"Trusted\")\r\n\
|
378
|
+
\t\t\t {\r\n\
|
379
|
+
\t\t\t if (document.logon.checkPublic != null)\r\n\
|
380
|
+
\t\t\t {\r\n\
|
381
|
+
\t\t\t if (aCrumb[1] == \"True\")\r\n\
|
382
|
+
\t\t\t document.logon.checkPublic.checked = true;\r\n\
|
383
|
+
\t\t\t else if (aCrumb[1] == \"False\")\r\n\
|
384
|
+
\t\t\t document.logon.checkPublic.checked = false;\r\n\
|
385
|
+
\t\t\t }\r\n\
|
386
|
+
\t\t\t else if (document.logon.checkPublic2 != null)\r\n\
|
387
|
+
\t\t\t {\r\n\
|
388
|
+
\t\t\t if (aCrumb[1] == \"True\")\r\n\
|
389
|
+
\t\t\t document.logon.checkPublic2.checked = true;\r\n\
|
390
|
+
\t\t\t else if (aCrumb[1] == \"False\")\r\n\
|
391
|
+
\t\t\t document.logon.checkPublic2.checked = false;\r\n\
|
392
|
+
\t\t\t }\r\n\
|
393
|
+
\t\t\t bFound = true;\r\n\
|
394
|
+
\t\t\t } \r\n\
|
395
|
+
\t\t\t } \r\n\
|
396
|
+
\t\t\t }\r\n\
|
397
|
+
\t\t\t}\r\n\
|
398
|
+
\t\t}\r\n\
|
399
|
+
\t\t\t\t\r\n\
|
400
|
+
\t\tfunction validatePwd()\r\n\
|
401
|
+
\t\t{\r\n\
|
402
|
+
\t\t\tif (document.logon.txtChangeUserPassNew.value != document.logon.txtChangeUserPassConfirm.value)\r\n\
|
403
|
+
\t\t\t{\r\n\
|
404
|
+
\t\t\t\talert('The new password and the confirmation password do not match. Type the same password in both boxes.');\r\n\
|
405
|
+
\t\t\t\treturn false;\r\n\
|
406
|
+
\t\t\t}\r\n\
|
407
|
+
\t\t}\r\n\
|
408
|
+
\t\t</script>\r\n\
|
409
|
+
\t</HEAD>\r\n\
|
410
|
+
\t<body MS_POSITIONING=\"GridLayout\" onload=\"onLoad()\" bgcolor=\"#3A6EA5\">\r\n\
|
411
|
+
\t\t<IE:CLIENTCAPS ID=\"oClientCaps\" />\r\n\
|
412
|
+
\t\t<form name=\"logon\" method=\"post\" action=\"logon.aspx\" id=\"logon\" autocomplete=\"off\">\r\n\
|
413
|
+
<input type=\"hidden\" name=\"__VIEWSTATE\" value=\"dDwtMTk3ODkzNzE3NTt0PHA8bDxydXBGYWlsZWQ7cnVwUGFnZU1vZGU7PjtsPG88dD47Rm9ybVNhbXBsZTEubG9nb24rUEFHRV9NT0RFLCBSRU1PVEUsIFZlcnNpb249NS4yLjI4OTMuMCwgQ3VsdHVyZT1uZXV0cmFs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EticHMpO0Jyb2FkYmFuZDtTbWFsbCBCdXNpbmVzcyBOZXR3b3JrOz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDxJJ20gdXNpbmcgYSBwdWJsaWMgb3Igc2hhcmVkIGNvbXB1dGVyOz4+Oz47Oz47Pj47Pj47Pj47bDxjaGVja1B1YmxpYzs+PpjJDAqgrrmMtffzGr3wkWZMJ7vw\" />\r\n\
|
414
|
+
\r\n\
|
415
|
+
\t\t\t\r\n\
|
416
|
+
\t\t\t<table id=\"panelLogon\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td>\r\n\
|
417
|
+
\r\n\
|
418
|
+
\t\t\t\t<table align=center cellpadding=\"0\" cellspacing=\"0\" width=\"448px\" border=\"0\" ID=\"Table5\">\t\t\t\t\t\r\n\
|
419
|
+
\t\t\t\t\t<tr height=\"100px\"><td> </td></tr>\r\n\
|
420
|
+
\t\t\t\t\t<tr height=\"110px\">\r\n\
|
421
|
+
\t\t\t\t\t\t<td>\r\n\
|
422
|
+
\t\t\t\t\t\t\t<table width=\"448px\" height=\"110px\" cellspacing=\"12\" class=\"headerBackground\" ID=\"Table6\">\r\n\
|
423
|
+
\t\t\t\t\t\t\t\t<tr height=\"20px\"><td> </td></tr>\r\n\
|
424
|
+
\t\t\t\t\t\t\t\t<tr height=\"52px\">\r\n\
|
425
|
+
\t\t\t\t\t\t\t\t\t<td width=\"51px\"> </td>\r\n\
|
426
|
+
\t\t\t\t\t\t\t\t\t<td width=\"32px\"><img src=\"images/winxp.gif\"></td>\r\n\
|
427
|
+
\t\t\t\t\t\t\t\t\t<td>\r\n\
|
428
|
+
\t\t\t\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ID=\"Table7\" height=\"32px\">\r\n\
|
429
|
+
\t\t\t\t\t\t\t\t\t\t\t<tr><td class=\"subHeader\">\tHectic Electric</td></tr>\r\n\
|
430
|
+
\t\t\t\t\t\t\t\t\t\t\t<tr><td class=\"headerLogo\">Remote Web Workplace</td></tr>\r\n\
|
431
|
+
\t\t\t\t\t\t\t\t\t\t</table>\r\n\
|
432
|
+
\t\t\t\t\t\t\t\t\t</td>\r\n\
|
433
|
+
\t\t\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\r\n\
|
434
|
+
\t\t\t\t\t\t\t</table>\r\n\
|
435
|
+
\t\t\t\t\t\t</td>\r\n\
|
436
|
+
\t\t\t\t\t</tr>\r\n\
|
437
|
+
\t\t\t\t\t<tr>\r\n\
|
438
|
+
\t\t\t\t\t\t<td class=linkText>\r\n\
|
439
|
+
\t\t\t\t\t\t\t<table bgcolor=White ID=\"Table8\" width=\"448px\" cellspacing=\"12\">\r\n\
|
440
|
+
\t\t\t\t\t\t\t\t\r\n\
|
441
|
+
\t\t\t\t\t\t\t\t<tr>\t\t\t\t\t\t\t\t\r\n\
|
442
|
+
\t\t\t\t\t\t\t\t\t<td colspan=3 bgcolor=#FFFFCC style=\"BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; BORDER-BOTTOM: gray 1px solid\">\r\n\
|
443
|
+
\t\t\t\t\t\t\t\t\t\t<table ID=\"Table9\" cellspacing=\"12\">\r\n\
|
444
|
+
\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\
|
445
|
+
\t\t\t\t\t\t\t\t\t\t\t\t<td width=16px><img src='images/stop.gif'></td>\r\n\
|
446
|
+
\t\t\t\t\t\t\t\t\t\t\t\t<td class=linkText width=360px>The user name or password is incorrect. Verify that CAPS LOCK is not on, and then retype the current user name and password. If you receive this message again, contact your system administrator to ensure that you have the correct permissions to use the Remote Web Workplace.</td>\r\n\
|
447
|
+
\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\
|
448
|
+
\t\t\t\t\t\t\t\t\t\t</table>\r\n\
|
449
|
+
\t\t\t\t\t\t\t\t\t</td>\r\n\
|
450
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
451
|
+
\t\t\t\t\t\t\t\t\r\n\
|
452
|
+
\t\t\t\t\t\t\t\t\r\n\
|
453
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
454
|
+
\t\t\t\t\t\t\t\t\t<td align=right class=linkText>User name:</td>\r\n\
|
455
|
+
\t\t\t\t\t\t\t\t\t<TD class=\"linkText\"><input name=\"txtUserName\" id=\"txtUserName\" type=\"text\" tabIndex=\"1\" style=\"WIDTH:288px;\" value=\"julik\" /></TD>\r\n\
|
456
|
+
\t\t\t\t\t\t\t\t\t<td class=\"linkText\"></td>\r\n\
|
457
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
458
|
+
\t\t\t\t\t\t\t\t\r\n\
|
459
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
460
|
+
\t\t\t\t\t\t\t\t\t<td align=right class=linkText>Password:</td>\r\n\
|
461
|
+
\t\t\t\t\t\t\t\t\t<TD class=\"linkText\"><input name=\"txtUserPass\" id=\"txtUserPass\" type=\"password\" tabIndex=\"2\" onfocus=\"g_bFocus=false;\" style=\"WIDTH:288px;\" /></TD>\t\t\t\t\t\t\t\t\t\r\n\
|
462
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
463
|
+
\t\t\t\t\t\t\t\t\r\n\
|
464
|
+
\t\t\t\t\t\t\t\t<tr height=\"20px\">\r\n\
|
465
|
+
\t\t\t\t\t\t\t\t\t<td colspan=3 align=right><input name=\"cmdLogin\" id=\"cmdLogin\" type=\"submit\" tabIndex=\"3\" value=\"Log On\" /></td>\r\n\
|
466
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
467
|
+
\t\t\t\t\t\t\t\t\r\n\
|
468
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
469
|
+
\t\t\t\t\t\t\t\t\t<td align=right class=linkText>Connection speed:</td>\r\n\
|
470
|
+
\t\t\t\t\t\t\t\t\t<td><select name=\"listSpeed\" id=\"listSpeed\" tabindex=\"4\" class=\"linkText\">\r\n\
|
471
|
+
\t\t<option value=\"Modem (28.8 Kbps)\">Modem (28.8 Kbps)</option>\r\n\
|
472
|
+
\t\t<option value=\"Modem (56 Kbps)\">Modem (56 Kbps)</option>\r\n\
|
473
|
+
\t\t<option selected=\"selected\" value=\"Broadband\">Broadband</option>\r\n\
|
474
|
+
\t\t<option value=\"Small Business Network\">Small Business Network</option>\r\n\
|
475
|
+
\r\n\
|
476
|
+
\t</select></td>\r\n\
|
477
|
+
\t\t\t\t\t\t\t\t\t<td class=\"linkText\"></td>\r\n\
|
478
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
479
|
+
\t\t\t\t\t\t\t\t\r\n\
|
480
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
481
|
+
\t\t\t\t\t\t\t\t\t<td></td>\r\n\
|
482
|
+
\t\t\t\t\t\t\t\t\t<td><span class=\"linkText\"><input id=\"checkPublic\" type=\"checkbox\" name=\"checkPublic\" tabindex=\"5\" /><label for=\"checkPublic\">I'm using a public or shared computer</label></span></td>\r\n\
|
483
|
+
\t\t\t\t\t\t\t\t\t<td class=\"linkText\"></td>\r\n\
|
484
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
485
|
+
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\
|
486
|
+
\t\t\t\t\t\t\t\t<tr height=\"20px\"><td colspan=3 align=right><img src=\"images/RwwOEMLogo.gif\"></td></tr>\r\n\
|
487
|
+
\t\t\t\t\t\t\t</table>\r\n\
|
488
|
+
\t\t\t\t\t\t</td>\r\n\
|
489
|
+
\t\t\t\t\t</tr>\t\t\t\t\t\r\n\
|
490
|
+
\t\t\t\t</table>\r\n\
|
491
|
+
\t\t\t\r\n\
|
492
|
+
</td></tr></table>\r\n\
|
493
|
+
\t\t</form>\r\n\
|
494
|
+
\t</body>\r\n\
|
495
|
+
</HTML>\r\n"
|
496
|
+
http_version: "1.1"
|
@@ -0,0 +1,288 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: https://mail.enterprise.co.uk:443/Remote/logon.aspx?ReturnUrl=/Remote/Default.aspx
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
response: !ruby/struct:VCR::Response
|
9
|
+
status: !ruby/struct:VCR::ResponseStatus
|
10
|
+
code: 200
|
11
|
+
message: OK
|
12
|
+
headers:
|
13
|
+
date:
|
14
|
+
- Sat, 02 Jul 2011 20:44:29 GMT
|
15
|
+
server:
|
16
|
+
- Microsoft-IIS/6.0
|
17
|
+
microsoftofficewebserver:
|
18
|
+
- 5.0_Pub
|
19
|
+
x-powered-by:
|
20
|
+
- ASP.NET
|
21
|
+
x-aspnet-version:
|
22
|
+
- 1.1.4322
|
23
|
+
cache-control:
|
24
|
+
- no-cache
|
25
|
+
pragma:
|
26
|
+
- no-cache
|
27
|
+
expires:
|
28
|
+
- "-1"
|
29
|
+
content-type:
|
30
|
+
- text/html; charset=utf-8
|
31
|
+
content-length:
|
32
|
+
- "8779"
|
33
|
+
body: "\r\n\
|
34
|
+
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" >\r\n\
|
35
|
+
\r\n\
|
36
|
+
<HTML xmlns:IE>\r\n\
|
37
|
+
\t<HEAD>\r\n\
|
38
|
+
\t\t<title>Hectic Electric Remote Web Workplace</title>\r\n\
|
39
|
+
\t\t<meta name=\"GENERATOR\" Content=\"Microsoft Visual Studio 7.0\">\r\n\
|
40
|
+
\t\t<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\r\n\
|
41
|
+
\t\t<META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">\r\n\
|
42
|
+
\t\t<meta name=\"CODE_LANGUAGE\" Content=\"C#\">\r\n\
|
43
|
+
\t\t<meta name=\"vs_defaultClientScript\" content=\"JavaScript\">\r\n\
|
44
|
+
\t\t<meta name=\"vs_targetSchema\" content=\"http://schemas.microsoft.com/intellisense/ie5\">\r\n\
|
45
|
+
\t\t<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, NOFOLLOW\">\r\n\
|
46
|
+
\t\t<STYLE>\r\n\
|
47
|
+
\t\t .headerBackground { background-image: url(images/login.gif); background-repeat: no-repeat; }\r\n\
|
48
|
+
\t\t\t.headerLogo { FONT-SIZE: 14pt; FONT-WEIGHT: bold; COLOR: white; FONT-FAMILY: Tahoma } \r\n\
|
49
|
+
\t\t\t.subHeader { FONT-SIZE: 12pt; COLOR: white; FONT-FAMILY: Tahoma }\r\n\
|
50
|
+
\t\t\t.linkText { FONT-SIZE: 80%; COLOR: black; FONT-FAMILY: Tahoma }\r\n\
|
51
|
+
\t\t\tA { COLOR: #183c84; TEXT-DECORATION: none } \r\n\
|
52
|
+
\t\t\tA:hover { TEXT-DECORATION: underline } \r\n\
|
53
|
+
\t\t\tA:visited { COLOR: #183c84 } \r\n\
|
54
|
+
\t\t\t\r\n\
|
55
|
+
\t\t\t@media all \r\n\
|
56
|
+
\t\t\t{\r\n\
|
57
|
+
\t\t\t\tIE\\:clientCaps { behavior:url(#default#clientcaps) }\r\n\
|
58
|
+
\t\t\t}\t\t\r\n\
|
59
|
+
\t\t</STYLE>\r\n\
|
60
|
+
\t\t<script language=\"javascript\">\r\n\
|
61
|
+
\t\t\r\n\
|
62
|
+
\t\tvar g_bFocus = true;\r\n\
|
63
|
+
\t\t\t\r\n\
|
64
|
+
\t\tfunction isIE6sp1()\r\n\
|
65
|
+
\t\t{\r\n\
|
66
|
+
\t\t\tvar nVerOffset = navigator.appVersion.indexOf(\"MSIE \");\r\n\
|
67
|
+
\t\t\tif( nVerOffset == -1 ) return true;\r\n\
|
68
|
+
\t\t\t\r\n\
|
69
|
+
\t\t\tvar nVersion = parseFloat(navigator.appVersion.substring(nVerOffset + 5, nVerOffset + 8));\r\n\
|
70
|
+
\r\n\
|
71
|
+
\t\t\tif (!isNaN(nVersion))\r\n\
|
72
|
+
\t\t\t{\r\n\
|
73
|
+
\t\t\t\tif (nVersion > 6)\r\n\
|
74
|
+
\t\t\t\t{\r\n\
|
75
|
+
\t\t\t\t\treturn true;\r\n\
|
76
|
+
\t\t\t\t}\r\n\
|
77
|
+
\t\t\t\telse if (nVersion == 6)\r\n\
|
78
|
+
\t\t\t\t{\r\n\
|
79
|
+
\t\t\t\t\tvar nSPOffset = navigator.appMinorVersion.indexOf(\"SP\");\r\n\
|
80
|
+
\t\t\t\t\tif (nSPOffset != -1)\r\n\
|
81
|
+
\t\t\t\t\t{\r\n\
|
82
|
+
\t\t\t\t\t\tvar nVerSP = parseInt(navigator.appMinorVersion.substring(nSPOffset + 2, nSPOffset + 3), 10);\r\n\
|
83
|
+
\t\t\t\t\t\tif (!isNaN(nVerSP) && (nVerSP >= 1))\r\n\
|
84
|
+
\t\t\t\t\t\t\treturn true;\r\n\
|
85
|
+
\t\t\t\t\t}\r\n\
|
86
|
+
\t\t\t\t\t\r\n\
|
87
|
+
\t\t\t\t\tvar strIEFullVersion = oClientCaps.getComponentVersion(\"{89820200-ECBD-11CF-8B85-00AA005B4383}\",\"ComponentID\");\t\t\t\t\t\r\n\
|
88
|
+
\t\t\t\t\tif (strIEFullVersion != null)\r\n\
|
89
|
+
\t\t\t\t\t{\r\n\
|
90
|
+
\t\t\t\t\t\tvar aVersionPart = strIEFullVersion.split(\",\");\r\n\
|
91
|
+
\t\t\t\t\t\tif( aVersionPart != null && aVersionPart.length > 3 )\r\n\
|
92
|
+
\t\t\t\t\t\t{\t\t\t\t\t\t\t\r\n\
|
93
|
+
\t\t\t\t\t\t\tvar nBuildNum = parseInt(aVersionPart[2], 10);\r\n\
|
94
|
+
\t\t\t\t\t\t\tif( !isNaN(nBuildNum) && nBuildNum >= 3790 )\r\n\
|
95
|
+
\t\t\t\t\t\t\t\treturn true;\r\n\
|
96
|
+
\t\t\t\t\t\t}\r\n\
|
97
|
+
\t\t\t\t\t}\t\t\t\t\t\r\n\
|
98
|
+
\t\t\t\t}\r\n\
|
99
|
+
\t\t\t}\r\n\
|
100
|
+
\t\t\treturn false;\r\n\
|
101
|
+
\t\t}\r\n\
|
102
|
+
\r\n\
|
103
|
+
\t\tfunction onLoad()\r\n\
|
104
|
+
\t\t{\r\n\
|
105
|
+
\t\t\tif (top.header != null)\r\n\
|
106
|
+
\t\t\t{\r\n\
|
107
|
+
\t\t\t\ttop.location = \"logon.aspx\";\r\n\
|
108
|
+
\t\t\t}\r\n\
|
109
|
+
\t\t\t\r\n\
|
110
|
+
\t\t\t\r\n\
|
111
|
+
\t\t\t\t\tif(g_bFocus && document.logon.txtUserName.value == \"\")\r\n\
|
112
|
+
\t\t\t\t\t{\r\n\
|
113
|
+
\t\t\t\t\t\tdocument.logon.txtUserName.focus();\r\n\
|
114
|
+
\t\t\t\t\t}\r\n\
|
115
|
+
\t\t\t\r\n\
|
116
|
+
\t\t\t\r\n\
|
117
|
+
\t\t\t// Clear the cache at all times\r\n\
|
118
|
+
\t\t\tdocument.execCommand(\"ClearAuthenticationCache\",\"false\");\t\t\t\r\n\
|
119
|
+
\t\t\tdocument.cookie = \"IE6SP1=\" + isIE6sp1();\r\n\
|
120
|
+
\t\t\t\r\n\
|
121
|
+
\t\t\tvar nVerOffset = navigator.appVersion.indexOf(\"MSIE \");\r\n\
|
122
|
+
\t\t\tif( nVerOffset != -1 )\r\n\
|
123
|
+
\t\t\t{\r\n\
|
124
|
+
\t\t\t if (isIE6sp1())\r\n\
|
125
|
+
\t\t\t {\r\n\
|
126
|
+
\t\t\t var bFound = false;\r\n\
|
127
|
+
\t\t\t var aCookie = document.cookie.split(\"; \");\r\n\
|
128
|
+
\t\t\t for (var i = 0; i < aCookie.length && !bFound; i++)\r\n\
|
129
|
+
\t\t\t {\r\n\
|
130
|
+
\t\t\t var aCrumb = aCookie[i].split(\"=\");\r\n\
|
131
|
+
\t\t\t if (aCrumb[0] == \"Trusted\")\r\n\
|
132
|
+
\t\t\t {\r\n\
|
133
|
+
\t\t\t if (document.logon.checkPublic != null)\r\n\
|
134
|
+
\t\t\t {\r\n\
|
135
|
+
\t\t\t if (aCrumb[1] == \"True\")\r\n\
|
136
|
+
\t\t\t document.logon.checkPublic.checked = true;\r\n\
|
137
|
+
\t\t\t else if (aCrumb[1] == \"False\")\r\n\
|
138
|
+
\t\t\t document.logon.checkPublic.checked = false;\r\n\
|
139
|
+
\t\t\t }\r\n\
|
140
|
+
\t\t\t else if (document.logon.checkPublic2 != null)\r\n\
|
141
|
+
\t\t\t {\r\n\
|
142
|
+
\t\t\t if (aCrumb[1] == \"True\")\r\n\
|
143
|
+
\t\t\t document.logon.checkPublic2.checked = true;\r\n\
|
144
|
+
\t\t\t else if (aCrumb[1] == \"False\")\r\n\
|
145
|
+
\t\t\t document.logon.checkPublic2.checked = false;\r\n\
|
146
|
+
\t\t\t }\r\n\
|
147
|
+
\t\t\t bFound = true;\r\n\
|
148
|
+
\t\t\t } \r\n\
|
149
|
+
\t\t\t } \r\n\
|
150
|
+
\t\t\t }\r\n\
|
151
|
+
\t\t\t}\r\n\
|
152
|
+
\t\t}\r\n\
|
153
|
+
\t\t\t\t\r\n\
|
154
|
+
\t\tfunction validatePwd()\r\n\
|
155
|
+
\t\t{\r\n\
|
156
|
+
\t\t\tif (document.logon.txtChangeUserPassNew.value != document.logon.txtChangeUserPassConfirm.value)\r\n\
|
157
|
+
\t\t\t{\r\n\
|
158
|
+
\t\t\t\talert('The new password and the confirmation password do not match. Type the same password in both boxes.');\r\n\
|
159
|
+
\t\t\t\treturn false;\r\n\
|
160
|
+
\t\t\t}\r\n\
|
161
|
+
\t\t}\r\n\
|
162
|
+
\t\t</script>\r\n\
|
163
|
+
\t</HEAD>\r\n\
|
164
|
+
\t<body MS_POSITIONING=\"GridLayout\" onload=\"onLoad()\" bgcolor=\"#3A6EA5\">\r\n\
|
165
|
+
\t\t<IE:CLIENTCAPS ID=\"oClientCaps\" />\r\n\
|
166
|
+
\t\t<form name=\"logon\" method=\"post\" action=\"logon.aspx?ReturnUrl=%2fRemote%2fDefault.asp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Gw8c3R5bGU7PjtsPFdJRFRIOjI4OHB4XDs7Pj47Oz47dDxwPGw8dmFsdWU7PjtsPExvZyBPbjs+Pjs7Pjt0PHQ8O3Q8aTw0PjtAPE1vZGVtICgyOC44IEticHMpO01vZGVtICg1NiBLYnBzKTtCcm9hZGJhbmQ7U21hbGwgQnVzaW5lc3MgTmV0d29yazs+O0A8TW9kZW0gKDI4LjggS2Jwcyk7TW9kZW0gKDU2IEticHMpO0Jyb2FkYmFuZDtTbWFsbCBCdXNpbmVzcyBOZXR3b3JrOz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDxJJ20gdXNpbmcgYSBwdWJsaWMgb3Igc2hhcmVkIGNvbXB1dGVyOz4+Oz47Oz47Pj47Pj47Pj47bDxjaGVja1B1YmxpYzs+PnyFSxZizxHwX9XoFsADoxqhiqak\" />\r\n\
|
168
|
+
\r\n\
|
169
|
+
\t\t\t\r\n\
|
170
|
+
\t\t\t<table id=\"panelLogon\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td>\r\n\
|
171
|
+
\r\n\
|
172
|
+
\t\t\t\t<table align=center cellpadding=\"0\" cellspacing=\"0\" width=\"448px\" border=\"0\" ID=\"Table5\">\t\t\t\t\t\r\n\
|
173
|
+
\t\t\t\t\t<tr height=\"100px\"><td> </td></tr>\r\n\
|
174
|
+
\t\t\t\t\t<tr height=\"110px\">\r\n\
|
175
|
+
\t\t\t\t\t\t<td>\r\n\
|
176
|
+
\t\t\t\t\t\t\t<table width=\"448px\" height=\"110px\" cellspacing=\"12\" class=\"headerBackground\" ID=\"Table6\">\r\n\
|
177
|
+
\t\t\t\t\t\t\t\t<tr height=\"20px\"><td> </td></tr>\r\n\
|
178
|
+
\t\t\t\t\t\t\t\t<tr height=\"52px\">\r\n\
|
179
|
+
\t\t\t\t\t\t\t\t\t<td width=\"51px\"> </td>\r\n\
|
180
|
+
\t\t\t\t\t\t\t\t\t<td width=\"32px\"><img src=\"images/winxp.gif\"></td>\r\n\
|
181
|
+
\t\t\t\t\t\t\t\t\t<td>\r\n\
|
182
|
+
\t\t\t\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" ID=\"Table7\" height=\"32px\">\r\n\
|
183
|
+
\t\t\t\t\t\t\t\t\t\t\t<tr><td class=\"subHeader\">\tHectic Electric</td></tr>\r\n\
|
184
|
+
\t\t\t\t\t\t\t\t\t\t\t<tr><td class=\"headerLogo\">Remote Web Workplace</td></tr>\r\n\
|
185
|
+
\t\t\t\t\t\t\t\t\t\t</table>\r\n\
|
186
|
+
\t\t\t\t\t\t\t\t\t</td>\r\n\
|
187
|
+
\t\t\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\r\n\
|
188
|
+
\t\t\t\t\t\t\t</table>\r\n\
|
189
|
+
\t\t\t\t\t\t</td>\r\n\
|
190
|
+
\t\t\t\t\t</tr>\r\n\
|
191
|
+
\t\t\t\t\t<tr>\r\n\
|
192
|
+
\t\t\t\t\t\t<td class=linkText>\r\n\
|
193
|
+
\t\t\t\t\t\t\t<table bgcolor=White ID=\"Table8\" width=\"448px\" cellspacing=\"12\">\r\n\
|
194
|
+
\t\t\t\t\t\t\t\t\r\n\
|
195
|
+
\t\t\t\t\t\t\t\t<tr height=\"15px\">\r\n\
|
196
|
+
\t\t\t\t\t\t\t\t\t<td colspan=3> </td>\r\n\
|
197
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
198
|
+
\t\t\t\t\t\t\t\t\r\n\
|
199
|
+
\t\t\t\t\t\t\t\t\r\n\
|
200
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
201
|
+
\t\t\t\t\t\t\t\t\t<td align=right class=linkText>User name:</td>\r\n\
|
202
|
+
\t\t\t\t\t\t\t\t\t<TD class=\"linkText\"><input name=\"txtUserName\" id=\"txtUserName\" type=\"text\" tabIndex=\"1\" style=\"WIDTH:288px;\" /></TD>\r\n\
|
203
|
+
\t\t\t\t\t\t\t\t\t<td class=\"linkText\"></td>\r\n\
|
204
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
205
|
+
\t\t\t\t\t\t\t\t\r\n\
|
206
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
207
|
+
\t\t\t\t\t\t\t\t\t<td align=right class=linkText>Password:</td>\r\n\
|
208
|
+
\t\t\t\t\t\t\t\t\t<TD class=\"linkText\"><input name=\"txtUserPass\" id=\"txtUserPass\" type=\"password\" tabIndex=\"2\" onfocus=\"g_bFocus=false;\" style=\"WIDTH:288px;\" /></TD>\t\t\t\t\t\t\t\t\t\r\n\
|
209
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
210
|
+
\t\t\t\t\t\t\t\t\r\n\
|
211
|
+
\t\t\t\t\t\t\t\t<tr height=\"20px\">\r\n\
|
212
|
+
\t\t\t\t\t\t\t\t\t<td colspan=3 align=right><input name=\"cmdLogin\" id=\"cmdLogin\" type=\"submit\" tabIndex=\"3\" value=\"Log On\" /></td>\r\n\
|
213
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
214
|
+
\t\t\t\t\t\t\t\t\r\n\
|
215
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
216
|
+
\t\t\t\t\t\t\t\t\t<td align=right class=linkText>Connection speed:</td>\r\n\
|
217
|
+
\t\t\t\t\t\t\t\t\t<td><select name=\"listSpeed\" id=\"listSpeed\" tabindex=\"4\" class=\"linkText\">\r\n\
|
218
|
+
\t\t<option value=\"Modem (28.8 Kbps)\">Modem (28.8 Kbps)</option>\r\n\
|
219
|
+
\t\t<option value=\"Modem (56 Kbps)\">Modem (56 Kbps)</option>\r\n\
|
220
|
+
\t\t<option selected=\"selected\" value=\"Broadband\">Broadband</option>\r\n\
|
221
|
+
\t\t<option value=\"Small Business Network\">Small Business Network</option>\r\n\
|
222
|
+
\r\n\
|
223
|
+
\t</select></td>\r\n\
|
224
|
+
\t\t\t\t\t\t\t\t\t<td class=\"linkText\"></td>\r\n\
|
225
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
226
|
+
\t\t\t\t\t\t\t\t\r\n\
|
227
|
+
\t\t\t\t\t\t\t\t<tr>\r\n\
|
228
|
+
\t\t\t\t\t\t\t\t\t<td></td>\r\n\
|
229
|
+
\t\t\t\t\t\t\t\t\t<td><span class=\"linkText\"><input id=\"checkPublic\" type=\"checkbox\" name=\"checkPublic\" checked=\"checked\" tabindex=\"5\" /><label for=\"checkPublic\">I'm using a public or shared computer</label></span></td>\r\n\
|
230
|
+
\t\t\t\t\t\t\t\t\t<td class=\"linkText\"></td>\r\n\
|
231
|
+
\t\t\t\t\t\t\t\t</tr>\r\n\
|
232
|
+
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\
|
233
|
+
\t\t\t\t\t\t\t\t<tr height=\"20px\"><td colspan=3 align=right><img src=\"images/RwwOEMLogo.gif\"></td></tr>\r\n\
|
234
|
+
\t\t\t\t\t\t\t</table>\r\n\
|
235
|
+
\t\t\t\t\t\t</td>\r\n\
|
236
|
+
\t\t\t\t\t</tr>\t\t\t\t\t\r\n\
|
237
|
+
\t\t\t\t</table>\r\n\
|
238
|
+
\t\t\t\r\n\
|
239
|
+
</td></tr></table>\r\n\
|
240
|
+
\t\t</form>\r\n\
|
241
|
+
\t</body>\r\n\
|
242
|
+
</HTML>\r\n"
|
243
|
+
http_version: "1.1"
|
244
|
+
- !ruby/struct:VCR::HTTPInteraction
|
245
|
+
request: !ruby/struct:VCR::Request
|
246
|
+
method: :post
|
247
|
+
uri: https://mail.enterprise.co.uk:443/Remote/logon.aspx
|
248
|
+
body: txtUserName=julik&txtUserPass=secret&cmdLogin=cmdLogin&listSpeed=Broadband&__VIEWSTATE=dDwtMTk3ODkzNzE3NTt0PHA8bDxydXBGYWlsZWQ7cnVwUGFnZU1vZGU7PjtsPG88Zj47Rm9ybVNhbXBsZTEubG9nb24rUEFHRV9NT0RFLCBSRU1PVEUsIFZlcnNpb249NS4yLjI4OTMuMCwgQ3VsdHVyZT1uZX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A8TW9kZW0gKDI4LjggS2Jwcyk7TW9kZW0gKDU2IEticHMpO0Jyb2FkYmFuZDtTbWFsbCBCdXNpbmVzcyBOZXR3b3JrOz4%2bOz47Oz47dDxwPHA8bDxUZXh0Oz47bDxJJ20gdXNpbmcgYSBwdWJsaWMgb3Igc2hhcmVkIGNvbXB1dGVyOz4%2bOz47Oz47Pj47Pj47Pj47bDxjaGVja1B1YmxpYzs%2bPnyFSxZizxHwX9XoFsADoxqhiqak
|
249
|
+
headers:
|
250
|
+
content-type:
|
251
|
+
- application/x-www-form-urlencoded
|
252
|
+
response: !ruby/struct:VCR::Response
|
253
|
+
status: !ruby/struct:VCR::ResponseStatus
|
254
|
+
code: 302
|
255
|
+
message: Found
|
256
|
+
headers:
|
257
|
+
date:
|
258
|
+
- Sat, 02 Jul 2011 20:44:29 GMT
|
259
|
+
server:
|
260
|
+
- Microsoft-IIS/6.0
|
261
|
+
microsoftofficewebserver:
|
262
|
+
- 5.0_Pub
|
263
|
+
x-powered-by:
|
264
|
+
- ASP.NET
|
265
|
+
x-aspnet-version:
|
266
|
+
- 1.1.4322
|
267
|
+
location:
|
268
|
+
- /Remote/default.aspx
|
269
|
+
set-cookie:
|
270
|
+
- ASP.NET_SessionId=ff20nea4hbn03l45532irpmk; path=/
|
271
|
+
- RUPSpeed=2; expires=Fri, 30-Sep-2011 20:44:29 GMT; path=/
|
272
|
+
- RemotePortalAuth=CF8D8E7DFD44D85ABA722C1F34362B823C7B2CCCEFB0E75E956F68C190A29A80BC3DDCB265CFE9EF604F59F90228887F126E3FB44A1447220BAE1B27608609D28E979EB25B95EAFF78CA9853D89767F08C232BF549CF65D876DC8882; path=/
|
273
|
+
cache-control:
|
274
|
+
- no-cache
|
275
|
+
pragma:
|
276
|
+
- no-cache
|
277
|
+
expires:
|
278
|
+
- "-1"
|
279
|
+
content-type:
|
280
|
+
- text/html; charset=utf-8
|
281
|
+
content-length:
|
282
|
+
- "137"
|
283
|
+
body: |
|
284
|
+
<html><head><title>Object moved</title></head><body>
|
285
|
+
<h2>Object moved to <a href='/Remote/default.aspx'>here</a>.</h2>
|
286
|
+
</body></html>
|
287
|
+
|
288
|
+
http_version: "1.1"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require "bundler"
|
2
|
+
Bundler.require(:test)
|
3
|
+
|
4
|
+
require File.expand_path(File.dirname(__FILE__)) + "/../lib/rmww_auth"
|
5
|
+
require 'test/unit'
|
6
|
+
|
7
|
+
VCR.config do |c|
|
8
|
+
c.cassette_library_dir = File.expand_path(File.dirname(__FILE__)) + "/cassettes"
|
9
|
+
c.stub_with :webmock
|
10
|
+
end
|
11
|
+
|
12
|
+
class TestRWWAuth < Test::Unit::TestCase
|
13
|
+
def test_passing_auth_over_ssl
|
14
|
+
VCR.use_cassette('passing_auth_with_SSL') do
|
15
|
+
a = RemoteWorkplaceAuth.new("mail.enterprise.co.uk", true)
|
16
|
+
assert_equal true, a.auth("julik", "secret")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_failing_auth_over_ssl
|
21
|
+
VCR.use_cassette('failing_auth_with_SSL') do
|
22
|
+
a = RemoteWorkplaceAuth.new("mail.enterprise.co.uk", true)
|
23
|
+
assert_equal false, a.auth("julik", "fake")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rww_auth
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 1.0.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Julik
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-07-02 00:00:00 +02:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: vcr
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ~>
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 1.0.0
|
25
|
+
type: :development
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hoe
|
29
|
+
prerelease: false
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 2.9.4
|
36
|
+
type: :development
|
37
|
+
version_requirements: *id002
|
38
|
+
description: Allows password checks against a Remote Web Workplace server (a.k.a. Outlook Webmail)
|
39
|
+
email:
|
40
|
+
- me@julik.nl
|
41
|
+
executables: []
|
42
|
+
|
43
|
+
extensions: []
|
44
|
+
|
45
|
+
extra_rdoc_files:
|
46
|
+
- Manifest.txt
|
47
|
+
files:
|
48
|
+
- Gemfile
|
49
|
+
- Gemfile.lock
|
50
|
+
- Manifest.txt
|
51
|
+
- README.rdoc
|
52
|
+
- Rakefile
|
53
|
+
- lib/rmww_auth.rb
|
54
|
+
- test/cassettes/failing_auth_with_SSL.yml
|
55
|
+
- test/cassettes/passing_auth_with_SSL.yml
|
56
|
+
- test/test_rmwwauth.rb
|
57
|
+
- .gemtest
|
58
|
+
has_rdoc: true
|
59
|
+
homepage: http://github.com/julik/rww_auth
|
60
|
+
licenses: []
|
61
|
+
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options:
|
64
|
+
- --main
|
65
|
+
- README.rdoc
|
66
|
+
require_paths:
|
67
|
+
- lib
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0"
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: "0"
|
80
|
+
requirements: []
|
81
|
+
|
82
|
+
rubyforge_project: rww_auth
|
83
|
+
rubygems_version: 1.6.2
|
84
|
+
signing_key:
|
85
|
+
specification_version: 3
|
86
|
+
summary: Allows password checks against a Remote Web Workplace server (a.k.a
|
87
|
+
test_files:
|
88
|
+
- test/test_rmwwauth.rb
|