Jump to content

Search the Community

Showing results for tags 'cookies'.

  • 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

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 4 results

  1. Hello , A website I am trying to login with my credentials. And retrieve the cookie into a text file. Unable to do so. Is it that certain, Httponly , type - are not allowed to be fetched. Then further , I will be checking every 5 minutes if my session is active , else re-login and re-fetch the cookie. For the second part , I will probably fetch some table and see if not in appropriate format do Part 1 : Fetch Cookie - again. Any better way , tips would be appreciated. Thanks
  2. Hi everyone! i have Two-Problems: I've used this code to decode and export cookies from Google Chrome application's "C:\Users\%username%\AppData\Local\Google\Chrome\User Data\Default\Cookie" file but i can't receive any data: #include <CryptProtect.au3> #include <SQLite.au3> #include <SQLite.dll.au3> Global Const $g_sLoc_Output = @ScriptDir & "\Cookies.txt" If FileExists($g_sLoc_Output) Then FileDelete($g_sLoc_Output) EndIf $hFO_Output = FileOpen($g_sLoc_Output ,1) If $hFO_Output <> -1 Then FileWrite($hFO_Output, Chrome()) FileFlush($hFO_Output) FileClose($hFO_Output) EndIf Func Chrome() Local $q, $r, $sOutput, $sLoc_ChromeDB = EnvGet("localappdata") & "\Google\Chrome\User Data\Default\Cookies" If FileExists($sLoc_ChromeDB) = False Then Return "" _SQLite_Startup() If @error Then MsgBox(16, "SQLite Error", "SQLite3.dll Can't be Loaded! - " & $__g_hPrintCallback_SQLite & @CRLF & @CRLF & "Exiting application") Exit -1 EndIf _SQLite_Open($sLoc_ChromeDB) _SQLite_Query(-1, 'SELECT host_key, name, value, encrypted_value FROM cookies', $q) While _SQLite_FetchData($q, $r) = 0 $sOutput = $sOutput & r[0] & @CRLF & r[1] WEnd _SQLite_Close() _SQLite_Shutdown() Return $sOutput EndFunc I've used this code too for decrypt my saved passwords and export from Google Chrome application's "C:\Users\%username%\AppData\Local\Google\Chrome\User Data\Default\Login Data" file but i can't get decrypted data: #include <CryptProtect.au3> #include <SQLite.au3> #include <SQLite.dll.au3> Global Const $g_sLoc_Output = @ScriptDir & "\Credentials.txt" If FileExists($g_sLoc_Output) Then FileDelete($g_sLoc_Output) EndIf $hFO_Output = FileOpen($g_sLoc_Output ,1) If $hFO_Output <> -1 Then FileWrite($hFO_Output, Chrome()) FileFlush($hFO_Output) FileClose($hFO_Output) EndIf Func Chrome() Local $q, $r, $sOutput, $sLoc_ChromeDB = EnvGet("localappdata") & "\Google\Chrome\User Data\Default\Login Data" If FileExists($sLoc_ChromeDB) = False Then Return "" _SQLite_Startup() If @error Then MsgBox(16, "SQLite Error", "SQLite3.dll Can't be Loaded! - " & $__g_hPrintCallback_SQLite & @CRLF & @CRLF & "Exiting application / Zavolej Honzovi") Exit -1 EndIf _SQLite_Open($sLoc_ChromeDB) _SQLite_Query(-1, "select * from logins;", $q) While _SQLite_FetchData($q, $r) = 0 $sOutput = $sOutput & "======================| " & $r[7] & " |======================" & @CRLF & "Login URL: " & $r[0] & @CRLF & "Email/User: " & $r[3] & @CRLF & "Password: " & _CryptUnprotectData($r[5], "") & @CRLF & @CRLF WEnd _SQLite_Close() _SQLite_Shutdown() Return $sOutput EndFunc Thanks!
  3. 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
  4. 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...