Skip to content

Instantly share code, notes, and snippets.

@Grezvany13
Created July 7, 2023 13:50
Show Gist options
  • Save Grezvany13/d28217bb33d8da11fd54fab6ad4832c2 to your computer and use it in GitHub Desktop.
Save Grezvany13/d28217bb33d8da11fd54fab6ad4832c2 to your computer and use it in GitHub Desktop.
A3 mod key validator

A3 mod key validator

Installation

  1. Download the latest version of bisign from https://github.com/BrettMayson/bisign/releases
  2. Extract bisign.exe into a new folder
  3. Add validate.bat in the same folder

How to use

  1. Open the Command Prompt
  2. Go to the folder with validate.bat and bisign.bat
  3. Execute the following:
validate.bat "path/to/mod"

Examples

To validate CBA you simply add the full path to the mod folder

validate.bat "C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CBA_A3"

Notes

  • It assumes that the PBO's are present in /addons (required by Arma)
  • It assumes that the public keys (.bisign) are present in /addons (required by Arma)
  • It assumes that the private key (.bikey) is present in /keys (required by Arma)
@ECHO off
:: Get proper directories based on mod path
SET mod_dir=%1
SET addons_dir=%mod_dir%\addons
SET keys_dir=%mod_dir%\keys
SET valid=1
:: Loop over keys directory, and get the .bikey (we assume there's only one!)
FOR %%k IN (%keys_dir%\*.bikey) DO (
SET key_file=%%k
)
:: Loop over PBO files, and validate each one of them with the .bikey
FOR %%a IN (%addons_dir%\*.pbo) DO (
@ECHO :: %%~na
bisign verify "%key_file%" "%%a" | findstr /N /L /C:"Verified!" >nul && (
ECHO Valid
) || (
ECHO ERROR
SET valid=0
)
)
ECHO.
IF %valid% EQU 0 (
ECHO One or more PBO's have a problem...
) ELSE (
ECHO All Valid!
)
ECHO.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment