oemript Posted February 22, 2018 Posted February 22, 2018 I would like to know on how to retrieve cookies on sample 2. Sample 1 $URL = Invoke-WebRequest http://www.google.com $URL.BaseResponse.Cookies Sample 2 $URL = "http://www.google.com" (Invoke-WebRequest -Uri $URL -SessionVariable Y -UseBasicParsing).Content | Out-File -FilePath C:\TEMP.txt $URL.baseresponse.cookies, which show nothing Does anyone have any suggestions? Thanks in advance for any suggestions
Zero_T Posted September 27, 2018 Posted September 27, 2018 (edited) Assuming you want the page in that TEMP.txt file and cookies in the terminal: $URL = "http://www.google.com" $missing = (Invoke-WebRequest -Uri $URL -SessionVariable Y -UseBasicParsing) $missing.Content | Out-File -FilePath C:\TEMP.txt $missing.baseresponse.cookies Edited September 27, 2018 by Zero_T MsgBox('','',(StringFromASCIIArray(StringSplit('13:65:108:108:32:116' _ &':104:111:115:101:32:109:111:109:101:110:116:115:32:119:105:108:108' _ &':32:98:101:32:108:111:115:116:32:105:110:32:116:105:109:101:44:32:' _ &'108:105:107:101:32:116:101:97:114:115:32:105:110:32:114:97:105:110' _ &':46:32:84:105:109:101:32:116:111:32:100:105:101:46:13',":",2))))
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now