en-US/ApertaCookie-help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Convert-CookieTime</command:name>
      <command:verb>Convert</command:verb>
      <command:noun>CookieTime</command:noun>
      <maml:description>
        <maml:para>Converts cookie epoch time to PowerShell dateTime object</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Cookies store time data in epoch seconds. This function takes in epoch time and converts to a PowerShell dateTime object.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Convert-CookieTime</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>CookieTime</maml:name>
          <maml:Description>
            <maml:para>Chrome Based Time</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">Int64</command:parameterValue>
          <dev:type>
            <maml:name>Int64</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>FireFoxTime</maml:name>
          <maml:Description>
            <maml:para>Specify switch if converting from FireFox time</maml:para>
          </maml:Description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
        <maml:name>CookieTime</maml:name>
        <maml:Description>
          <maml:para>Chrome Based Time</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">Int64</command:parameterValue>
        <dev:type>
          <maml:name>Int64</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>FireFoxTime</maml:name>
        <maml:Description>
          <maml:para>Specify switch if converting from FireFox time</maml:para>
        </maml:Description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.DateTime</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para>Author: Jake Morrison - @jakemorrison - https://www.techthoughts.info/ Chrome timestamp is formatted as the number of microseconds since January, 1601 FireFox does its time based on January, 1970 ISO 8601 EPOCH format</maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <dev:code>Convert-CookieTime -CookieTime 13267233550477440</dev:code>
        <dev:remarks>
          <maml:para>Thursday, June 3, 2021 22:39:10</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
        <dev:code>Convert-CookieTime -CookieTime 1616989552356002 -FireFoxTime</dev:code>
        <dev:remarks>
          <maml:para>Monday, March 29, 2021 03:45:52</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Get-DecryptedCookiesInfo</command:name>
      <command:verb>Get</command:verb>
      <command:noun>DecryptedCookiesInfo</command:noun>
      <maml:description>
        <maml:para>Retrieves cookies from SQLite database of specified browser and decrypts encrypted cookie values. Returns web session if specified.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Queries SQLite cookies database for browser specified and retrieves all cookies. If domain is specified, retrieves only cookies that match domain. If cookies have encrypted contents, they are decrypted.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-DecryptedCookiesInfo</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>Browser</maml:name>
          <maml:Description>
            <maml:para>Browser choice</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
          <maml:name>DomainName</maml:name>
          <maml:Description>
            <maml:para>Domain to search for in Cookie Database</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>WebSession</maml:name>
          <maml:Description>
            <maml:para>If specified cookies are loaded into a Microsoft.PowerShell.Commands.WebRequestSession and returned for session use.</maml:para>
          </maml:Description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
        <maml:name>Browser</maml:name>
        <maml:Description>
          <maml:para>Browser choice</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
        <maml:name>DomainName</maml:name>
        <maml:Description>
          <maml:para>Domain to search for in Cookie Database</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>WebSession</maml:name>
        <maml:Description>
          <maml:para>If specified cookies are loaded into a Microsoft.PowerShell.Commands.WebRequestSession and returned for session use.</maml:para>
        </maml:Description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCustomObject</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>-or-</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>Microsoft.PowerShell.Commands.WebRequestSession</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para>Author: Jake Morrison - @jakemorrison - https://www.techthoughts.info/ It took a lot longer to make this than I thought it would. Only up to 300 cookies can be loaded into a WebSession. Cookie decryption is currently only supported on Windows. Visit https://github.com/techthoughts2/ApertaCookie to see how you can contribute to Linux and MacOS cookie decryption.</maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <dev:code>Get-DecryptedCookiesInfo -Browser Edge</dev:code>
        <dev:remarks>
          <maml:para>Returns all cookie information from Edge - cookies are decrypted.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
        <dev:code>Get-DecryptedCookiesInfo -Browser FireFox</dev:code>
        <dev:remarks>
          <maml:para>Returns all cookie information from Firefox. Note: no decryption takes place as FireFox cookies are not encrypted.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title>
        <dev:code>$session = Get-DecryptedCookiesInfo -Browser Chrome -WebSession -Domain twitter</dev:code>
        <dev:remarks>
          <maml:para>Cookies found in the Chrome cookie database that match twitter are decrypted and loaded into a WebSession and returned for use.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 4 --------------------------</maml:title>
        <dev:code>$session = Get-DecryptedCookiesInfo -Browser FireFox -WebSession -Domain facebook
$response = Invoke-WebRequest -Uri 'https://m.facebook.com/119812241410296' -WebSession $session</dev:code>
        <dev:remarks>
          <maml:para>Cookies found in the FireFox cookie database that match facebook are loaded into a WebSession and that websession is used to visit the Facebook PowerShell page.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Get-RawCookiesFromDB</command:name>
      <command:verb>Get</command:verb>
      <command:noun>RawCookiesFromDB</command:noun>
      <maml:description>
        <maml:para>Retrieves raw cookies from the specified SQLite database</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Uses PSSQLite to run a query against the specified SQLite database to retrieve cookies. The database queried is discovered based on the specified browser. If a domain is specified a query is run to return cookies that match that domain name.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-RawCookiesFromDB</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>Browser</maml:name>
          <maml:Description>
            <maml:para>Browser choice</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
          <maml:name>DomainName</maml:name>
          <maml:Description>
            <maml:para>Domain to search for in Cookie Database</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
        <maml:name>Browser</maml:name>
        <maml:Description>
          <maml:para>Browser choice</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
        <maml:name>DomainName</maml:name>
        <maml:Description>
          <maml:para>Domain to search for in Cookie Database</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Management.Automation.PSCustomObject</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para>Author: Jake Morrison - @jakemorrison - https://www.techthoughts.info/ Cookies that are returned are ENCRYPTED. You will need to decrypt them. Except FireFox. FireFox cookies are not encrypted.</maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <dev:code>Get-RawCookiesFromDB -Browser Edge</dev:code>
        <dev:remarks>
          <maml:para>Returns all cookies in the Edge SQLite database</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
        <dev:code>Get-RawCookiesFromDB -Browser Edge -Domain 'twitter'</dev:code>
        <dev:remarks>
          <maml:para>Returns all cookies in the Edge SQLite database that are like domain twitter</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
</helpItems>