Last active
September 1, 2017 00:52
-
-
Save atiq-cs/8b8a225428b0ee4d7c916045e1fb29e9 to your computer and use it in GitHub Desktop.
Required in Windows when under Proxy for v8/chromium checkout file last modified: July 20, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/bootstrap/win/get_file.js b/bootstrap/win/get_file.js | |
| index 2561fb3c..a4a5c4f6 100644 | |
| --- a/bootstrap/win/get_file.js | |
| +++ b/bootstrap/win/get_file.js | |
| @@ -6,20 +6,37 @@ function Download(url, path, verbose) { | |
| if (verbose) { | |
| WScript.StdOut.Write(" * GET " + url + "..."); | |
| } | |
| - try { | |
| - xml_http = new ActiveXObject("MSXML2.ServerXMLHTTP"); | |
| - } catch (e) { | |
| - WScript.StdOut.WriteLine("[-] XMLHTTP " + new Number(e.number).toHex() + | |
| - ": Cannot create Active-X object (" + e.description) + ")."; | |
| - WScript.Quit(1); | |
| - } | |
| - try { | |
| - xml_http.open("GET", url, false); | |
| - } catch (e) { | |
| - WScript.StdOut.WriteLine("[-] XMLHTTP " + new Number(e.number).toHex() + | |
| - ": invalid URL."); | |
| - WScript.Quit(1); | |
| - } | |
| +try { | |
| + | |
| + xml_http = new ActiveXObject("MSXML2. ServerXMLHTTP.5.0 "); | |
| + | |
| + } catch (e) { | |
| + | |
| + WScript.StdOut.WriteLine("[-] XMLHTTP " + new Number | |
| +(e.number).toHex() + | |
| + | |
| + ": Cannot create Active-X object (" + e.description) + ")."; | |
| + | |
| + WScript.Quit(1); | |
| + | |
| + } | |
| + | |
| + try { | |
| + | |
| + xml_http.setProxy(2, "proxy.domain.com:proxy_port"); | |
| + | |
| + xml_http.open("GET", url, false); | |
| + | |
| + } catch (e) { | |
| + | |
| + WScript.StdOut.WriteLine("[-] XMLHTTP " + new Number | |
| +(e.number).toHex() + | |
| + | |
| + ": invalid URL."); | |
| + | |
| + WScript.Quit(1); | |
| + | |
| + } | |
| var response_body = null; | |
| var size_description = "?"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment