안녕하세요.
So 파일에서 OpenSSL 버전을 확인해주는 배치 스크립트입니다.
버전은 0.9.8a ~ 1.0.2z 까지만 찾아줍니다.
검사가 끝나면 OpenSSL_result.txt 파일이 나옵니다.
제가 만들었고 라이센스 없습니다. 마음껏 쓰세요.
@echo off rem VERSION SET Title byOpenSSL 1.0.1 set MIN=98 set MAX=102 color 30 del /F /Q OpenSSL_result.txt >nul del /F /Q OpenSSL_list.txt >nul cls echo --START------------------------------------------------- findstr /SNM /C:"OpenSSL 0" *.so > OpenSSL_list.txt findstr /SNM /C:"OpenSSL 1" *.so >> OpenSSL_list.txt echo --DETECTED---------------------------------------------- echo. type OpenSSL_list.txt echo. echo --DETECT Version---------------------------------------- for /f "delims=" %%i in (OpenSSL_list.txt) do call :GO_FOR %%i :GO_FOR echo OpenSSL detected - %1 set PRE=%MAX% set tmp=%1 if NOT DEFINED tmp ( color 70 del /F /Q OpenSSL_list.txt echo. echo --RESULT------------------------------------------------ echo. type OpenSSL_result.txt echo. echo --END--------------------------------------------------- echo. pause >nul color exit ) :NEXT if %PRE% LSS %MIN% ( echo But There is no OpenSSL - Version 0.9.8a ~ 1.0.2z exit/b ) if %PRE% LSS 100 ( set FIRST=0 set SECOND=%PRE:~0,1% set THIRD=%PRE:~1,1% ) ELSE ( set FIRST=%PRE:~0,1% set SECOND=%PRE:~1,1% set THIRD=%PRE:~2,1% ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%a" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%a echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%a>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%b" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%b echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%b>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%c" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%c echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%c>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%d" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%d echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%d>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%e" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%e echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%e>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%f" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%f echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%f>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%g" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%g echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%g>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%h" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%h echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%h>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%i" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%i echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%i>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%j" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%j echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%j>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%k" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%k echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%k>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%l" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%l echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%l>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%m" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%m echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%m>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%n" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%n echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%n>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%o" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%o echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%o>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%p" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%p echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%p>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%q" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%q echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%q>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%r" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%r echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%r>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%s" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%s echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%s>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%t" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%t echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%t>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%u" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%u echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%u>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%v" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%v echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%v>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%w" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%w echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%w>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%x" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%x echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%x>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%y" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%y echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%y>>OpenSSL_result.txt exit/b ) findstr /SNM /C:"OpenSSL %FIRST%.%SECOND%.%THIRD%z" %1>nul if %ERRORLEVEL% EQU 0 ( echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%z echo %1 - OpenSSL %FIRST%.%SECOND%.%THIRD%z>>OpenSSL_result.txt exit/b ) set /a PRE-=1 goto NEXT exit/b
0 개의 댓글:
댓글 쓰기