Jump to content

Search the Community

Showing results for tags 'cookies'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 2 results

  1. Hi All, I'm trying to write a small program that automatically logs on to a website using a username and password provided and screenshots the front page (I've checked and this is not against the site's rules). I have the script working using _IECreateEmbedded(), however for some reason the user stays logged in on the website even after I restart my machine. I will be creating a way to actually sign out of the website as well, however to me this implies that some where cookies/sessions are being stored which I do not wish to happed. So is there any way I can flush the cookies/sessions created by the IE instance or something? Thanks in advance
  2. I'm trying to first get a cookie and then replace a certain server Id with a new one. This is to test each application server for our internal application. The following is my function of interest: Func checkAppServer($id) debug("checking app server for id " & $id) ;access application with app server cookie ShellExecute("iexplore.exe", "about:blank") WinWait("Blank Page") Local $oIE = _IEAttach("about:blank", "url") _IELoadWait($oIE) _IENavigate($oIE, "https://application.example.com") If @error Then alert("Login checker failed to access application.") Return EndIf ;get the document Local $oDoc = _IEDocGetObj($oIE) If @error Then alert("Login checker failed to get the document object.") Return EndIf ;get current cookies $newCookies = $oDoc.cookie debug("current cookie string: " & $newCookies) ;replace all app server IDs with this ID For $sServerId In $aAppServerIds If $sServerId == $id Then ContinueLoop debug("checking if we are currently on server " & $sServerId) $newCookies = StringReplace($newCookies, $sServerId, $id, 0, 0) If @extended Then debug("replaced old server id " & $sServerId & " to new server id " & $id) debug("new cookies string: " & $newCookies) EndIf Next ;ensure that we are now on the server of interest If Not StringInStr($newCookies, $id) Then alert("LoginChecker failed to navigate to server with id " & $id & ". Please fix the script!") Exit EndIf debug("overwriting document.cookie") $oDoc.cookie = $newCookies debug("new document.cookie: " & $oDoc.cookie) Exit ;verify HTTP body EndFunc The following output is returned: checking app server for id ffffffffaf1c7718 current cookie string: usernameType=student; COOKIE_CONSENT_ACCEPTED=true; NSC_100732.qspe1_wjq1c.hspvq=ffffffffaf1c771d45525d5f4f58455e445a4a42378b; JSESSIONID=5EB0C22CD06E6D904653F663670B3056.root; session_id=EF0ABD73D15B5E4431CD59107946E9A9; s_session_id=0D26A888B87A5CF9D07020CF5B5A5955 checking if we are currently on server ffffffffaf1c771b checking if we are currently on server ffffffffaf1c771a checking if we are currently on server ffffffffaf1c771d replaced old server id ffffffffaf1c771d to new server id ffffffffaf1c7718 new cookies string: usernameType=student; COOKIE_CONSENT_ACCEPTED=true; NSC_100732.qspe1_wjq1c.hspvq=ffffffffaf1c771845525d5f4f58455e445a4a42378b; JSESSIONID=5EB0C22CD06E6D904653F663670B3056.root; session_id=EF0ABD73D15B5E4431CD59107946E9A9; s_session_id=0D26A888B87A5CF9D07020CF5B5A5955 checking if we are currently on server ffffffffaf1c776c overwriting document.cookie new document.cookie: usernameType=student; COOKIE_CONSENT_ACCEPTED=true; NSC_100732.qspe1_wjq1c.hspvq=ffffffffaf1c771d45525d5f4f58455e445a4a42378b; JSESSIONID=5EB0C22CD06E6D904653F663670B3056.root; session_id=EF0ABD73D15B5E4431CD59107946E9A9; s_session_id=0D26A888B87A5CF9D07020CF5B5A5955 This means that: the cookie is retrieved correctly the ID of interest is replaced correctly, and set to $newCookies when executing $oDoc.cookie = $newCookies, $oDoc.cookie does not actually changeWhy does it appear impossible to set $oDoc.cookie?
×
×
  • Create New...