This repository has been archived on 2023-09-02. You can view files and clone it, but cannot push or open issues or pull requests.
csh/hazedumper/generate.bat

43 lines
1.1 KiB
Batchfile
Raw Normal View History

2023-04-05 12:33:06 +02:00
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
2023-04-02 22:02:36 +02:00
IF NOT EXIST .\hazedumper.exe (
2023-04-02 22:02:36 +02:00
ECHO Download latest release of hazedumper
SET "dir=Windows"
2023-04-02 22:02:36 +02:00
:: Download latest release
FOR /f "tokens=1,* delims=:" %%A IN ('curl -ks ^
https://api.github.com/repos/frk1/hazedumper-rs/releases/latest ^| ^
find "browser_download_url"') DO (
2023-04-02 22:02:36 +02:00
curl -kOL %%B
)
:: Unzip the file
PowerShell -NoLogo -NoProfile -Command "& { $shell = New-Object -COM" ^
2023-04-05 12:33:06 +02:00
"Shell.Application; $target = $shell.NameSpace('%CD%'); $zip =" ^
"$shell.NameSpace('%CD%\!dir!.zip'); $target.CopyHere($zip.Items()," ^
"16); }" "!dir!"
2023-04-02 22:02:36 +02:00
:: Move the binary to the current directory
2023-04-05 12:33:06 +02:00
MOVE .\!dir!\*.exe .\
2023-04-02 22:02:36 +02:00
:: Delete unnecessary file and directory
2023-04-05 12:33:06 +02:00
DEL !dir!.zip
RMDIR !dir!\
2023-04-02 22:02:36 +02:00
)
IF NOT EXIST .\config.json (
2023-04-02 22:02:36 +02:00
ECHO Download latest config file for CS:GO
:: Download
curl -kOL https://raw.githubusercontent.com/frk1/hazedumper/master/config.json
)
ECHO Generate offsets using hazedumper
2023-04-02 22:02:36 +02:00
:: Generate files
.\hazedumper.exe
2023-04-05 12:42:05 +02:00
EXIT /B