From 8164e0c2621fa27ac5c543d5fcc0ae05ba63a3e4 Mon Sep 17 00:00:00 2001 From: Abhijeet Kumar <83376115+wand3rlust@users.noreply.github.com> Date: Tue, 10 Oct 2023 23:04:56 +0000 Subject: [PATCH 1/2] Added check for Internet connectivity --- install.ps1 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install.ps1 b/install.ps1 index 92fc7ac..1785ed0 100644 --- a/install.ps1 +++ b/install.ps1 @@ -111,6 +111,7 @@ if (-not $noChecks.IsPresent) { Write-Host "`t[+] Hint: https://support.microsoft.com/en-us/windows/prevent-changes-to-security-settings-with-tamper-protection-31d51aaa-645d-408e-6ce7-8d7f8e593f87" -ForegroundColor Yellow Write-Host "`t[+] Hint: https://www.tenforums.com/tutorials/123792-turn-off-tamper-protection-windows-defender-antivirus.html" -ForegroundColor Yellow Write-Host "`t[+] Hint: https://github.com/jeremybeaume/tools/blob/master/disable-defender.ps1" -ForegroundColor Yellow + Write-Host "`t[+] Hint: https://lazyadmin.nl/win-11/turn-off-windows-defender-windows-11-permanently/" -ForegroundColor Yellow Write-Host "`t[+] You are welcome to continue, but may experience errors downloading or installing packages" -ForegroundColor Yellow Write-Host "`t[-] Do you still wish to proceed? (Y/N): " -ForegroundColor Yellow -NoNewline $response = Read-Host @@ -241,6 +242,21 @@ if (-not $noChecks.IsPresent) { } } +# Check Internet connectivity and return boolean value, exit if value is 'false' +Write-Host "[+] Checking for Internet connectivity..." +$connectionStatus = Test-Connection 1.1.1.1 -Quiet +if ($connectionStatus -eq $false) +{ + Write-Host "`t[!] Internet connectivity not detected" -ForegroundColor Red + Write-Host "`t[!] Exiting..." -ForegroundColor Red + Start-Sleep 3 + exit 1 +} +else +{ + Write-Host "`t[+] Internet connectivity detected" -ForegroundColor Green +} + if (-not $noPassword.IsPresent) { # Get user credentials for autologin during reboots if ([string]::IsNullOrEmpty($password)) { From e50d2627ccff47746e5670f01b36f8ef4f8dec19 Mon Sep 17 00:00:00 2001 From: Abhijeet Kumar <83376115+wand3rlust@users.noreply.github.com> Date: Wed, 11 Oct 2023 16:38:52 +0000 Subject: [PATCH 2/2] Update install.ps1 --- install.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.ps1 b/install.ps1 index 1785ed0..292cc24 100644 --- a/install.ps1 +++ b/install.ps1 @@ -240,11 +240,10 @@ if (-not $noChecks.IsPresent) { } else { Write-Host "`t[+] Username '$extractedUsername' does not contain any spaces." -ForegroundColor Green } -} # Check Internet connectivity and return boolean value, exit if value is 'false' Write-Host "[+] Checking for Internet connectivity..." -$connectionStatus = Test-Connection 1.1.1.1 -Quiet +$connectionStatus = Test-Connection github.com -Quiet if ($connectionStatus -eq $false) { Write-Host "`t[!] Internet connectivity not detected" -ForegroundColor Red @@ -257,6 +256,8 @@ else Write-Host "`t[+] Internet connectivity detected" -ForegroundColor Green } +} + if (-not $noPassword.IsPresent) { # Get user credentials for autologin during reboots if ([string]::IsNullOrEmpty($password)) {