Skip to content

Commit

Permalink
small fix to stop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
KingKDot committed Mar 3, 2024
1 parent e39c4cd commit 1d683d8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from rich.syntax import Syntax
from rich.text import Text

__version__ = "2.9.0"
__version__ = "2.9.1"


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion src/util/methods/anti_methods/anti_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def vm_test():
# r"""for /f "tokens=2 delims=:" %%a in ('systeminfo ^| find "Total Physical Memory"') do ( set available_memory=%%a ) & set available_memory=%available_memory: =% & set available_memory=%available_memory:M=% & set available_memory=%available_memory:B=% & set /a available_memory=%available_memory% / 1024 / 1024 & if not %available_memory% gtr 4 ( exit /b 1 )""",
# I love batch so much I gave up and used powershell
# Now that I think about it it would have been a LOT more logical to use encoded command since its all base64
"""powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -Command \"$VM=Get-WmiObject -Class Win32_ComputerSystem ; if ($VM.Model -match 'Virtual') { Write-Host 'Virtual Machine Detected. Exiting script.' ; taskkill /F /IM cmd.exe }\""""
# """powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -Command \"$VM=Get-WmiObject -Class Win32_ComputerSystem ; if ($VM.Model -match 'Virtual') { Write-Host 'Virtual Machine Detected. Exiting script.' ; taskkill /F /IM cmd.exe }\""""
"""powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -Command \"if((gcim Win32_PhysicalMemory | measure -Property capacity -Sum).sum /1gb -lt 8) {"Less than 8GB";spps -f -n "cmd" -ErrorAction SilentlyContinue;exit 1}\""""
]
# ill add more one day
Expand Down
23 changes: 23 additions & 0 deletions test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
echo off
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set "DEL=%%a"
)
echo say the name of the colors, don't read

call :ColorText 0a "blue"
call :ColorText 0C "green"
call :ColorText 0b "red"
echo(
call :ColorText 19 "yellow"
call :ColorText 2F "black"
call :ColorText 4e "white"

goto :eof

:ColorText
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1
goto :eof

0 comments on commit 1d683d8

Please sign in to comment.