mirror of
https://github.com/inspec/inspec
synced 2024-11-26 14:40:26 +00:00
fixed tests
Signed-off-by: mbaitelman <mendy@baitelman.com>
This commit is contained in:
parent
f88404a865
commit
4ad11e8103
4 changed files with 452 additions and 525 deletions
|
@ -201,8 +201,8 @@ module Inspec::Resources
|
|||
|
||||
if inspec.os.windows?
|
||||
response = JSON.parse(response)
|
||||
@status = response.StatusCode
|
||||
@body = response.RawContent
|
||||
@status = response['StatusCode']
|
||||
@body = response['RawContent']
|
||||
|
||||
@response_headers = {}
|
||||
response["Headers"].each do |name, value|
|
||||
|
@ -249,6 +249,7 @@ module Inspec::Resources
|
|||
cmd << "-MaximumRedirection #{max_redirects}" unless max_redirects.nil?
|
||||
request_headers["Authorization"] = """ '\"Basic ' + [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(\"#{username}:#{password}\")) +'\"' """ unless username.nil? || password.nil?
|
||||
|
||||
request_header_string = nil
|
||||
request_headers.each do |k, v|
|
||||
request_header_string << " #{k} = #{v}"
|
||||
end
|
||||
|
@ -258,7 +259,7 @@ module Inspec::Resources
|
|||
else
|
||||
cmd << "'#{url}?#{params.map { |e| e.join("=") }.join("&")}'"
|
||||
end
|
||||
cmd << " | Select-Object -Property * | ConvertTo-json" # We use `Select-Object -Property * ` to get around an odd PowerShell error
|
||||
cmd << "| Select-Object -Property * | ConvertTo-json" # We use `Select-Object -Property * ` to get around an odd PowerShell error
|
||||
cmd.join(" ")
|
||||
else
|
||||
cmd = ["curl -i"]
|
||||
|
|
959
test/fixtures/cmd/http-windows-remote-no-options
vendored
959
test/fixtures/cmd/http-windows-remote-no-options
vendored
|
@ -1,519 +1,442 @@
|
|||
{
|
||||
"Content": "\u003c!doctype html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n \u003ctitle\u003eExample Domain\u003c/title\u003e\n\n \u003cmeta charset=\"utf-8\" /\u003e\n \u003cmeta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" /\u003e\n \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\" /\u003e\n \u003cstyle type=\"text/css\"\u003e\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n \u003c/style\u003e \n\u003c/head\u003e\n\n\u003cbody\u003e\n\u003cdiv\u003e\n \u003ch1\u003eExample Domain\u003c/h1\u003e\n \u003cp\u003eThis domain is for use in illustrative examples in documents. You may use this\n domain in literature without prior coordination or asking for permission.\u003c/p\u003e\n \u003cp\u003e\u003ca href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/a\u003e\u003c/p\u003e\n\u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n",
|
||||
"ParsedHtml": {
|
||||
"Script": {
|
||||
|
||||
},
|
||||
"all": [
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject"
|
||||
],
|
||||
"body": {
|
||||
|
||||
},
|
||||
"activeElement": null,
|
||||
"images": [
|
||||
|
||||
],
|
||||
"applets": [
|
||||
|
||||
],
|
||||
"links": [
|
||||
"System.__ComObject"
|
||||
],
|
||||
"forms": [
|
||||
|
||||
],
|
||||
"anchors": [
|
||||
|
||||
],
|
||||
"title": "Example Domain",
|
||||
"scripts": [
|
||||
|
||||
],
|
||||
"designMode": "Inherit",
|
||||
"selection": {
|
||||
|
||||
},
|
||||
"readyState": "complete",
|
||||
"frames": {
|
||||
|
||||
},
|
||||
"embeds": [
|
||||
|
||||
],
|
||||
"plugins": [
|
||||
|
||||
],
|
||||
"alinkColor": "#0000ff",
|
||||
"bgColor": "#f0f0f2",
|
||||
"fgColor": "#000000",
|
||||
"linkColor": "#0000ff",
|
||||
"vlinkColor": "#800080",
|
||||
"referrer": null,
|
||||
"location": {
|
||||
|
||||
},
|
||||
"lastModified": "10/16/2020 10:16:17",
|
||||
"url": "about:blank",
|
||||
"domain": null,
|
||||
"cookie": null,
|
||||
"expando": true,
|
||||
"charset": "unicode",
|
||||
"defaultCharset": "windows-1252",
|
||||
"mimeType": "Chrome HTML Document",
|
||||
"fileSize": null,
|
||||
"fileCreatedDate": null,
|
||||
"fileModifiedDate": null,
|
||||
"fileUpdatedDate": null,
|
||||
"security": "This type of document does not have a security certificate.",
|
||||
"protocol": "Unknown Protocol",
|
||||
"nameProp": "Example Domain",
|
||||
"onhelp": null,
|
||||
"onclick": null,
|
||||
"ondblclick": null,
|
||||
"onkeyup": null,
|
||||
"onkeydown": null,
|
||||
"onkeypress": null,
|
||||
"onmouseup": null,
|
||||
"onmousedown": null,
|
||||
"onmousemove": null,
|
||||
"onmouseout": null,
|
||||
"onmouseover": null,
|
||||
"onreadystatechange": null,
|
||||
"onafterupdate": null,
|
||||
"onrowexit": null,
|
||||
"onrowenter": null,
|
||||
"ondragstart": null,
|
||||
"onselectstart": null,
|
||||
"parentWindow": {
|
||||
|
||||
},
|
||||
"styleSheets": [
|
||||
"System.__ComObject"
|
||||
],
|
||||
"onbeforeupdate": null,
|
||||
"onerrorupdate": null,
|
||||
"documentElement": {
|
||||
|
||||
},
|
||||
"uniqueID": "ms__id1",
|
||||
"onrowsdelete": null,
|
||||
"onrowsinserted": null,
|
||||
"oncellchange": null,
|
||||
"ondatasetchanged": null,
|
||||
"ondataavailable": null,
|
||||
"ondatasetcomplete": null,
|
||||
"onpropertychange": null,
|
||||
"dir": null,
|
||||
"oncontextmenu": null,
|
||||
"onstop": null,
|
||||
"parentDocument": null,
|
||||
"enableDownload": null,
|
||||
"baseUrl": null,
|
||||
"inheritStyleSheets": null,
|
||||
"onbeforeeditfocus": null,
|
||||
"onselectionchange": null,
|
||||
"namespaces": {
|
||||
|
||||
},
|
||||
"media": null,
|
||||
"oncontrolselect": null,
|
||||
"URLUnencoded": "about:blank",
|
||||
"onmousewheel": null,
|
||||
"doctype": null,
|
||||
"implementation": {
|
||||
|
||||
},
|
||||
"onfocusin": null,
|
||||
"onfocusout": null,
|
||||
"onactivate": null,
|
||||
"ondeactivate": null,
|
||||
"onbeforeactivate": null,
|
||||
"onbeforedeactivate": null,
|
||||
"compatMode": "CSS1Compat",
|
||||
"nodeType": 9,
|
||||
"parentNode": null,
|
||||
"childNodes": [
|
||||
"System.__ComObject",
|
||||
"System.__ComObject"
|
||||
],
|
||||
"attributes": null,
|
||||
"nodeName": "#document",
|
||||
"nodeValue": null,
|
||||
"firstChild": {
|
||||
|
||||
},
|
||||
"lastChild": {
|
||||
|
||||
},
|
||||
"previousSibling": null,
|
||||
"nextSibling": null,
|
||||
"ownerDocument": null,
|
||||
"IHTMLDocument2_Script": {
|
||||
|
||||
},
|
||||
"IHTMLDocument2_all": [
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject"
|
||||
],
|
||||
"IHTMLDocument2_body": {
|
||||
|
||||
},
|
||||
"IHTMLDocument2_activeElement": null,
|
||||
"IHTMLDocument2_images": [
|
||||
|
||||
],
|
||||
"IHTMLDocument2_applets": [
|
||||
|
||||
],
|
||||
"IHTMLDocument2_links": [
|
||||
"System.__ComObject"
|
||||
],
|
||||
"IHTMLDocument2_forms": [
|
||||
|
||||
],
|
||||
"IHTMLDocument2_anchors": [
|
||||
|
||||
],
|
||||
"IHTMLDocument2_title": "Example Domain",
|
||||
"IHTMLDocument2_scripts": [
|
||||
|
||||
],
|
||||
"IHTMLDocument2_designMode": "Inherit",
|
||||
"IHTMLDocument2_selection": {
|
||||
|
||||
},
|
||||
"IHTMLDocument2_readyState": "complete",
|
||||
"IHTMLDocument2_frames": {
|
||||
|
||||
},
|
||||
"IHTMLDocument2_embeds": [
|
||||
|
||||
],
|
||||
"IHTMLDocument2_plugins": [
|
||||
|
||||
],
|
||||
"IHTMLDocument2_alinkColor": "#0000ff",
|
||||
"IHTMLDocument2_bgColor": "#f0f0f2",
|
||||
"IHTMLDocument2_fgColor": "#000000",
|
||||
"IHTMLDocument2_linkColor": "#0000ff",
|
||||
"IHTMLDocument2_vlinkColor": "#800080",
|
||||
"IHTMLDocument2_referrer": null,
|
||||
"IHTMLDocument2_location": null,
|
||||
"IHTMLDocument2_lastModified": "10/16/2020 10:16:17",
|
||||
"IHTMLDocument2_url": "about:blank",
|
||||
"IHTMLDocument2_domain": null,
|
||||
"IHTMLDocument2_cookie": null,
|
||||
"IHTMLDocument2_expando": true,
|
||||
"IHTMLDocument2_charset": "unicode",
|
||||
"IHTMLDocument2_defaultCharset": "windows-1252",
|
||||
"IHTMLDocument2_mimeType": "Chrome HTML Document",
|
||||
"IHTMLDocument2_fileSize": null,
|
||||
"IHTMLDocument2_fileCreatedDate": null,
|
||||
"IHTMLDocument2_fileModifiedDate": null,
|
||||
"IHTMLDocument2_fileUpdatedDate": null,
|
||||
"IHTMLDocument2_security": "This type of document does not have a security certificate.",
|
||||
"IHTMLDocument2_protocol": "Unknown Protocol",
|
||||
"IHTMLDocument2_nameProp": "Example Domain",
|
||||
"IHTMLDocument2_onhelp": null,
|
||||
"IHTMLDocument2_onclick": null,
|
||||
"IHTMLDocument2_ondblclick": null,
|
||||
"IHTMLDocument2_onkeyup": null,
|
||||
"IHTMLDocument2_onkeydown": null,
|
||||
"IHTMLDocument2_onkeypress": null,
|
||||
"IHTMLDocument2_onmouseup": null,
|
||||
"IHTMLDocument2_onmousedown": null,
|
||||
"IHTMLDocument2_onmousemove": null,
|
||||
"IHTMLDocument2_onmouseout": null,
|
||||
"IHTMLDocument2_onmouseover": null,
|
||||
"IHTMLDocument2_onreadystatechange": null,
|
||||
"IHTMLDocument2_onafterupdate": null,
|
||||
"IHTMLDocument2_onrowexit": null,
|
||||
"IHTMLDocument2_onrowenter": null,
|
||||
"IHTMLDocument2_ondragstart": null,
|
||||
"IHTMLDocument2_onselectstart": null,
|
||||
"IHTMLDocument2_parentWindow": {
|
||||
|
||||
},
|
||||
"IHTMLDocument2_styleSheets": [
|
||||
"System.__ComObject"
|
||||
],
|
||||
"IHTMLDocument2_onbeforeupdate": null,
|
||||
"IHTMLDocument2_onerrorupdate": null,
|
||||
"IHTMLDocument3_documentElement": {
|
||||
|
||||
},
|
||||
"IHTMLDocument3_uniqueID": "ms__id2",
|
||||
"IHTMLDocument3_onrowsdelete": null,
|
||||
"IHTMLDocument3_onrowsinserted": null,
|
||||
"IHTMLDocument3_oncellchange": null,
|
||||
"IHTMLDocument3_ondatasetchanged": null,
|
||||
"IHTMLDocument3_ondataavailable": null,
|
||||
"IHTMLDocument3_ondatasetcomplete": null,
|
||||
"IHTMLDocument3_onpropertychange": null,
|
||||
"IHTMLDocument3_dir": null,
|
||||
"IHTMLDocument3_oncontextmenu": null,
|
||||
"IHTMLDocument3_onstop": null,
|
||||
"IHTMLDocument3_parentDocument": null,
|
||||
"IHTMLDocument3_enableDownload": null,
|
||||
"IHTMLDocument3_baseUrl": null,
|
||||
"IHTMLDocument3_childNodes": [
|
||||
"System.__ComObject",
|
||||
"System.__ComObject"
|
||||
],
|
||||
"IHTMLDocument3_inheritStyleSheets": null,
|
||||
"IHTMLDocument3_onbeforeeditfocus": null,
|
||||
"IHTMLDocument4_onselectionchange": null,
|
||||
"IHTMLDocument4_namespaces": {
|
||||
|
||||
},
|
||||
"IHTMLDocument4_media": null,
|
||||
"IHTMLDocument4_oncontrolselect": null,
|
||||
"IHTMLDocument4_URLUnencoded": "about:blank",
|
||||
"IHTMLDocument5_onmousewheel": null,
|
||||
"IHTMLDocument5_doctype": null,
|
||||
"IHTMLDocument5_implementation": {
|
||||
|
||||
},
|
||||
"IHTMLDocument5_onfocusin": null,
|
||||
"IHTMLDocument5_onfocusout": null,
|
||||
"IHTMLDocument5_onactivate": null,
|
||||
"IHTMLDocument5_ondeactivate": null,
|
||||
"IHTMLDocument5_onbeforeactivate": null,
|
||||
"IHTMLDocument5_onbeforedeactivate": null,
|
||||
"IHTMLDocument5_compatMode": "CSS1Compat",
|
||||
"IHTMLDOMNode_nodeType": null,
|
||||
"IHTMLDOMNode_parentNode": null,
|
||||
"IHTMLDOMNode_childNodes": null,
|
||||
"IHTMLDOMNode_attributes": null,
|
||||
"IHTMLDOMNode_nodeName": null,
|
||||
"IHTMLDOMNode_nodeValue": null,
|
||||
"IHTMLDOMNode_firstChild": null,
|
||||
"IHTMLDOMNode_lastChild": null,
|
||||
"IHTMLDOMNode_previousSibling": null,
|
||||
"IHTMLDOMNode_nextSibling": null,
|
||||
"IHTMLDOMNode2_ownerDocument": null
|
||||
},
|
||||
"Forms": [
|
||||
|
||||
],
|
||||
"InputFields": [
|
||||
|
||||
],
|
||||
"Links": [
|
||||
{
|
||||
"innerHTML": "More information...",
|
||||
"innerText": "More information...",
|
||||
"outerHTML": "\u003cA href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/A\u003e",
|
||||
"outerText": "More information...",
|
||||
"tagName": "A",
|
||||
"href": "https://www.iana.org/domains/example"
|
||||
}
|
||||
],
|
||||
"Images": [
|
||||
|
||||
],
|
||||
"Scripts": [
|
||||
|
||||
],
|
||||
"AllElements": [
|
||||
{
|
||||
"innerHTML": null,
|
||||
"innerText": null,
|
||||
"outerHTML": null,
|
||||
"outerText": null,
|
||||
"tagName": "!"
|
||||
},
|
||||
{
|
||||
"innerHTML": "\u003cHEAD\u003e\u003cTITLE\u003eExample Domain\u003c/TITLE\u003e\r\n\u003cMETA charset=utf-8\u003e\r\n\u003cMETA name=viewport content=\"width=device-width, initial-scale=1\"\u003e\r\n\u003cSTYLE type=text/css\u003e\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n \u003c/STYLE\u003e\r\n\u003c/HEAD\u003e\r\n\u003cBODY\u003e\r\n\u003cDIV\u003e\r\n\u003cH1\u003eExample Domain\u003c/H1\u003e\r\n\u003cP\u003eThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\u003c/P\u003e\r\n\u003cP\u003e\u003cA href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/A\u003e\u003c/P\u003e\u003c/DIV\u003e\u003c/BODY\u003e",
|
||||
"innerText": "Example DomainExample Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"outerHTML": "\u003cHTML\u003e\u003cHEAD\u003e\u003cTITLE\u003eExample Domain\u003c/TITLE\u003e\r\n\u003cMETA charset=utf-8\u003e\r\n\u003cMETA name=viewport content=\"width=device-width, initial-scale=1\"\u003e\r\n\u003cSTYLE type=text/css\u003e\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n
|
||||
width: auto;\n }\n }\n \u003c/STYLE\u003e\r\n\u003c/HEAD\u003e\r\n\u003cBODY\u003e\r\n\u003cDIV\u003e\r\n\u003cH1\u003eExample Domain\u003c/H1\u003e\r\n\u003cP\u003eThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\u003c/P\u003e\r\n\u003cP\u003e\u003cA href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/A\u003e\u003c/P\u003e\u003c/DIV\u003e\u003c/BODY\u003e\u003c/HTML\u003e",
|
||||
"outerText": "Example DomainExample Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"tagName": "HTML"
|
||||
},
|
||||
{
|
||||
"innerHTML": "\u003cTITLE\u003eExample Domain\u003c/TITLE\u003e\r\n\u003cMETA charset=utf-8\u003e\r\n\u003cMETA name=viewport content=\"width=device-width, initial-scale=1\"\u003e\r\n\u003cSTYLE type=text/css\u003e\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n \u003c/STYLE\u003e",
|
||||
"innerText": "Example Domain",
|
||||
"outerHTML": "\u003cHEAD\u003e\u003cTITLE\u003eExample Domain\u003c/TITLE\u003e\r\n\u003cMETA charset=utf-8\u003e\r\n\u003cMETA name=viewport content=\"width=device-width, initial-scale=1\"\u003e\r\n\u003cSTYLE type=text/css\u003e\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n \u003c/STYLE\u003e\r\n\u003c/HEAD\u003e",
|
||||
"outerText": "Example Domain",
|
||||
"tagName": "HEAD"
|
||||
},
|
||||
{
|
||||
"innerHTML": "Example Domain",
|
||||
"innerText": "Example Domain",
|
||||
"outerHTML": "\u003cTITLE\u003eExample Domain\u003c/TITLE\u003e",
|
||||
"outerText": "Example Domain",
|
||||
"tagName": "TITLE"
|
||||
},
|
||||
{
|
||||
"innerHTML": null,
|
||||
"innerText": null,
|
||||
"outerHTML": "\r\n\u003cMETA charset=utf-8\u003e",
|
||||
"outerText": null,
|
||||
"tagName": "META",
|
||||
"charset": "utf-8"
|
||||
},
|
||||
{
|
||||
"innerHTML": null,
|
||||
"innerText": null,
|
||||
"outerHTML": null,
|
||||
"outerText": null,
|
||||
"tagName": "META"
|
||||
},
|
||||
{
|
||||
"innerHTML": null,
|
||||
"innerText": null,
|
||||
"outerHTML": "\r\n\u003cMETA name=viewport content=\"width=device-width, initial-scale=1\"\u003e",
|
||||
"outerText": null,
|
||||
"tagName": "META",
|
||||
"name": "viewport",
|
||||
"content": "width=device-width, initial-scale=1"
|
||||
},
|
||||
{
|
||||
"innerHTML": "\r\n\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n ",
|
||||
"innerText": null,
|
||||
"outerHTML": "\r\n\u003cSTYLE type=text/css\u003e\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n \u003c/STYLE\u003e",
|
||||
"outerText": null,
|
||||
"tagName": "STYLE",
|
||||
"type": "text/css"
|
||||
},
|
||||
{
|
||||
"innerHTML": "\u003cDIV\u003e\r\n\u003cH1\u003eExample Domain\u003c/H1\u003e\r\n\u003cP\u003eThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\u003c/P\u003e\r\n\u003cP\u003e\u003cA href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/A\u003e\u003c/P\u003e\u003c/DIV\u003e",
|
||||
"innerText": "Example Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"outerHTML": "\r\n\u003cBODY\u003e\u003cDIV\u003e\r\n\u003cH1\u003eExample Domain\u003c/H1\u003e\r\n\u003cP\u003eThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\u003c/P\u003e\r\n\u003cP\u003e\u003cA href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/A\u003e\u003c/P\u003e\u003c/DIV\u003e\u003c/BODY\u003e",
|
||||
"outerText": "Example Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"tagName": "BODY"
|
||||
},
|
||||
{
|
||||
"innerHTML": "\u003cH1\u003eExample Domain\u003c/H1\u003e\r\n\u003cP\u003eThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\u003c/P\u003e\r\n\u003cP\u003e\u003cA href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/A\u003e\u003c/P\u003e",
|
||||
"innerText": "Example Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"outerHTML": "\r\n\u003cDIV\u003e\u003cH1\u003eExample Domain\u003c/H1\u003e\r\n\u003cP\u003eThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\u003c/P\u003e\r\n\u003cP\u003e\u003cA href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/A\u003e\u003c/P\u003e\u003c/DIV\u003e",
|
||||
"outerText": "Example Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"tagName": "DIV"
|
||||
},
|
||||
{
|
||||
"innerHTML": "Example Domain",
|
||||
"innerText": "Example Domain",
|
||||
"outerHTML": "\r\n\u003cH1\u003eExample Domain\u003c/H1\u003e",
|
||||
"outerText": "Example Domain",
|
||||
"tagName": "H1"
|
||||
},
|
||||
{
|
||||
"innerHTML": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.",
|
||||
"innerText": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.",
|
||||
"outerHTML": "\r\n\u003cP\u003eThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\u003c/P\u003e",
|
||||
"outerText": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.",
|
||||
"tagName": "P"
|
||||
},
|
||||
{
|
||||
"innerHTML": "\u003cA href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/A\u003e",
|
||||
"innerText": "More information...",
|
||||
"outerHTML": "\r\n\u003cP\u003e\u003cA href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/A\u003e\u003c/P\u003e",
|
||||
"outerText": "More information...",
|
||||
"tagName": "P"
|
||||
},
|
||||
{
|
||||
"innerHTML": "More information...",
|
||||
"innerText": "More information...",
|
||||
"outerHTML": "\u003cA href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/A\u003e",
|
||||
"outerText": "More information...",
|
||||
"tagName": "A",
|
||||
"href": "https://www.iana.org/domains/example"
|
||||
}
|
||||
],
|
||||
"StatusCode": 200,
|
||||
"StatusDescription": "OK",
|
||||
"RawContentStream": {
|
||||
"CanRead": true,
|
||||
"CanSeek": true,
|
||||
"CanTimeout": false,
|
||||
"CanWrite": true,
|
||||
"Length": 1256,
|
||||
"Capacity": 10000,
|
||||
"Position": 0,
|
||||
"ReadTimeout": null,
|
||||
"WriteTimeout": null
|
||||
},
|
||||
"RawContentLength": 1256,
|
||||
"RawContent": "HTTP/1.1 200 OK\r\nAge: 520448\r\nVary: Accept-Encoding\r\nX-Cache: HIT\r\nAccept-Ranges: bytes\r\nContent-Length: 1256\r\nCache-Control: max-age=604800\r\nContent-Type: text/html; charset=UTF-8\r\nDate: Fri, 16 Oct 2020 17:16:16 GMT\r\nExpires: Fri, 23 Oct 2020 17:16:16 GMT\r\nETag: \"3147526947\"\r\nLast-Modified: Thu, 17 Oct 2019 07:18:26 GMT\r\nServer: ECS (oxr/8324)\r\n\r\n\u003c!doctype html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n \u003ctitle\u003eExample Domain\u003c/title\u003e\n\n \u003cmeta charset=\"utf-8\" /\u003e\n \u003cmeta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" /\u003e\n \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\" /\u003e\n \u003cstyle type=\"text/css\"\u003e\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n \u003c/style\u003e \n\u003c/head\u003e\n\n\u003cbody\u003e\n\u003cdiv\u003e\n \u003ch1\u003eExample Domain\u003c/h1\u003e\n \u003cp\u003eThis domain is for use in illustrative examples in documents. You may use this\n domain in literature without prior coordination or asking for permission.\u003c/p\u003e\n \u003cp\u003e\u003ca href=\"https://www.iana.org/domains/example\"\u003eMore information...\u003c/a\u003e\u003c/p\u003e\n\u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n",
|
||||
"BaseResponse": {
|
||||
"IsMutuallyAuthenticated": false,
|
||||
"Cookies": [
|
||||
|
||||
],
|
||||
"Headers": [
|
||||
"Age",
|
||||
"Vary",
|
||||
"X-Cache",
|
||||
"Accept-Ranges",
|
||||
"Content-Length",
|
||||
"Cache-Control",
|
||||
"Content-Type",
|
||||
"Date",
|
||||
"Expires",
|
||||
"ETag",
|
||||
"Last-Modified",
|
||||
"Server"
|
||||
],
|
||||
"SupportsHeaders": true,
|
||||
"ContentLength": 1256,
|
||||
"ContentEncoding": "",
|
||||
"ContentType": "text/html; charset=UTF-8",
|
||||
"CharacterSet": "UTF-8",
|
||||
"Server": "ECS (oxr/8324)",
|
||||
"LastModified": "\/Date(1571296706000)\/",
|
||||
"StatusCode": 200,
|
||||
"StatusDescription": "OK",
|
||||
"ProtocolVersion": {
|
||||
"Major": 1,
|
||||
"Minor": 1,
|
||||
"Build": -1,
|
||||
"Revision": -1,
|
||||
"MajorRevision": -1,
|
||||
"MinorRevision": -1
|
||||
},
|
||||
"ResponseUri": "https://www.example.com/",
|
||||
"Method": "GET",
|
||||
"IsFromCache": false
|
||||
},
|
||||
"Headers": {
|
||||
"Age": "520448",
|
||||
"Vary": "Accept-Encoding",
|
||||
"X-Cache": "HIT",
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "1256",
|
||||
"Cache-Control": "max-age=604800",
|
||||
"Content-Type": "text/html; charset=UTF-8",
|
||||
"Date": "Fri, 16 Oct 2020 17:16:16 GMT",
|
||||
"Expires": "Fri, 23 Oct 2020 17:16:16 GMT",
|
||||
"ETag": "\"3147526947\"",
|
||||
"Last-Modified": "Thu, 17 Oct 2019 07:18:26 GMT",
|
||||
"Server": "ECS (oxr/8324)"
|
||||
}
|
||||
}
|
||||
"Content": "<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <style type=\"text/css\">\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n </style> \n</head>\n\n<body>\n<div>\n <h1>Example Domain</h1>\n <p>This domain is for use in illustrative examples in documents. You may use this\n domain in literature without prior coordination or asking for permission.</p>\n <p><a href=\"https://www.iana.org/domains/example\">More information...</a></p>\n</div>\n</body>\n</html>\n",
|
||||
"ParsedHtml": {
|
||||
"Script": {},
|
||||
"all": [
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject"
|
||||
],
|
||||
"body": {},
|
||||
"activeElement": null,
|
||||
"images": [],
|
||||
"applets": [],
|
||||
"links": [
|
||||
"System.__ComObject"
|
||||
],
|
||||
"forms": [],
|
||||
"anchors": [],
|
||||
"title": "Example Domain",
|
||||
"scripts": [],
|
||||
"designMode": "Inherit",
|
||||
"selection": {},
|
||||
"readyState": "complete",
|
||||
"frames": {},
|
||||
"embeds": [],
|
||||
"plugins": [],
|
||||
"alinkColor": "#0000ff",
|
||||
"bgColor": "#f0f0f2",
|
||||
"fgColor": "#000000",
|
||||
"linkColor": "#0000ff",
|
||||
"vlinkColor": "#800080",
|
||||
"referrer": null,
|
||||
"location": {},
|
||||
"lastModified": "03/07/2021 23:17:45",
|
||||
"url": "about:blank",
|
||||
"domain": null,
|
||||
"cookie": null,
|
||||
"expando": true,
|
||||
"charset": "unicode",
|
||||
"defaultCharset": "windows-1252",
|
||||
"mimeType": "Chrome HTML Document",
|
||||
"fileSize": null,
|
||||
"fileCreatedDate": null,
|
||||
"fileModifiedDate": null,
|
||||
"fileUpdatedDate": null,
|
||||
"security": "This type of document does not have a security certificate.",
|
||||
"protocol": "Unknown Protocol",
|
||||
"nameProp": "Example Domain",
|
||||
"onhelp": null,
|
||||
"onclick": null,
|
||||
"ondblclick": null,
|
||||
"onkeyup": null,
|
||||
"onkeydown": null,
|
||||
"onkeypress": null,
|
||||
"onmouseup": null,
|
||||
"onmousedown": null,
|
||||
"onmousemove": null,
|
||||
"onmouseout": null,
|
||||
"onmouseover": null,
|
||||
"onreadystatechange": null,
|
||||
"onafterupdate": null,
|
||||
"onrowexit": null,
|
||||
"onrowenter": null,
|
||||
"ondragstart": null,
|
||||
"onselectstart": null,
|
||||
"parentWindow": {},
|
||||
"styleSheets": [
|
||||
"System.__ComObject"
|
||||
],
|
||||
"onbeforeupdate": null,
|
||||
"onerrorupdate": null,
|
||||
"documentElement": {},
|
||||
"uniqueID": "ms__id1",
|
||||
"onrowsdelete": null,
|
||||
"onrowsinserted": null,
|
||||
"oncellchange": null,
|
||||
"ondatasetchanged": null,
|
||||
"ondataavailable": null,
|
||||
"ondatasetcomplete": null,
|
||||
"onpropertychange": null,
|
||||
"dir": null,
|
||||
"oncontextmenu": null,
|
||||
"onstop": null,
|
||||
"parentDocument": null,
|
||||
"enableDownload": null,
|
||||
"baseUrl": null,
|
||||
"inheritStyleSheets": null,
|
||||
"onbeforeeditfocus": null,
|
||||
"onselectionchange": null,
|
||||
"namespaces": {},
|
||||
"media": null,
|
||||
"oncontrolselect": null,
|
||||
"URLUnencoded": "about:blank",
|
||||
"onmousewheel": null,
|
||||
"doctype": null,
|
||||
"implementation": {},
|
||||
"onfocusin": null,
|
||||
"onfocusout": null,
|
||||
"onactivate": null,
|
||||
"ondeactivate": null,
|
||||
"onbeforeactivate": null,
|
||||
"onbeforedeactivate": null,
|
||||
"compatMode": "CSS1Compat",
|
||||
"nodeType": 9,
|
||||
"parentNode": null,
|
||||
"childNodes": [
|
||||
"System.__ComObject",
|
||||
"System.__ComObject"
|
||||
],
|
||||
"attributes": null,
|
||||
"nodeName": "#document",
|
||||
"nodeValue": null,
|
||||
"firstChild": {},
|
||||
"lastChild": {},
|
||||
"previousSibling": null,
|
||||
"nextSibling": null,
|
||||
"ownerDocument": null,
|
||||
"IHTMLDocument2_Script": {},
|
||||
"IHTMLDocument2_all": [
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject",
|
||||
"System.__ComObject"
|
||||
],
|
||||
"IHTMLDocument2_body": {},
|
||||
"IHTMLDocument2_activeElement": null,
|
||||
"IHTMLDocument2_images": [],
|
||||
"IHTMLDocument2_applets": [],
|
||||
"IHTMLDocument2_links": [
|
||||
"System.__ComObject"
|
||||
],
|
||||
"IHTMLDocument2_forms": [],
|
||||
"IHTMLDocument2_anchors": [],
|
||||
"IHTMLDocument2_title": "Example Domain",
|
||||
"IHTMLDocument2_scripts": [],
|
||||
"IHTMLDocument2_designMode": "Inherit",
|
||||
"IHTMLDocument2_selection": {},
|
||||
"IHTMLDocument2_readyState": "complete",
|
||||
"IHTMLDocument2_frames": {},
|
||||
"IHTMLDocument2_embeds": [],
|
||||
"IHTMLDocument2_plugins": [],
|
||||
"IHTMLDocument2_alinkColor": "#0000ff",
|
||||
"IHTMLDocument2_bgColor": "#f0f0f2",
|
||||
"IHTMLDocument2_fgColor": "#000000",
|
||||
"IHTMLDocument2_linkColor": "#0000ff",
|
||||
"IHTMLDocument2_vlinkColor": "#800080",
|
||||
"IHTMLDocument2_referrer": null,
|
||||
"IHTMLDocument2_location": null,
|
||||
"IHTMLDocument2_lastModified": "03/07/2021 23:17:45",
|
||||
"IHTMLDocument2_url": "about:blank",
|
||||
"IHTMLDocument2_domain": null,
|
||||
"IHTMLDocument2_cookie": null,
|
||||
"IHTMLDocument2_expando": true,
|
||||
"IHTMLDocument2_charset": "unicode",
|
||||
"IHTMLDocument2_defaultCharset": "windows-1252",
|
||||
"IHTMLDocument2_mimeType": "Chrome HTML Document",
|
||||
"IHTMLDocument2_fileSize": null,
|
||||
"IHTMLDocument2_fileCreatedDate": null,
|
||||
"IHTMLDocument2_fileModifiedDate": null,
|
||||
"IHTMLDocument2_fileUpdatedDate": null,
|
||||
"IHTMLDocument2_security": "This type of document does not have a security certificate.",
|
||||
"IHTMLDocument2_protocol": "Unknown Protocol",
|
||||
"IHTMLDocument2_nameProp": "Example Domain",
|
||||
"IHTMLDocument2_onhelp": null,
|
||||
"IHTMLDocument2_onclick": null,
|
||||
"IHTMLDocument2_ondblclick": null,
|
||||
"IHTMLDocument2_onkeyup": null,
|
||||
"IHTMLDocument2_onkeydown": null,
|
||||
"IHTMLDocument2_onkeypress": null,
|
||||
"IHTMLDocument2_onmouseup": null,
|
||||
"IHTMLDocument2_onmousedown": null,
|
||||
"IHTMLDocument2_onmousemove": null,
|
||||
"IHTMLDocument2_onmouseout": null,
|
||||
"IHTMLDocument2_onmouseover": null,
|
||||
"IHTMLDocument2_onreadystatechange": null,
|
||||
"IHTMLDocument2_onafterupdate": null,
|
||||
"IHTMLDocument2_onrowexit": null,
|
||||
"IHTMLDocument2_onrowenter": null,
|
||||
"IHTMLDocument2_ondragstart": null,
|
||||
"IHTMLDocument2_onselectstart": null,
|
||||
"IHTMLDocument2_parentWindow": {},
|
||||
"IHTMLDocument2_styleSheets": [
|
||||
"System.__ComObject"
|
||||
],
|
||||
"IHTMLDocument2_onbeforeupdate": null,
|
||||
"IHTMLDocument2_onerrorupdate": null,
|
||||
"IHTMLDocument3_documentElement": {},
|
||||
"IHTMLDocument3_uniqueID": "ms__id2",
|
||||
"IHTMLDocument3_onrowsdelete": null,
|
||||
"IHTMLDocument3_onrowsinserted": null,
|
||||
"IHTMLDocument3_oncellchange": null,
|
||||
"IHTMLDocument3_ondatasetchanged": null,
|
||||
"IHTMLDocument3_ondataavailable": null,
|
||||
"IHTMLDocument3_ondatasetcomplete": null,
|
||||
"IHTMLDocument3_onpropertychange": null,
|
||||
"IHTMLDocument3_dir": null,
|
||||
"IHTMLDocument3_oncontextmenu": null,
|
||||
"IHTMLDocument3_onstop": null,
|
||||
"IHTMLDocument3_parentDocument": null,
|
||||
"IHTMLDocument3_enableDownload": null,
|
||||
"IHTMLDocument3_baseUrl": null,
|
||||
"IHTMLDocument3_childNodes": [
|
||||
"System.__ComObject",
|
||||
"System.__ComObject"
|
||||
],
|
||||
"IHTMLDocument3_inheritStyleSheets": null,
|
||||
"IHTMLDocument3_onbeforeeditfocus": null,
|
||||
"IHTMLDocument4_onselectionchange": null,
|
||||
"IHTMLDocument4_namespaces": {},
|
||||
"IHTMLDocument4_media": null,
|
||||
"IHTMLDocument4_oncontrolselect": null,
|
||||
"IHTMLDocument4_URLUnencoded": "about:blank",
|
||||
"IHTMLDocument5_onmousewheel": null,
|
||||
"IHTMLDocument5_doctype": null,
|
||||
"IHTMLDocument5_implementation": {},
|
||||
"IHTMLDocument5_onfocusin": null,
|
||||
"IHTMLDocument5_onfocusout": null,
|
||||
"IHTMLDocument5_onactivate": null,
|
||||
"IHTMLDocument5_ondeactivate": null,
|
||||
"IHTMLDocument5_onbeforeactivate": null,
|
||||
"IHTMLDocument5_onbeforedeactivate": null,
|
||||
"IHTMLDocument5_compatMode": "CSS1Compat",
|
||||
"IHTMLDOMNode_nodeType": null,
|
||||
"IHTMLDOMNode_parentNode": null,
|
||||
"IHTMLDOMNode_childNodes": null,
|
||||
"IHTMLDOMNode_attributes": null,
|
||||
"IHTMLDOMNode_nodeName": null,
|
||||
"IHTMLDOMNode_nodeValue": null,
|
||||
"IHTMLDOMNode_firstChild": null,
|
||||
"IHTMLDOMNode_lastChild": null,
|
||||
"IHTMLDOMNode_previousSibling": null,
|
||||
"IHTMLDOMNode_nextSibling": null,
|
||||
"IHTMLDOMNode2_ownerDocument": null
|
||||
},
|
||||
"Forms": [],
|
||||
"InputFields": [],
|
||||
"Links": [
|
||||
{
|
||||
"innerHTML": "More information...",
|
||||
"innerText": "More information...",
|
||||
"outerHTML": "<A href=\"https://www.iana.org/domains/example\">More information...</A>",
|
||||
"outerText": "More information...",
|
||||
"tagName": "A",
|
||||
"href": "https://www.iana.org/domains/example"
|
||||
}
|
||||
],
|
||||
"Images": [],
|
||||
"Scripts": [],
|
||||
"AllElements": [
|
||||
{
|
||||
"innerHTML": null,
|
||||
"innerText": null,
|
||||
"outerHTML": null,
|
||||
"outerText": null,
|
||||
"tagName": "!"
|
||||
},
|
||||
{
|
||||
"innerHTML": "<HEAD><TITLE>Example Domain</TITLE>\r\n<META charset=utf-8>\r\n<META name=viewport content=\"width=device-width, initial-scale=1\">\r\n<STYLE type=text/css>\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n </STYLE>\r\n</HEAD>\r\n<BODY>\r\n<DIV>\r\n<H1>Example Domain</H1>\r\n<P>This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.</P>\r\n<P><A href=\"https://www.iana.org/domains/example\">More information...</A></P></DIV></BODY>",
|
||||
"innerText": "Example DomainExample Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"outerHTML": "<HTML><HEAD><TITLE>Example Domain</TITLE>\r\n<META charset=utf-8>\r\n<META name=viewport content=\"width=device-width, initial-scale=1\">\r\n<STYLE type=text/css>\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n </STYLE>\r\n</HEAD>\r\n<BODY>\r\n<DIV>\r\n<H1>Example Domain</H1>\r\n<P>This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.</P>\r\n<P><A href=\"https://www.iana.org/domains/example\">More information...</A></P></DIV></BODY></HTML>",
|
||||
"outerText": "Example DomainExample Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"tagName": "HTML"
|
||||
},
|
||||
{
|
||||
"innerHTML": "<TITLE>Example Domain</TITLE>\r\n<META charset=utf-8>\r\n<META name=viewport content=\"width=device-width, initial-scale=1\">\r\n<STYLE type=text/css>\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n </STYLE>",
|
||||
"innerText": "Example Domain",
|
||||
"outerHTML": "<HEAD><TITLE>Example Domain</TITLE>\r\n<META charset=utf-8>\r\n<META name=viewport content=\"width=device-width, initial-scale=1\">\r\n<STYLE type=text/css>\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n </STYLE>\r\n</HEAD>",
|
||||
"outerText": "Example Domain",
|
||||
"tagName": "HEAD"
|
||||
},
|
||||
{
|
||||
"innerHTML": "Example Domain",
|
||||
"innerText": "Example Domain",
|
||||
"outerHTML": "<TITLE>Example Domain</TITLE>",
|
||||
"outerText": "Example Domain",
|
||||
"tagName": "TITLE"
|
||||
},
|
||||
{
|
||||
"innerHTML": null,
|
||||
"innerText": null,
|
||||
"outerHTML": "\r\n<META charset=utf-8>",
|
||||
"outerText": null,
|
||||
"tagName": "META",
|
||||
"charset": "utf-8"
|
||||
},
|
||||
{
|
||||
"innerHTML": null,
|
||||
"innerText": null,
|
||||
"outerHTML": null,
|
||||
"outerText": null,
|
||||
"tagName": "META"
|
||||
},
|
||||
{
|
||||
"innerHTML": null,
|
||||
"innerText": null,
|
||||
"outerHTML": "\r\n<META name=viewport content=\"width=device-width, initial-scale=1\">",
|
||||
"outerText": null,
|
||||
"tagName": "META",
|
||||
"name": "viewport",
|
||||
"content": "width=device-width, initial-scale=1"
|
||||
},
|
||||
{
|
||||
"innerHTML": "\r\n\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n ",
|
||||
"innerText": null,
|
||||
"outerHTML": "\r\n<STYLE type=text/css>\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n </STYLE>",
|
||||
"outerText": null,
|
||||
"tagName": "STYLE",
|
||||
"type": "text/css"
|
||||
},
|
||||
{
|
||||
"innerHTML": "<DIV>\r\n<H1>Example Domain</H1>\r\n<P>This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.</P>\r\n<P><A href=\"https://www.iana.org/domains/example\">More information...</A></P></DIV>",
|
||||
"innerText": "Example Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"outerHTML": "\r\n<BODY><DIV>\r\n<H1>Example Domain</H1>\r\n<P>This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.</P>\r\n<P><A href=\"https://www.iana.org/domains/example\">More information...</A></P></DIV></BODY>",
|
||||
"outerText": "Example Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"tagName": "BODY"
|
||||
},
|
||||
{
|
||||
"innerHTML": "<H1>Example Domain</H1>\r\n<P>This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.</P>\r\n<P><A href=\"https://www.iana.org/domains/example\">More information...</A></P>",
|
||||
"innerText": "Example Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"outerHTML": "\r\n<DIV><H1>Example Domain</H1>\r\n<P>This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.</P>\r\n<P><A href=\"https://www.iana.org/domains/example\">More information...</A></P></DIV>",
|
||||
"outerText": "Example Domain\r\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\r\nMore information...",
|
||||
"tagName": "DIV"
|
||||
},
|
||||
{
|
||||
"innerHTML": "Example Domain",
|
||||
"innerText": "Example Domain",
|
||||
"outerHTML": "\r\n<H1>Example Domain</H1>",
|
||||
"outerText": "Example Domain",
|
||||
"tagName": "H1"
|
||||
},
|
||||
{
|
||||
"innerHTML": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.",
|
||||
"innerText": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.",
|
||||
"outerHTML": "\r\n<P>This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.</P>",
|
||||
"outerText": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.",
|
||||
"tagName": "P"
|
||||
},
|
||||
{
|
||||
"innerHTML": "<A href=\"https://www.iana.org/domains/example\">More information...</A>",
|
||||
"innerText": "More information...",
|
||||
"outerHTML": "\r\n<P><A href=\"https://www.iana.org/domains/example\">More information...</A></P>",
|
||||
"outerText": "More information...",
|
||||
"tagName": "P"
|
||||
},
|
||||
{
|
||||
"innerHTML": "More information...",
|
||||
"innerText": "More information...",
|
||||
"outerHTML": "<A href=\"https://www.iana.org/domains/example\">More information...</A>",
|
||||
"outerText": "More information...",
|
||||
"tagName": "A",
|
||||
"href": "https://www.iana.org/domains/example"
|
||||
}
|
||||
],
|
||||
"StatusCode": 200,
|
||||
"StatusDescription": "OK",
|
||||
"RawContentStream": {
|
||||
"CanRead": true,
|
||||
"CanSeek": true,
|
||||
"CanTimeout": false,
|
||||
"CanWrite": true,
|
||||
"Length": 1256,
|
||||
"Capacity": 10000,
|
||||
"Position": 0,
|
||||
"ReadTimeout": null,
|
||||
"WriteTimeout": null
|
||||
},
|
||||
"RawContentLength": 1256,
|
||||
"RawContent": "HTTP/1.1 200 OK\r\nAge: 156043\r\nVary: Accept-Encoding\r\nX-Cache: HIT\r\nAccept-Ranges: bytes\r\nContent-Length: 1256\r\nCache-Control: max-age=604800\r\nContent-Type: text/html; charset=UTF-8\r\nDate: Mon, 08 Mar 2021 07:17:44 GMT\r\nExpires: Mon, 15 Mar 2021 07:17:44 GMT\r\nETag: \"3147526947\"\r\nLast-Modified: Thu, 17 Oct 2019 07:18:26 GMT\r\nServer: ECS (oxr/836D)\r\n\r\n<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <style type=\"text/css\">\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 2em;\n background-color: #fdfdff;\n border-radius: 0.5em;\n box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n div {\n margin: 0 auto;\n width: auto;\n }\n }\n </style> \n</head>\n\n<body>\n<div>\n <h1>Example Domain</h1>\n <p>This domain is for use in illustrative examples in documents. You may use this\n domain in literature without prior coordination or asking for permission.</p>\n <p><a href=\"https://www.iana.org/domains/example\">More information...</a></p>\n</div>\n</body>\n</html>\n",
|
||||
"BaseResponse": {
|
||||
"IsMutuallyAuthenticated": false,
|
||||
"Cookies": [],
|
||||
"Headers": [
|
||||
"Age",
|
||||
"Vary",
|
||||
"X-Cache",
|
||||
"Accept-Ranges",
|
||||
"Content-Length",
|
||||
"Cache-Control",
|
||||
"Content-Type",
|
||||
"Date",
|
||||
"Expires",
|
||||
"ETag",
|
||||
"Last-Modified",
|
||||
"Server"
|
||||
],
|
||||
"SupportsHeaders": true,
|
||||
"ContentLength": 1256,
|
||||
"ContentEncoding": "",
|
||||
"ContentType": "text/html; charset=UTF-8",
|
||||
"CharacterSet": "UTF-8",
|
||||
"Server": "ECS (oxr/836D)",
|
||||
"LastModified": "/Date(1571296706000)/",
|
||||
"StatusCode": 200,
|
||||
"StatusDescription": "OK",
|
||||
"ProtocolVersion": {
|
||||
"Major": 1,
|
||||
"Minor": 1,
|
||||
"Build": -1,
|
||||
"Revision": -1,
|
||||
"MajorRevision": -1,
|
||||
"MinorRevision": -1
|
||||
},
|
||||
"ResponseUri": "https://www.example.com/",
|
||||
"Method": "GET",
|
||||
"IsFromCache": false
|
||||
},
|
||||
"Headers": {
|
||||
"Age": "156043",
|
||||
"Vary": "Accept-Encoding",
|
||||
"X-Cache": "HIT",
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "1256",
|
||||
"Cache-Control": "max-age=604800",
|
||||
"Content-Type": "text/html; charset=UTF-8",
|
||||
"Date": "Mon, 08 Mar 2021 07:17:44 GMT",
|
||||
"Expires": "Mon, 15 Mar 2021 07:17:44 GMT",
|
||||
"ETag": "\"3147526947\"",
|
||||
"Last-Modified": "Thu, 17 Oct 2019 07:18:26 GMT",
|
||||
"Server": "ECS (oxr/836D)"
|
||||
}
|
||||
}
|
|
@ -520,7 +520,7 @@ class MockLoader
|
|||
"curl -i -X OPTIONS --connect-timeout 60 --max-time 120 -H 'Access-Control-Request-Method: GET' -H 'Access-Control-Request-Headers: origin, x-requested-with' -H 'Origin: http://www.example.com' 'http://www.example.com'" => cmd.call("http-remote-options-request"),
|
||||
|
||||
# http resource - windows
|
||||
"Invoke-WebRequest -Method Get -TimeoutSec 120 https://www.example.com | Select-Object -Property * | ConvertTo-json" => cmd.call("http-windows-remote-no-options"),
|
||||
"Invoke-WebRequest -Method GET -TimeoutSec 120 'https://www.example.com' | Select-Object -Property * | ConvertTo-json" => cmd.call("http-windows-remote-no-options"),
|
||||
# elasticsearch resource
|
||||
"curl -H 'Content-Type: application/json' http://localhost:9200/_nodes" => cmd.call("elasticsearch-cluster-nodes-default"),
|
||||
"curl -k -H 'Content-Type: application/json' http://localhost:9200/_nodes" => cmd.call("elasticsearch-cluster-no-ssl"),
|
||||
|
|
|
@ -245,16 +245,19 @@ describe "Inspec::Resources::Http" do
|
|||
end
|
||||
|
||||
describe "Windows" do
|
||||
let(:backend) { MockLoader.new.backend }
|
||||
let(:backend) { MockLoader.new(:windows).backend }
|
||||
let(:http_method) { "GET" }
|
||||
let(:url) { "http://www.example.com" }
|
||||
let(:url) { "https://www.example.com" }
|
||||
let(:opts) { {} }
|
||||
let(:worker) { Inspec::Resources::Http::Worker::Remote.new(backend, http_method, url, opts) }
|
||||
|
||||
describe "simple HTTP request with no options" do
|
||||
it "returns correct data" do
|
||||
Inspec::Resources::Cmd.any_instance
|
||||
.stubs(:exist?)
|
||||
.returns(true)
|
||||
_(worker.status).must_equal 200
|
||||
_(worker.body).must_equal "no options"
|
||||
_(worker.response_headers['Content-Type']).must_equal "text/html; charset=UTF-8"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue