1

Closed

Collect browser cookies

description

Copy IE and Firefox browser cookies from all user profiles.
 
These cookies can then be inspected offline using Nirsoft's IECookiesView or MozillaCookiesView
 
http://www.nirsoft.net/utils/iecookies.html
http://www.nirsoft.net/utils/mzcv.html
 
(This modification currently depends on the alternate version detection code I listed in the version detection issue tracker thread, but can easily be modified if another method is used.)
 
ECHO.
ECHO ***************************************************************************
ECHO Collecting Cookies.
ECHO ***************************************************************************
ECHO.
 
now.exe [Collecting Cookies.] >> %LOGS%:\Livecap_%COMPUTERNAME%\MIR-ROR.log
 
IF %OSNAME% == XP GOTO XP_COOKIES
IF %OSNAME% == Vista GOTO VISTA_COOKIES
GOTO SKIP_COOKIES
 
:XP_COOKIES
ECHO Now collecting IE Cookies...
for /F %%i in ('dir /b "c:\Documents and Settings"') do @mkdir "%LOGS%:\Livecap_%COMPUTERNAME%\%%i_cookies" & xcopy /e /c /q /i /g /h /y "c:\Documents and Settings\%%i\Cookies" "%LOGS%:\Livecap_%COMPUTERNAME%\%%i_cookies" 2>> %LOGS%:\Livecap_%COMPUTERNAME%\MIR-ROR.log
 
IF NOT EXIST "C:\Program Files\Mozilla Firefox" GOTO FINISH_COOKIES
ECHO Now searching for Firefox profiles and gathering Firefox cookies.
ECHO.
ECHO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ECHO This may generate some "The system cannot find the
ECHO path specified" error messages if a user doesn't
ECHO have a Firefox profile.
ECHO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ECHO.
 
for /F %%u in ('dir /b "c:\Documents and Settings"') do for /F %%p in ('dir /b "c:\Documents and Settings\%%u\Application Data\Mozilla\Firefox\Profiles\"') do @copy /v /y "c:\Documents and Settings\%%u\Application Data\Mozilla\Firefox\Profiles\%%p\cookies.sqlite" "%LOGS%:\Livecap_%COMPUTERNAME%\mzcv_%%u_%%p_cookies.sqlite" 2>> %LOGS%:\Livecap_%COMPUTERNAME%\MIR-ROR.log
 
GOTO FINISH_COOKIES
 
:VISTA_COOKIES
ECHO Now collecting IE Cookies...
for /F %%i in ('dir /b c:\Users') do @mkdir "%LOGS%:\Livecap_%COMPUTERNAME%\%%i_cookies" & xcopy /e /c /q /i /g /h /y "c:\Users\%%i\AppData\Roaming\Microsoft\Windows\Cookies" "%LOGS%:\Livecap_%COMPUTERNAME%\%%i_cookies" 2>> %LOGS%:\Livecap_%COMPUTERNAME%\MIR-ROR.log
 
IF NOT EXIST "C:\Program Files\Mozilla Firefox" GOTO FINISH_COOKIES
ECHO Now searching for Firefox profiles and gathering Firefox cookies.
ECHO.
ECHO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ECHO This may generate some "The system cannot find the
ECHO path specified" error messages if a user doesn't
ECHO have a Firefox profile.
ECHO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ECHO.
 
for /F %%u in ('dir /b c:\Users') do for /F %%p in ('dir /b c:\Users\%%u\AppData\Roaming\Mozilla\Firefox\Profiles\') do @copy /v /y "c:\Users\%%u\AppData\Roaming\Mozilla\Firefox\Profiles\%%p\cookies.sqlite" "%LOGS%:\Livecap_%COMPUTERNAME%\mzcv_%%u_%%p_cookies.sqlite" 2>> %LOGS%:\Livecap_%COMPUTERNAME%\MIR-ROR.log
 
GOTO FINISH_COOKIES
 
:SKIP_COOKIES
ECHO Unable to locate Cookie directories.
now.exe [Unable to locate Cookie directories.] >> %LOGS%:\Livecap_%COMPUTERNAME%\MIR-ROR.log
 
:FINISH_COOKIES
Closed Mar 22, 2012 at 6:22 AM by RussMcRee
Update included in 2.0 stable release.

comments