Skip to content

Instantly share code, notes, and snippets.

@ShadowTomb
ShadowTomb / setdns.ps1
Created May 20, 2026 20:01
set DNS to 1.1.1.1
$dns = @('1.1.1.1','1.0.0.1')
$adapters = Get-NetAdapter -Physical | Where-Object Status -eq 'Up'
foreach ($a in $adapters) {
Write-Host "Setting DNS on adapter: $($a.Name) (ifIndex $($a.ifIndex))"
Set-DnsClientServerAddress -InterfaceIndex $a.ifIndex -ServerAddresses $dns
}
ipconfig /flushdns | Out-Null
Write-Host ""
Write-Host "=== current DNS per adapter ==="
Get-DnsClientServerAddress -AddressFamily IPv4 | Where-Object { $_.ServerAddresses } | Select-Object InterfaceAlias, ServerAddresses | Format-Table -AutoSize
@ShadowTomb
ShadowTomb / install_python2.ps1
Created May 20, 2026 19:30
install python via python.org installer
$ErrorActionPreference = 'Continue'
$ProgressPreference = 'SilentlyContinue' # disable PowerShell progress bar (much faster downloads)
$pyVer = '3.12.7'
$installer = "$env:TEMP\python-$pyVer-amd64.exe"
$url = "https://www.python.org/ftp/python/$pyVer/python-$pyVer-amd64.exe"
Write-Host "=== downloading Python $pyVer installer ==="
try {
Invoke-WebRequest -Uri $url -OutFile $installer -UseBasicParsing
@ShadowTomb
ShadowTomb / install_python.ps1
Created May 20, 2026 19:29
install python + clicker deps
$ErrorActionPreference = 'Continue'
Write-Host '=== checking winget ==='
winget --version 2>&1 | Select-Object -First 3
Write-Host ''
Write-Host '=== installing Python 3.12 (no UAC, user-scope) ==='
# --scope user keeps it out of Program Files (no UAC needed)
# Accept agreements so no interactive prompt
winget install --id Python.Python.3.12 --scope user --silent --accept-source-agreements --accept-package-agreements --disable-interactivity 2>&1 | Select-Object -Last 12
@ShadowTomb
ShadowTomb / inspect_clicker.ps1
Created May 20, 2026 19:27
inspect clicker deploy
$ErrorActionPreference = 'Continue'
$root = 'C:\Users\1\Desktop\petmart-tools\clicker-deploy'
if (-not (Test-Path $root)) { Write-Host "MISSING: $root"; exit 1 }
Write-Host '=== top level ==='
Get-ChildItem $root | Select-Object Name, @{N='K';E={if($_.PSIsContainer){'D'}else{'F'}}}, Length, LastWriteTime | Format-Table -AutoSize
Write-Host ''
Write-Host '=== all .py files (head names) ==='
Get-ChildItem -Path $root -Filter '*.py' -Recurse | Select-Object FullName, Length | Format-Table -AutoSize
@ShadowTomb
ShadowTomb / fix_tunnel.ps1
Created May 20, 2026 19:22
petmart bridge tunnel path fix
$ErrorActionPreference = 'Continue'
$root = 'C:\Users\1\Desktop\petmart-tools'
# Locate the moved start_bridge_tunnel.ps1
$candidate = @(
"$root\src\scripts\start_bridge_tunnel.ps1",
"$root\scripts\start_bridge_tunnel.ps1"
) | Where-Object { Test-Path $_ } | Select-Object -First 1
if (-not $candidate) {
@ShadowTomb
ShadowTomb / diag_tasks.ps1
Created May 20, 2026 19:21
petmart task diag
$ErrorActionPreference = 'Continue'
foreach ($n in 'PetmartBridgeTunnel','PetmartLauncherAgent','PetmartClickDaemon','PetmartClickDaemonV2','PetmartClickV3') {
$t = Get-ScheduledTask -TaskName $n -ErrorAction SilentlyContinue
$i = Get-ScheduledTaskInfo -TaskName $n -ErrorAction SilentlyContinue
Write-Host ('=== ' + $n + ' ===')
if (-not $t) { Write-Host ' MISSING TASK'; continue }
$trigKinds = ($t.Triggers | ForEach-Object { $_.CimClass.CimClassName }) -join ','
Write-Host (' Triggers : ' + $trigKinds)
Write-Host (' Enabled : ' + $t.Settings.Enabled)
Write-Host (' State : ' + $t.State)
@ShadowTomb
ShadowTomb / qaa1619f9
Created May 19, 2026 21:53
petmart fix-click setup
$ErrorActionPreference = 'Continue'
# Detect elevation. If elevated, the click will fail (UIPI blocks HIGH->MEDIUM SendInput).
$identity = [Security.Principal.WindowsIdentity]::GetCurrent()
$principal = New-Object Security.Principal.WindowsPrincipal($identity)
$isAdmin = $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
Write-Host "Running as: $($identity.Name)"
Write-Host "Elevated (HIGH IL): $isAdmin"
if ($isAdmin) {
Write-Host "WARNING: PowerShell is elevated. The buy-click step will be blocked by UIPI."