Upload files to "/"
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
REM Remote Bloatware Remover - Execute directly from Git repository
|
||||
REM No download needed - runs inline from repo
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM Repository details
|
||||
set "REPO=https://git.azuze.fr/kawa/Kawa-s-Bloat-Remover"
|
||||
set "BRANCH=main"
|
||||
set "SCRIPT=Remove-AllBloat.ps1"
|
||||
|
||||
REM Check for admin
|
||||
net session >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
powershell -Command "Start-Process cmd -ArgumentList '/c %~0' -Verb RunAs" >nul 2>&1
|
||||
exit /b
|
||||
)
|
||||
|
||||
REM Execute via PowerShell (silent)
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
||||
"$ProgressPreference='SilentlyContinue'; $ErrorActionPreference='SilentlyContinue'; [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; Invoke-Expression(Invoke-WebRequest -Uri '%REPO%/raw/%BRANCH%/%SCRIPT%' -UseBasicParsing).Content" >nul 2>&1
|
||||
|
||||
exit /b 0
|
||||
@@ -0,0 +1,98 @@
|
||||
# Remote Script Launcher - Download and execute scripts from Git repository
|
||||
# No installation required - run directly from internet
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$false)]
|
||||
[ValidateSet('All', 'HP', 'Lenovo', 'ASUS', 'Dell', 'Scan', 'Verify', 'Deploy')]
|
||||
[string]$Script = 'All',
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$RepoURL = 'https://git.azuze.fr/kawa/Kawa-s-Bloat-Remover',
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$Branch = 'main',
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[switch]$NoAdmin = $false
|
||||
)
|
||||
|
||||
# Check for admin rights
|
||||
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||
if (-not $NoAdmin) {
|
||||
Write-Host "[!] Admin rights required. Requesting elevation..." -ForegroundColor Yellow
|
||||
$Arguments = "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`" -Script $Script -RepoURL $RepoURL -Branch $Branch"
|
||||
Start-Process powershell.exe -ArgumentList $Arguments -Verb RunAs -Wait
|
||||
exit
|
||||
}
|
||||
}
|
||||
|
||||
$ErrorActionPreference = 'SilentlyContinue'
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
Write-Host "╔════════════════════════════════════════╗" -ForegroundColor Cyan
|
||||
Write-Host "║ Kawa's Bloatware Remover - Remote ║" -ForegroundColor Cyan
|
||||
Write-Host "║ Launching from Git Repository ║" -ForegroundColor Cyan
|
||||
Write-Host "╚════════════════════════════════════════╝" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Map script names to files
|
||||
$ScriptMap = @{
|
||||
'All' = 'Remove-AllBloat.ps1'
|
||||
'HP' = 'Remove-HPBloat.ps1'
|
||||
'Lenovo' = 'Remove-LenovoBloat.ps1'
|
||||
'ASUS' = 'Remove-ASUSBloat.ps1'
|
||||
'Dell' = 'Remove-DellBloat.ps1'
|
||||
'Scan' = 'Scan-Bloatware.ps1'
|
||||
'Verify' = 'Verify-Removal.ps1'
|
||||
'Deploy' = 'Deploy-ScheduledTask.ps1'
|
||||
}
|
||||
|
||||
$ScriptFile = $ScriptMap[$Script]
|
||||
|
||||
if (-not $ScriptFile) {
|
||||
Write-Host "[-] Invalid script selection: $Script" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Construct raw file URL
|
||||
$RawURL = "$RepoURL/raw/$Branch/$ScriptFile"
|
||||
|
||||
Write-Host "[*] Repository: $RepoURL" -ForegroundColor Cyan
|
||||
Write-Host "[*] Branch: $Branch" -ForegroundColor Cyan
|
||||
Write-Host "[*] Script: $ScriptFile" -ForegroundColor Cyan
|
||||
Write-Host "[*] URL: $RawURL" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Download script
|
||||
Write-Host "[*] Downloading script from repository..." -ForegroundColor Yellow
|
||||
|
||||
try {
|
||||
$ScriptContent = Invoke-WebRequest -Uri $RawURL -UseBasicParsing -ErrorAction Stop
|
||||
|
||||
if ($ScriptContent.StatusCode -ne 200) {
|
||||
Write-Host "[-] Failed to download script (HTTP $($ScriptContent.StatusCode))" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "[+] Script downloaded successfully" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
|
||||
# Execute script
|
||||
Write-Host "[*] Executing $Script bloatware removal..." -ForegroundColor Yellow
|
||||
Write-Host ""
|
||||
|
||||
Invoke-Expression $ScriptContent.Content
|
||||
|
||||
} catch {
|
||||
Write-Host "[-] Error: $_" -ForegroundColor Red
|
||||
Write-Host ""
|
||||
Write-Host "Troubleshooting:" -ForegroundColor Yellow
|
||||
Write-Host " 1. Check internet connection"
|
||||
Write-Host " 2. Verify repository URL: $RepoURL"
|
||||
Write-Host " 3. Confirm branch name: $Branch"
|
||||
Write-Host " 4. Check firewall/proxy settings"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "[+] Remote execution complete!" -ForegroundColor Green
|
||||
Reference in New Issue
Block a user