├── openssl-0.9.8h-1-setup.exe ├── README.md └── fp.bat /openssl-0.9.8h-1-setup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mobizt/Firebase-Fingerprint/master/openssl-0.9.8h-1-setup.exe -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Firebase-Fingerprint 2 | Windows commnd line tool to show Firebase SHA-1 fingerprint 3 | 4 | Install oppenssl tool and fp.bat script file. 5 | -------------------------------------------------------------------------------- /fp.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | for /f "tokens=1-2 skip=1 delims=^." %%a in ('@wmic os get osarchitecture') do ( 4 | if not "%%a"=="" ( 5 | set "os_ar=%%a" 6 | goto :begin 7 | ) 8 | ) 9 | :begin 10 | if %os_ar%==64-bit set op="C:\Program Files (x86)\GnuWin32\bin" 11 | if %os_ar%==32-bit set op="C:\Program Files\GnuWin32\bin" 12 | set h="test.firebaseio.com" 13 | set cf=%USERPROFILE%\f.cert 14 | set of=%USERPROFILE%\o.txt 15 | set t1=STEP 1: ACQUIRE CERTIFICATE... 16 | set t2=STEP 2: FINISHED 17 | set t3=Openssl tool doesn't exist 18 | set t4=No internet connection 19 | set emsg1=Please install openssl tool at %op%. 20 | set emsg2=Unable to access to Firebase server. 21 | set emsg3=Please check your internet connection. 22 | if not exist %op%/openssl.exe goto :f_error 23 | ping google.com -n 1 -w 1000 >nul 24 | if errorlevel 1 goto :i_error 25 | color 1f 26 | @title %t1% 27 | cd\ 28 | cd %op% 29 | cls 30 | echo "" | openssl s_client -host %h% -port 443 | sed -ne "/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p" > %cf% 31 | openssl x509 -noout -fingerprint -sha1 -inform pem -in %cf% > %of% 32 | set /p tk=<%of% 33 | for /f "tokens=2* delims=.\=" %%i in ( "%tk%" ) do set r=%%i 34 | @title %t2% 35 | set f=%r::=% 36 | call :lc f 37 | cls 38 | echo %f% 39 | del %of% 40 | del %cf% 41 | pause >nul 42 | :lc 43 | set %~1=!%~1:A=a! 44 | set %~1=!%~1:B=b! 45 | set %~1=!%~1:C=c! 46 | set %~1=!%~1:D=d! 47 | set %~1=!%~1:E=e! 48 | set %~1=!%~1:F=f! 49 | set %~1=!%~1:G=g! 50 | set %~1=!%~1:H=h! 51 | set %~1=!%~1:I=i! 52 | set %~1=!%~1:J=j! 53 | set %~1=!%~1:K=k! 54 | set %~1=!%~1:L=l! 55 | set %~1=!%~1:M=m! 56 | set %~1=!%~1:N=n! 57 | set %~1=!%~1:O=o! 58 | set %~1=!%~1:P=p! 59 | set %~1=!%~1:Q=q! 60 | set %~1=!%~1:R=r! 61 | set %~1=!%~1:S=s! 62 | set %~1=!%~1:T=t! 63 | set %~1=!%~1:U=u! 64 | set %~1=!%~1:V=v! 65 | set %~1=!%~1:W=w! 66 | set %~1=!%~1:X=x! 67 | set %~1=!%~1:Y=y! 68 | set %~1=!%~1:Z=z! 69 | goto:eof 70 | :f_error 71 | color 4f 72 | @title %t3% 73 | cls 74 | echo %emsg1% 75 | pause >nul 76 | :i_error 77 | color 4f 78 | @title %t4% 79 | cls 80 | echo %emsg2% 81 | echo %emsg3% 82 | pause >nul 83 | --------------------------------------------------------------------------------