Answer the question
In order to leave comments, you need to log in
cmd. How to use findstr to display multiple lines in a row?
Got a team
certutil F:\\find\\3123.crl | findstr 0178dd6f0071aca5b6474113327488997f
Serial number: 0178dd6f0071aca5b6474113327488997f
Serial number: 01410749007EAC8FAD4FAP2A72239FEAFCA1 Date
of review: 25.11.2020 11:09
Expansion: 1
2.5.29.21: Flags = 0, Length Causion
Code (CRL)
Certificate Replaced (4)
Serial Room20
:45
Extensions: 1
2.5.29.21: Flags = 0, Length = 3
Revocation List (CRL) Reason Code
Replaced (4)
Serial Number: 019f296d007eac0ab04dcfeee27373ad6c Revocation
Date: 11/25/2020 9:40 AM
Extensions: 1
2.5.29.21: Flags = 0, Length = 3
Revocation list (CRL) reason code
Certificate replaced (4)
Answer the question
In order to leave comments, you need to log in
Loop, examples for your question are here:
https://www.cyberforum.ru/cmd-bat/thread786795.html
If certutil can display data only for a specific certificate from the revocation list, then you can call certutil again with a specific certificate by finding the desired serial number with your command.
Windows is not at hand now, I can not check my assumption.
It can be like this:
@echo off
certutil F:\\find\\3123.crl| find /v /n "">temp.txt
set "str=0178dd6f0071aca5b6474113327488997f"
for /f "delims=[]" %%1 in ('find "%str%"^<temp.txt') do call :sub %%1
del temp.txt
exit /b
:sub
set /a skip = %1 - 1
for /f "skip=%skip% tokens=1,* delims=]" %%1 in (temp.txt) do (
echo(%%2
if "%%2"=="" exit /b
)
chcp 1251>nul
find
findstr
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question