Effacez toutes ses traces de session dans Chromium

J’ai découvert sous Chromium l’extension Close & Clean. Elle ajoute une icône sous forme de case à cocher rouge,dans la barre d’adresses. En cliquant sur cette icône, vous fermez Chromium et l’extension se charge de nettoyer votre profil des données personnelles cumulées au court de votre navigation. Enfin… presque. Car, que ce soit avec Close & Clean ou Privacy Manager, j’ai eu la désagréable surprise de voir qu’il restait encore des données personnelles accessibles à partir de l’url chrome://settings/siteData ! Il vous est toujours possible de tout effacer en lançant le raccourci de touches Ctrl+Shift+Del ou bien à partir de l’url chrome://settings/clearBrowserData. Mais comment l’automatiser ?

Effacez toutes ses traces de session dans Chromium

Un script PowerShell  pour lancer Chromium

Comme ma station  est sous Windows, j’ai pensé à faire un script PowerShell. Avec Process Monitor de Sysinternals, j’ai assez vite vu quels fichiers étaient effacés en réalisant une suppression manuelle. En fait, l’extension ne parvient pas à effacer les données contenues dans le dossier Default\File System de votre profil Chromium.

Clear-Host
#Arrêt brutal de tous les process chrome.exe
Get-Process|Where-Object -Property ProcessName -eq 'Chrome'|Stop-Process
#Vidage du cache
$ramdisk=(Get-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Chromium').DiskCacheDir
If(Test-Path -Path $path)
{
 Get-ChildItem -Path $ramdisk -Filter 'chrome_BITS_*'|Remove-Item -Force -Recurse
}
$path=$ramdisk+"Default"
Get-ChildItem -Path $path -Filter '*'|Remove-Item -Force -Recurse
#Emplacement du profil
$userdata='D:\chromium\userdata'
$default="$userdata\Default"
#Nettoyage des fichiers log
#Get-ChildItem -Path $userdata -Recurse -Filter '*.log'|Where -Property Length -gt 0|Remove-Item -Force
#Nettoyage des fichiers tmp
Get-ChildItem -Path $userdata -Recurse -Filter '*.tmp'|Where -Property Length -gt 0|Remove-Item -Force
#Nettoyage des données la session précédente
$path="$default\Current Session"
If(Test-Path -Path $path)
{
 Remove-Item -Path $path -Force
}
$path="$default\Current Tabs"
If(Test-Path -Path $path)
{
 Remove-Item -Path $path -Force
}
$path="$default\Last Session"
If(Test-Path -Path $path)
{
 Remove-Item -Path $path -Force
}
$path="$default\Last Tabs"
If(Test-Path -Path $path)
{
 Remove-Item -Path $path -Force
}
#Nettoyage des tables sqlite
sqlite3 "$default\Favicons" "DELETE FROM icon_mapping;DELETE FROM favicon_bitmaps;DELETE FROM favicons;VACUUM;REINDEX;"
sqlite3 "$default\History" "DELETE FROM urls;DELETE FROM downloads_url_chains;DELETE FROM downloads;VACUUM;REINDEX;"
sqlite3 "$default\Network Action Predictor" "DELETE FROM network_action_predictor;VACUUM;REINDEX;"
sqlite3 "$default\QuotaManager" "DELETE FROM OriginInfoTable;DELETE FROM HostQuotaTable;VACUUM;REINDEX;"
sqlite3 "$default\Shortcuts" "DELETE FROM omni_box_shortcuts;VACUUM;REINDEX;"
#sqlite3 "$default\Top Sites" "DELETE FROM thumbnails;VACUUM;REINDEX;"
sqlite3 "$default\Web Data" "DELETE FROM autofill;DELETE FROM autofill_profile_emails;DELETE FROM autofill_profile_names;DELETE FROM autofill_profile_phones;VACUUM;REINDEX;"
#Nettoyage du fichier Preferences
$path="$default\Preferences"
$content=Get-Content -Path $path
If($content -match '^(.*"media_engagement":{)(.*)(},"media_stream_camera":.*)$')
{
 $content=$Matches[1]+$Matches[3]
}
If($content -match '^(.*"site_engagement":{)(.*)(},"sound":.*)$')
{
 $content=$Matches[1]+$Matches[3]
}
$content|Set-Content -Path $path -Force
#Nettoyage du fichier Network Persistent State
$path="$default\Network Persistent State"
$content=Get-Content -Path $path
If($content -match '^(.*"broken_alternative_services":\[\{)(.*)(\}\],"servers":.*)$')
{
 $content=$Matches[1]+$Matches[3]
}
If($content -match '^(.*"servers":\[\{)(.*)(\}\],"version":.*)$')
{
 $content=$Matches[1]+$Matches[3]
}
$content|Set-Content -Path $path -Force
#Nettoyage du dossier File System, tout en conservant les dossiers 020 et Origins
$path="$default\File System"
Get-ChildItem -Path $path|Where -Property Name -NotIn '020','Origins'|Remove-Item -Force -Recurse
#Nettoyage du dossier IndexDB
$path="$default\IndexedDB"
Get-ChildItem -Path $path|Where -Property Name -NotMatch '^chrome-extension_'|Remove-Item -Force -Recurse
#Sans doute lié aux crashs et aux derniers sites visités
#$path="$default\JumpListIconsMostVisited"
#Get-ChildItem -Path $path|Where -Property Name -Match '\.tmp$'|Remove-Item -Force -Recurse
#$path="$default\JumpListIconsRecentClosed"
#Get-ChildItem -Path $path|Where -Property Name -Match '\.tmp$'|Remove-Item -Force -Recurse
#Nettoyage du dossier CacheStorage
$path="$default\Service Worker\CacheStorage"
Get-ChildItem -Path $path|Remove-Item -Force -Recurse
#Nettoyage du dossier Local Storage
$path="$default\Local Storage\leveldb"
Get-ChildItem -Path $path -filter '*'|Remove-Item -Force
#Nettoyage du dossier Media Cache
$path="$default\Media Cache"
Get-ChildItem -Path $path -filter '*'|Remove-Item -Force
#Nettoyage du dossier Session Storage
$path="$default\Session Storage"
Get-ChildItem -Path $path -filter '*'|Remove-Item -Force
#Nettoyage des objets Flash
#$path="$userdata\Pepper Data\Shockwave Flash\WritableRoot\#SharedObjects\UK36RVA6\macromedia.com\support\flashplayer\sys"
#Get-ChildItem -Path $path|Where -Property Name -Match '^#'|Remove-Item -Force -Recurse
$path="$default\Pepper Data\Shockwave Flash\WritableRoot\#SharedObjects"
If(Test-Path -Path $path)
{
 Get-ChildItem -Path $path -Recurse|Where -Property Name -Match '^#'|Remove-Item -Force -Recurse
}
#Notifications
$path="$default\Platform Notifications"
Get-ChildItem -Path $path|Remove-Item -Force -Recurse
#Scripts
$path="$default\Service Worker\ScriptCache"
Get-ChildItem -Path $path|Where -Property Name -NotMatch '^index'|Remove-Item -Force -Recurse
#Stats Média
$path="$default\VideoDecodeStats"
Get-ChildItem -Path $path|Remove-Item -Force -Recurse
#Top Sites
$path="$default\Top Sites"
If(Test-Path -Path $path)
{
 Get-ChildItem -Path $path|Remove-Item -Force -Recurse
}
$path="$default\Top Sites-journal"
If(Test-Path -Path $path)
{
 Get-ChildItem -Path $path|Remove-Item -Force -Recurse
}
#Scripts
$path="$default\Service Worker\Session Storage"
If(Test-Path -Path $path)
{
 Get-ChildItem -Path $path|Where -Property Name -Match '\.log$'|Remove-Item -Force -Recurse
}
#Lancement de Chrome
$process = "C:\Program Files (x86)\chrome-win32\chrome.exe"
Start-Process -FilePath $process
Exit

Scripting / , , , ,

deneme bonusu veren siteler casino siteleri betdenemebonusu.com bahis siteleri Ev eşyası depolama Depolama Şehirlerarası evden eve nakliyat Evden eve nakliyat Eşya depolama yurtdışına ev taşıma Türkiye'den Almanya'ya ev taşıma zati eşya tasimaciligi uluslararasi zati eşya tasimaciligi eşya depolama şehirler arası nakliyat asansörlü nakliyat greatplay.net güvenilir online bahis siteler 2022 jetbahis Rexbet hovarda mobilbahis güncel adres sartsız Deneme Bonus sekabet maltcasino güncel adres> pinbahis100.com betduman.com olabahis.top سایت شرط بندی shartkade.com 1xbet-mobil.com beykoz evden eve nakliyat ataşehir evden eve nakliyat şişli evden eve nakliyat istanbul evden eve nakliyat
teens porn videos free sex xxx sexy videos