Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pe_unmapper Drag & Drop menu bat wrapper #26

Open
qwertzy-antonio-godinho opened this issue Apr 7, 2021 · 0 comments
Open

pe_unmapper Drag & Drop menu bat wrapper #26

qwertzy-antonio-godinho opened this issue Apr 7, 2021 · 0 comments

Comments

@qwertzy-antonio-godinho
Copy link

Hi,
not sure if you'd consider this something useful, this short batch script allows a user to drag & drop a file calling pe_unmapper.exe and presents a simple menu from where the type of unmapping to be applied can be selected, the unmapped file is then saved on the user's desktop:

`@echo off
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"

set "fullstamp=%YYYY%%MM%%DD%%HH%%Min%%Sec%"

echo File: "%~1"
echo.

:start
echo Options:
echo --------
echo U : UNMAP (Virtual to Raw)
echo M : MAP (Raw to Virtual)
echo R : REALIGN (Virtual to Raw, where: Raw == Virtual)
echo.
set choice=
set /p choice=Select your option [U, M, R]:
if not "%choice%"=="" set choice=%choice:~0,1%

if "%choice%"=="U" goto main
if "%choice%"=="M" goto main
if "%choice%"=="R" goto main

echo "%choice%" is not valid, please try again.
echo.
goto start

:main
echo.
pe_unmapper.exe /in "%~1" /mode "%choice%" /out %USERPROFILE%\Desktop%fullstamp%-pe_unmapper-mode_%choice%-"%~n1".bin
goto end

:end
echo.
pause

@echo on`

pe_unmapper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant