Skip to content

Instantly share code, notes, and snippets.

@xoner
Created May 12, 2017 06:30
Show Gist options
  • Save xoner/2269ab835d5c5f89cf1876823f0a0c2d to your computer and use it in GitHub Desktop.
Save xoner/2269ab835d5c5f89cf1876823f0a0c2d to your computer and use it in GitHub Desktop.
Powershell script that runs in backgroud and randomly kills the tor and the tor browser processes.
while ($true) {
$randomSleep = Get-Random -minimum 20 -maximum 45;
Write-Output "Sleeping $randomSleep";
Start-Sleep $randomSleep;
$torProcess = Get-Process | Where { $_.ProcessName -eq "tor" }
$torFirefox = Get-Process | Where { $_.Description -eq "Tor Browser" }
taskkill.exe /F /PID $torProcess.Id
taskkill.exe /F /PID $torFirefox.Id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment