Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Script]: Block Adobe Geolocation Hosts #520

Open
P0W3 opened this issue Feb 24, 2025 · 0 comments
Open

[New Script]: Block Adobe Geolocation Hosts #520

P0W3 opened this issue Feb 24, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@P0W3
Copy link

P0W3 commented Feb 24, 2025

Operating system

Windows

Name of the script

Block Adobe Geolocation Hosts

Documentation/References

This script will disable the geo2.adobe.com subdomain in the hosts file.

Reference 1: https://community.adobe.com/t5/flash-player-discussions/what-is-geo2-adobe-com/td-p/9814328
Reference 2: https://www.netify.ai/resources/hostnames/geo2.adobe.com
Reference 3: https://domain.glass/geo2.adobe.com
Reference 4: https://app.any.run/tasks/f5cfa096-2777-419a-b42f-5f6b372c7a07

Code

:: Block Adobe Geolocation Hosts
echo --- Block Adobe Geolocation Hosts
:: Add hosts entries for geo2.adobe.com
PowerShell -ExecutionPolicy Unrestricted -Command "$domain ='geo2.adobe.com'; $hostsFilePath = "^""$env:SYSTEMROOT\System32\drivers\etc\hosts"^""; $comment = "^""managed by privacy.sexy"^""; $hostsFileEncoding = [Microsoft.PowerShell.Commands.FileSystemCmdletProviderEncoding]::Utf8; $blockingHostsEntries = @(; @{ AddressType = "^""IPv4"^"";  IPAddress = '0.0.0.0'; }; @{ AddressType = "^""IPv6"^"";  IPAddress = '::1'; }; ); try { $isHostsFilePresent = Test-Path -Path $hostsFilePath -PathType Leaf -ErrorAction Stop; } catch { Write-Error "^""Failed to check hosts file existence. Error: $_"^""; exit 1; }; if (-Not $isHostsFilePresent) { Write-Output "^""Creating a new hosts file at $hostsFilePath."^""; try { New-Item -Path $hostsFilePath -ItemType File -Force -ErrorAction Stop | Out-Null; Write-Output "^""Successfully created the hosts file."^""; } catch { Write-Error "^""Failed to create the hosts file. Error: $_"^""; exit 1; }; }; foreach ($blockingEntry in $blockingHostsEntries) { Write-Output "^""Processing addition for $($blockingEntry.AddressType) entry."^""; try { $hostsFileContents = Get-Content -Path "^""$hostsFilePath"^"" -Raw -Encoding $hostsFileEncoding -ErrorAction Stop; } catch { Write-Error "^""Failed to read the hosts file. Error: $_"^""; continue; }; $hostsEntryLine = "^""$($blockingEntry.IPAddress)`t$domain $([char]35) $comment"^""; if ((-Not [String]::IsNullOrWhiteSpace($hostsFileContents)) -And ($hostsFileContents.Contains($hostsEntryLine))) { Write-Output 'Skipping, entry already exists.'; continue; }; try { Add-Content -Path $hostsFilePath -Value $hostsEntryLine -Encoding $hostsFileEncoding -ErrorAction Stop; Write-Output 'Successfully added the entry.'; } catch { Write-Error "^""Failed to add the entry. Error: $_"^""; continue; }; }"
:: ----------------------------------------------------------

Revert code

No response

Suggested category

No response

Recommendation level

Standard

Additional information

geo2.adobe.com is a location subdomain of adobe.com, which tracks a user’s location when a user is using an Adobe program like Flash Player or Photoshop.

@P0W3 P0W3 added the enhancement New feature or request label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant