<commit_before>.de Vb
.sp
.ft CW
.nf
..
.de Ve
.ft R
.fi
.sp
..
.TH UNBER 1 "\*(Dt" "ASN.1 BER Decoder" "ASN.1 BER Decoder"
.SH NAME
unber \- ASN.1 BER Decoder
.SH SYNOPSIS
unber [\fB-1\fR] [\fB-i\fRindent] [\fB-m\fR] [\fB-p\fR] [\fB\-s\fR\fIskip\fR] [\fB\-t\fR\fIhex-string\fR] [\fB-\fR] [\fIinfile\fR...]
.SH DESCRIPTION
unber presents the internal structure of BER-encoded files as human readable text.
A single dash denotes the standard input.
.sp
(The DER and CER formats are subsets of the BER and are also supported.)
.SH OPTIONS
.TP
\fB\-1\fR
Do \fInot\fR attempt to read the next BER structure after the first one.
This may be useful if the input contains garbage past the single BER sequence.
By default, unber continues decoding until the end of file (input stream).
.TP
\fB\-i\fR \fIindent\fR
Use the specified number of spaces for output indentation. Default is 4 spaces.
.TP
\fB\-m\fR
Generate shorter output while still preserving BER encoding information.
.TP
\fB\-p\fR
Do \fInot\fR attempt pretty-printing of known ASN.1 types (BOOLEAN, INTEGER, OBJECT IDENTIFIER, etc). By default, some ASN.1 types are converted into
the text representation. This option is required for \&\fIenber\fR\|(1).
.TP
\fB\-s\fR \fIskip\fR
Ignore the first \fIskip\fR bytes in the input stream; useful for stripping off
lower level protocol framing data.
.TP
\fB\-t\fR \fIhex-string\fR
Interpret the hex-string as a sequence of hexadecimal values representing
the start of BER TLV encoding. Print the human readable explanation.
.SH XML FORMAT
unber dumps the output in the regular XML format which preserves most of the
information from the underlying binary encoding.
.P
The XML opening tag format is as follows:
.Vb
\&<\fBtform\fR O="\fBoff\fR" T="\fBtag\fR" TL="\fBtl_len\fR" V="{Indefinite|\fBv_len\fR}" [A="\fBtype\fR"] [\fBF\fR]>
.Ve
Where:
.TP
\fBtform\fR
Which form the value is in: primitive ("P") or constructed ("C") or constructed with indefinite length ("I")
.TP
\fBoff\fR
Offset of the encoded element in the unber input stream.
.TP
\fBtag\fR
The tag class and value in human readable form.
.TP
\fBtl_len\fR
The length of the TL (BER Tag and Length) encoding.
.TP
\fBv_len\fR
The length of the value (V, encoded by the L), may be "Indefinite".
.TP
\fBtype\fR
Likely name of the underlying ASN.1 type (for UNIVERSAL tags).
.TP
[\fBF\fR]
Indicates that the value was reformatted (pretty-printed). This may only appear in the output as long \fB-p\fR command line option is \fInot\fR specified.
.P
Sample XML output:
.Vb
\&<I O="0" T="[UNIVERSAL 16]" TL="2" V="Indefinite" A="SEQUENCE">
\&  <P O="2" T="[UNIVERSAL 19]" TL="2" V="2" A="PrintableString">US</P>
\&  <C O="6" T="[UNIVERSAL 16]" TL="2" V="6" A="SEQUENCE">
\&    <P O="8" T="[UNIVERSAL 2]" TL="2" V="4" A="INTEGER" F>832970823</P>
\&  </C O="14" T="[UNIVERSAL 16]" A="SEQUENCE" L="8">
\&</I O="14" T="[UNIVERSAL 0]" TL="2" L="16"><commit_msg>corrections<commit_after>.de Vb
.sp
.ft CW
.nf
..
.de Ve
.ft R
.fi
.sp
..
.TH UNBER 1 "\*(Dt" "ASN.1 BER Decoder" "ASN.1 BER Decoder"
.SH NAME
unber \- ASN.1 BER Decoder
.SH SYNOPSIS
unber [\fB-1\fR] [\fB-i\fRindent] [\fB-m\fR] [\fB-p\fR] [\fB\-s\fR\fIskip\fR] [\fB\-t\fR\fIhex-string\fR] [\fB-\fR] [\fIinfile\fR...]
.SH DESCRIPTION
unber presents the internal structure of BER-encoded files as human readable text.
A single dash denotes the standard input.
.sp
(The DER and CER formats are subsets of the BER and are also supported.)
.SH OPTIONS
.TP
\fB\-1\fR
Do \fInot\fR attempt to read the next BER structure after the first one.
This may be useful if the input contains garbage past the single BER sequence.
By default, unber continues decoding until the end of file (input stream).
.TP
\fB\-i\fR \fIindent\fR
Use the specified number of spaces for output indentation. Default is 4 spaces.
.TP
\fB\-m\fR
Generate shorter output while still preserving BER encoding information.
.TP
\fB\-p\fR
Do \fInot\fR attempt pretty-printing of known ASN.1 types (BOOLEAN, INTEGER, OBJECT IDENTIFIER, etc). By default, some ASN.1 types are converted into
the text representation. This option is required for \&\fIenber\fR\|(1).
.TP
\fB\-s\fR \fIskip\fR
Ignore the first \fIskip\fR bytes in the input stream; useful for stripping off
lower level protocol framing data.
.TP
\fB\-t\fR \fIhex-string\fR
Interpret the hex-string as a sequence of hexadecimal values representing
the start of BER TLV encoding. Print the human readable explanation.
.SH XML FORMAT
unber dumps the output in the regular XML format which preserves most of the
information from the underlying binary encoding.
.P
The XML opening tag format is as follows:
.Vb
\&<\fBtform\fR O="\fBoff\fR" T="\fBtag\fR" TL="\fBtl_len\fR" V="{Indefinite|\fBv_len\fR}" [A="\fBtype\fR"] [\fBF\fR]>
.Ve
Where:
.TP
\fBtform\fR
Encoding form the value is in: primitive ("P") or constructed ("C") or constructed with indefinite length ("I")
.TP
\fBoff\fR
Offset of the encoded element in the unber input stream.
.TP
\fBtag\fR
The tag class and value in human readable form.
.TP
\fBtl_len\fR
The length of the TL (BER Tag and Length) encoding.
.TP
\fBv_len\fR
The length of the value (V, encoded by the L), may be "Indefinite".
.TP
\fBtype\fR
Likely name of the underlying ASN.1 type (for UNIVERSAL tags).
.TP
[\fBF\fR]
Indicates that the value was reformatted (pretty-printed). This will never appear in the output produced using \fB-p\fR command line option.
.P
Sample XML output:
.Vb
\&<I O="0" T="[UNIVERSAL 16]" TL="2" V="Indefinite" A="SEQUENCE">
\&  <P O="2" T="[UNIVERSAL 19]" TL="2" V="2" A="PrintableString">US</P>
\&  <C O="6" T="[UNIVERSAL 16]" TL="2" V="6" A="SEQUENCE">
\&    <P O="8" T="[UNIVERSAL 2]" TL="2" V="4" A="INTEGER" F>832970823</P>
\&  </C O="14" T="[UNIVERSAL 16]" A="SEQUENCE" L="8">
\&</I O="14" T="[UNIVERSAL 0]" TL="2" L="16">
{'fraction_non_alphanumeric': 0.1399276236429433, 'fraction_numerical': 0.016887816646562123, 'mean_word_length': 3.7034035656401945, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3338085', 'n_tokens_mistral': 2355, 'n_tokens_neox': 2162, 'n_words': 828}