2022-04-20 05:16:56 +00:00
|
|
|
@echo off
|
|
|
|
|
2022-04-22 00:17:00 +00:00
|
|
|
set ORIGIN=%1
|
|
|
|
set ORIGIN=%ORIGIN:"=%
|
2022-04-22 00:05:00 +00:00
|
|
|
|
2022-05-02 02:39:47 +00:00
|
|
|
title Grassclipper Installer
|
|
|
|
|
2022-04-20 05:16:56 +00:00
|
|
|
echo Downloading proxy server...
|
|
|
|
|
2022-04-22 00:17:00 +00:00
|
|
|
:: Make sure we are in the right directory
|
|
|
|
cd "%ORIGIN%"
|
|
|
|
|
|
|
|
if not exist "%ORIGIN%/ext" mkdir "%ORIGIN%/ext"
|
2022-04-26 06:03:42 +00:00
|
|
|
if not exist "%ORIGIN%/temp" mkdir "%ORIGIN%/temp
|
2022-04-20 05:16:56 +00:00
|
|
|
|
2022-04-23 06:08:10 +00:00
|
|
|
:: Begin by retrieving mitmproxy 7.0.4
|
2022-04-26 06:03:42 +00:00
|
|
|
powershell Invoke-WebRequest -Uri https://snapshots.mitmproxy.org/7.0.4/mitmproxy-7.0.4-windows.zip -OutFile "'%ORIGIN%/temp/mitmproxy-7.0.4-windows.zip'"
|
2022-04-20 05:16:56 +00:00
|
|
|
|
2022-04-20 05:31:23 +00:00
|
|
|
echo Extracting...
|
|
|
|
|
2022-04-20 05:16:56 +00:00
|
|
|
:: Extract from temp/ to ext/ with powershell
|
2022-04-26 06:03:42 +00:00
|
|
|
powershell Expand-Archive -Path "'%ORIGIN%/temp/mitmproxy-7.0.4-windows.zip'" -DestinationPath "'%ORIGIN%/ext/'" -Force
|
2022-04-20 05:16:56 +00:00
|
|
|
|
2022-04-22 00:17:00 +00:00
|
|
|
del /s /q "%ORIGIN%/temp"
|
2022-04-20 05:31:23 +00:00
|
|
|
|
2022-04-20 23:27:40 +00:00
|
|
|
echo Running proxy server in order to generate certificates...
|
|
|
|
|
|
|
|
:: Start proxy server
|
2022-04-26 06:03:42 +00:00
|
|
|
start "Proxy Server" "%ORIGIN%/ext/mitmdump.exe" --ssl-insecure --set ip=%ip%
|
2022-04-20 23:27:40 +00:00
|
|
|
|
|
|
|
:: Allow the proxy server to create the certificates
|
|
|
|
ping 127.0.0.1 -n 6 > nul
|
2022-04-20 05:40:13 +00:00
|
|
|
|
2022-04-20 23:27:40 +00:00
|
|
|
:: Kill the process
|
|
|
|
taskkill /f /im mitmdump.exe
|
|
|
|
|
2022-04-22 00:17:00 +00:00
|
|
|
echo Adding ceritifcate...
|
|
|
|
|
2022-04-20 23:27:40 +00:00
|
|
|
:: Ensure we are elevated for certs
|
2022-05-03 04:40:05 +00:00
|
|
|
>nul 2>&1 certutil -addstore root "%USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer" || (
|
2022-04-27 21:40:55 +00:00
|
|
|
echo ============================================================================================================
|
2022-04-27 21:35:36 +00:00
|
|
|
echo !! Certificate install failed !!
|
2022-04-27 21:40:55 +00:00
|
|
|
echo.
|
|
|
|
echo Please manually run this command as Administrator:
|
2022-05-03 04:40:05 +00:00
|
|
|
echo certutil -addstore root "%USERPROFILE%\.mitmproxy\mitmproxy-ca-cert.cer"
|
2022-04-27 21:40:55 +00:00
|
|
|
echo ============================================================================================================
|
2022-04-20 23:27:40 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
echo Done! You can now open GrassClipper.exe!
|
|
|
|
|
|
|
|
pause
|
2022-04-22 00:17:00 +00:00
|
|
|
|
2022-05-02 02:39:47 +00:00
|
|
|
taskkill /f /fi "WINDOWTITLE eq Grassclipper Installer"
|