Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit 5dd9963

Browse files
committed
added Endermanch's "MS-DOS Mode" (PoC)
1 parent dd1d1ba commit 5dd9963

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

library/GeneralFunctions.psm1

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ function Info {
3131
Write-Output "- Disable ShellExperienceHost"
3232
Write-Output "- Disable SearchUI `n"
3333
Write-Output "Things that break (or doesn't work on) Windows 11 (will be fixed):"
34-
Write-Output "- Disabling telemetry (Disables updates. See #7) `n`n"
35-
Write-Output "- Remove user folders under This PC"
34+
Write-Output "- Disabling telemetry (Disables updates. See #7)"
35+
Write-Output "- Remove user folders under This PC `n`n"
3636
Read-Host "Press Enter to continue"
3737
}
3838

@@ -60,3 +60,35 @@ function InstallHyperV {
6060
}
6161
else { Install-WindowsFeature -Name "Hyper-V" -IncludeManagementTools -WarningAction SilentlyContinue }
6262
}
63+
64+
function MSDOSMode {
65+
Write-Output '"MS-DOS Mode" for Windows 10 (PoC, made by Endermanch)'
66+
Write-Output "This is provided WITHOUT WARRANTY OF ANY KIND and is only a Proof of Concept."
67+
Write-Output "Big thanks to Endermanch for this and his discovery of the BCPE exploit. `n`n"
68+
69+
$conflocation = "$env:APPDATA\WindowsToolbox\"
70+
$windowsdos = "https://dl.malwarewatch.org/multipurpose/Windows10DOS.zip"
71+
72+
Write-Output "Downloading"
73+
Invoke-WebRequest -Uri $windowsdos -OutFile $conflocation\Windows10DOS.zip
74+
75+
Write-Output "Installing 7Zip4PowerShell (sorry, Expand-Archive does not support passwords)"
76+
Install-Module 7Zip4PowerShell -Scope CurrentUser -Force -Verbose
77+
Clear-Host
78+
Write-Output "Extracting..."
79+
Expand-7Zip -ArchiveFileName $conflocation\Windows10DOS.zip -TargetPath $conflocation -Password "mysubsarethebest" -Verbose
80+
81+
Write-Output "Copying to System32"
82+
Copy-Item $conflocation\msdos.bat -Destination "C:\Windows\System32" -Force
83+
Copy-Item $conflocation\win.bat -Destination "C:\Windows\System32" -Force
84+
Copy-Item $conflocation\reboot.bat -Destination "C:\Windows\System32" -Force
85+
86+
Write-Output "Removing leftovers"
87+
Remove-Item -Path $conflocation\msdos.bat -Force
88+
Remove-Item -Path $conflocation\win.bat -Force
89+
Remove-Item -Path $conflocation\reboot.bat -Force
90+
91+
Write-Output "Please use WinXEditor to add the entry to the Win+X menu"
92+
Start-Process $conflocation\WinXEditor\WinXEditor.exe
93+
Read-Host "Done"
94+
}

main.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if ( $reply -match "[yY]" ) {
4646

4747
Clear-Host
4848

49-
if ($build -lt "10.0.10240") {
49+
if ($build -eq "10.0.10240") {
5050
Read-Host "Sorry, your Windows version is not supported, and never will be :( . Press Enter to exit"
5151
Exit
5252
} elseif ($build -le "10.0.17134") {
@@ -239,7 +239,8 @@ $objects = @{
239239
'7-Zip',
240240
'WinDynamicDesktop',
241241
'PowerToys',
242-
'Internet Download Manager'
242+
'Internet Download Manager',
243+
'MS-DOS Mode for Windows 10 (Proof of Concept, made by Endermanch)'
243244
)"
244245
}
245246
}
@@ -718,6 +719,10 @@ while ($true) {
718719
}
719720
}
720721

722+
'MS-DOS Mode for Windows 10 (Proof of Concept, made by Endermanch)' {
723+
MSDOSMode
724+
}
725+
721726
#Tweaks
722727

723728
#System tweaks

0 commit comments

Comments
 (0)