You are on page 1of 16

RED SKY TECHNOLOGIES SA DE CV

Copyright : Red Sky Technologies 2017


USERS MANUAL FOR GALAAD PARSER
Versin 1.5

Content
ABOUT .............................................................................................................................................. 3
1. INTRODUCTION ........................................................................................................................... 4
2. FORMAT DESCRIPTION (MAINFORMAT_00.txt file).................................................................... 4
2.1. FIELD NAME ............................................................................................................................. 5
2.2. ENCODING: .............................................................................................................................. 5
2.3. LENGTH.................................................................................................................................... 5
2.4. REPETITIONS OF A FIELD (times:) ............................................................................................ 7
2.5. BITMAP .................................................................................................................................... 8
2.6. CONDITIONAL FIELD PARSE(present:) ..................................................................................... 9
2.7. MULTIPLY LENGTH (multiplyLen:) ......................................................................................... 10
3. CATALOGS ................................................................................................................................. 11
4. SUBFIELDS ................................................................................................................................. 12
5. FIELD COMMENTS ..................................................................................................................... 14
6. SHORTCUTS ............................................................................................................................... 14
APENDIX A ......................................................................................................................................... 14

2
USERS MANUAL FOR GALAAD PARSER
Versin 1.5

ABOUT
This material has been created and distributed by Red Sky Technologies for informative proposes
about its software and its been disbtributed under license. This document is protected under
international Copyright laws. Any partial or total reproduction is forbidden without signed
consent of Red Sky Technologes SA de CV.

Copyright : Red Sky Technologies 2016

3
USERS MANUAL FOR GALAAD PARSER
Versin 1.5

1. INTRODUCTION

Galaad is a software that was developed to parse hex messages of many common protocols,
including ISO8583, pinpad commands, network protocols, etc.

It works by using text files. In those files message definition is captured so it can be reused to
parse any hex message.

Al fields mus be listed in order to add them to message format template to parse, like a header,
version, ETX, etc. Once captured message description it would be used to parse, find errors, edit
messages by han and simulate any specific test situation.

Message description pretends to be a notation, so it could allow easy and speed protocol capture
in order to ease development and message analisys.

SOFTWARE DOES NOT REQUIRE EXPLICIT INSTALATION s you just have to accept software license
and select working directory (the working directory where the message folder are).

Working directory has the following structure:

To parse you will have to capture or paste hex text on corresponding textbox, select columns you
want to display and select format to parse.

2. FORMAT DESCRIPTION (MAINFORMAT_00.txt file).


Parse formats are text files where a message format is described. Message should be described
field by field under the next prototype:

+FIELD NAME

4
USERS MANUAL FOR GALAAD PARSER
Versin 1.5
bitmap:
times:
present:
length:
encoding:
multiplyLen:

A format should contain one or more fields. Here we ar going to describe every part in a field
description.
*Not all params are required. Only encoding and length are.

2.1. FIELD NAME

Field name is the text that is going to appear in field name column and is always preceded by +
sign. This param is required.

2.2. ENCODING:

Is the field encoding that is gonna be used to parse hex values. In this case is hexadecimal (HEX),
so on encoding column you will se the same hex values. Posible encodings are
HEX(Hexadecimales), ASCII, EBCIDIC, UTF-8, BCD, etc*. This is a required param.

*To see a complete list of posible encodings refer to Apendix A

2.3. LENGTH
This param indicates number of nibbles to take for a field, and can be:

Fixed: If fixed it is captured in half bytes (Nibble) As an example if a field length is two
bytes it should be captured as 4.
Readed: If length is readed from another field, you should capture field name like this:
length:from=ANOTHER FIELD
Stopped by char: If field length is unknown and you have to search for a byte to determine
field stop, you could do it with the following notation:

5
USERS MANUAL FOR GALAAD PARSER
Versin 1.5
length:to=03
if you want to stop field length when byte 0x03 is fond.
You can also specify a nibble to stop like this:
Length:to=X3

Which in this case will stop on any byte that have 3 on its second nibble like: A3, B3, and
03 as an example.

Here a readed length:

In the following example field HTML Verb will be readed until HEX value 0A is found 0A
(\n on ASCII).

With input decimals:


03 04 31 30 0A 25 58 12 14

HTML Verb would be:


03 04 31 30

6
USERS MANUAL FOR GALAAD PARSER
Versin 1.5
But with an input like:
03 04 31 30 25 58 12 0A 14

HTML Verb would be:


03 04 31 30 25 58 12

2.4. REPETITIONS OF A FIELD (times:)


Times parameter has the funtion to read same field any number of times. This funtions allow to
reduce notation complexity and allows field parse when it is not known how many times same
field must be parsed but you can read it from another field. The following example corresponds to
an EMV token of a credit card:

In the example you can see the field


TOKEN with its subfields: PADDING,
TKN, TKN_LONG, ESPACIO y
TKN_DATA.

*NOTE: A field can contain subfields to


make it easy to read and to improve field
notation. Subfield are formed by adding
another plus sign +at the begining of
the field name. As an example, any field
name begining with +++ would be
subfields of a field whose name starts
with ++(View Subfields).

En una lectura EMV comn se leer mas


de un token. Lo que permite agregar el
parametro times: a la definicin del
campo para poder leerlo, que puede ser:

Fixed: number of times a TOKEN field should be try to parsed one after the other.

7
USERS MANUAL FOR GALAAD PARSER
Versin 1.5

Readed from another fiedl: If number of times a field should be repeated is ruled by
another field you could specify it by the following notation:

times:from=FIELD NAME

where FIELD NAME would be the field where


repetitions would be readed.

In the left example you can se that the number


of times a field would be readed is in a field
named NUM TKNS.

2.5. BITMAP
Bitmap paraeter determines if a field is a bitmap to decide if its bitmap dependent fields will be
parsed or will be ignored. Its sintax on format is: bitmap:true

Por ejemplo:

A format like the above will produce the following output on parser:

8
USERS MANUAL FOR GALAAD PARSER
Versin 1.5

For more information on way bitmaps operate for messages refer to ISO 8583 documentation.

2.6. CONDITIONAL FIELD PARSE(present:)


For those fields whose presence depends on a bitmap field syntax will be the following:

present:FIELD NAME.

Where, FIELD NAME should be replaced with bitmap fields name from wich the current field
should decide if parsed or not (one that has a property bitmap:true).

9
USERS MANUAL FOR GALAAD PARSER
Versin 1.5
In image the example field is 2_PAN (Primary
Account Number), whose precense depends on
field PRIMARY BITMAP.

In this case, 2_PAN field is the second bitmap


field becouse its the second in order of
appereance whose precense depends on bitmap
PRIMARY BITMAP.

Notice that first bitmap dependent field is


another bitmap (1_SECONDARY BITMAP) Just like
in an ISO8583 message.

2.7. MULTIPLY LENGTH (multiplyLen:)


Multipling length (multiplyLen param) is useful in cases where length must be readed from
another field. If another field refers to length as bytes it should be set param as multiplyLen:2 to
indicate it is a byte, not a Nibble (Half Bytes.)

By the way, if as an example readed length is 4, but its encoding is BCD (Binary Coded Decimal)
multiplyLen should be set as multiplyLen:1, but thats its default behavior so it can be
skipped.

The following is an example of an ASCII field length readed:

Field ADP_DATA takes its length from LENGTH_ADP whose length will also multiplyed by 2, so
if readed length is: 8, ADP_DATA will read not just 8 nibbles:

30 31 32 33 34 35 30 31 20

But 16 nibbles or 8 bytes:

10
USERS MANUAL FOR GALAAD PARSER
Versin 1.5
30 31 32 33 34 35 30 31 20

3. CATALOGS

You can asociate a catalog value to an specific feild to give meaning to the value obtained before
decoding (encoding: ASCII, EBCDIC, etc.) and that value can be seen on CATALOGS column on
parser as reference value.

To create and build a catalg you need a text file inside format name field. Catalog file must have
the exact same name of field with a .txt extension.

As an example with field PROCESSING CODE

You should create a field inside format name folder (in this case TESTS folder) whose name will
be PROCESSING CODE with the values that parser could find separated with an space to the
meaning it would have if value from that row is found while parsing.

Whit that information when parser is resolving PROCESSING CODE field it will compare the value
obtained before deconding (as ASCII in this case) with PROCESSING CODE.txt catalog values and
if found a coincidence it will display it on CATALOG column as following:

11
USERS MANUAL FOR GALAAD PARSER
Versin 1.5

4. SUBFIELDS

Subfield function is a GParser feature that allows to group fields inside other to help to esay read
fields and in some cases less repetitive.

Supose we have a field whose name is ID MESSAGE as first field of certain message:

But its 15 bytes (30 nibbles) could be composed by other parameters that could be threated
sepparatedly like as an example VERSION, SENDER and RANDOM NUMBER. So you could do
the following:

12
USERS MANUAL FOR GALAAD PARSER
Versin 1.5

Notice that the sum of all those new subfields length (VERSION, SENDER, RANDOM
NUMBER) corresponde with its original parent field length (ID MESSAGE).

Also notice that parent field has no length anymore becouse it will be taken always from the sum
of the its child fields length.

Also those subfield could be decomposed in other subfields:

Notice that what makes a field, a


subfield from another is the fact that it
has one plus sign + more than its
before its name. As an example field
whose name is preceded by 3 plus signs
+++ would always be a child to a field
whose name is preceded by 2 plus signs
++, indentation is just for easy reding
proposes and is recomended but not
required.

13
USERS MANUAL FOR GALAAD PARSER
Versin 1.5

5. FIELD COMMENTS

It is posible to add comments to field to any propose. To add a comment to a field it should be
preceded by double slash(//) as followingh:

Where row //first field is id message will be ignored by parser. Also it is important to mention
that only complete rows can be ignored.

6. SHORTCUTS
Double click on fields name:

Double click on fields name on list of available formats will open MAINFORMAT_00.txt file for to
edit. Before that modification you can press Refresh button to parse with new modifications you
have done over format.

Right click on fields name:

Parser will open Format folder on Windows explorer to allow you add catalgos or any modification
you want.

APENDIX A
List of available encodings to parse was generated from available encoding on .NET Framework
(for more information please visit https://msdn.microsoft.com/en-
us/library/system.text.encoding.getencodings(v=vs.110).aspx)

List of available encodings:

ASCII Codificacin ASCII Estandar IBM037 IBM EBCDIC (EE.UU.-


BCD Binary Coded Decimal Canad)
EBCDIC IBM EBCDIC IBM437 Estados Unidos OEM
UNICODE Codificacin unicode IBM500 IBM EBCDIC (Internacional)
HEX Hexadecimal, conserva los ASMO-708 rabe (ASMO 708)
caracteres como hexadecimales DOS-720 rabe (DOS)

14
USERS MANUAL FOR GALAAD PARSER
Versin 1.5

ibm737 Griego (DOS) IBM01149 IBM EBCDIC (Islands-


ibm775 Bltico (DOS) Euro)
ibm850 Europa occidental (DOS) utf-16 Unicode
ibm852 Centroeuropeo (DOS) utf-16BE Unicode (Big-Endian)
IBM855 Cirlico OEM windows-1250 Centroeuropeo
ibm857 Turco (DOS) (Windows)
IBM00858 Latino multilinge OEM I windows-1251 Cirlico (Windows)
IBM860 Portugus (DOS) Windows-1252 Europeo occidental
ibm861 Islands (DOS) (Windows)
DOS-862 Hebreo (DOS) windows-1253 Griego (Windows)
IBM863 Francs canadiense (DOS) windows-1254 Turco (Windows)
IBM864 rabe (864) windows-1255 Hebreo (Windows)
IBM865 Nrdico (DOS) windows-1256 rabe (Windows)
cp866 Cirlico (DOS) windows-1257 Bltico (Windows)
ibm869 Griego moderno (DOS) windows-1258 Vietnamita
IBM870 IBM EBCDIC (Latino (Windows)
multilinge-2) Johab Coreano (Johab)
windows-874 Tailands (Windows) macintosh Europa occidental (Mac)
cp875 IBM EBCDIC (Griego x-mac-japanese Japons (Mac)
moderno) x-mac-chinesetrad Chino
shift_jis Japons (Shift-JIS) tradicional (Mac)
gb2312 Chino simplificado x-mac-korean Coreano (Mac)
(GB2312) x-mac-arabic rabe (Mac)
ks_c_5601-1987 Coreano x-mac-hebrew Hebreo (Mac)
big5 Chino tradicional (Big5) x-mac-greek Griego (Mac)
IBM1026 IBM EBCDIC (Turco x-mac-cyrillic Cirlico (Mac)
Latino-5) x-mac-chinesesimp Chino
IBM01047 IBM Latino-1 simplificado (Mac)
IBM01140 IBM EBCDIC (EE.UU.- x-mac-romanian Rumano (Mac)
Canad-Euro) x-mac-ukrainian Ucraniano (Mac)
IBM01141 IBM EBCDIC (Alemania- x-mac-thai Tai (Mac)
Euro) x-mac-ce Centroeuropeo (Mac)
IBM01142 IBM EBCDIC (Dinamarca- x-mac-icelandic Islands (Mac)
Noruega-Euro) x-mac-turkish Turco (Mac)
IBM01143 IBM EBCDIC (Finlandia- x-mac-croatian Croata (Mac)
Suecia-Euro) utf-32 Unicode (UTF-32)
IBM01144 IBM EBCDIC (Italia-Euro) utf-32BE Unicode (UTF-32 Big-
IBM01145 IBM EBCDIC (Espaa- Endian)
Euro) x-Chinese-CNS Chino tradicional
IBM01146 IBM EBCDIC (Reino (CNS)
Unido-Euro) x-cp20001 TCA Taiwn
IBM01147 IBM EBCDIC (Francia- x-Chinese-Eten Chino tradicional
Euro) (Eten)
IBM01148 IBM EBCDIC x-cp20003 IBM5550 Taiwn
(Internacional-Euro) x-cp20004 TeleText Taiwn
x-cp20005 Wang Taiwn

15
USERS MANUAL FOR GALAAD PARSER
Versin 1.5

x-IA5 Europeo occidental (IA5) iso-8859-9 Turco (ISO)


x-IA5-German Alemn (IA5) iso-8859-13 Estonio (ISO)
x-IA5-Swedish Sueco (IA5) iso-8859-15 Latino 9 (ISO)
x-IA5-Norwegian Noruego (IA5) x-Europa Europa
us-ascii US-ASCII iso-8859-8-i Hebreo (ISO-Lgico)
x-cp20261 T.61 iso-2022-jp Japons (JIS)
x-cp20269 ISO-6937 csISO2022JP Japons (JIS-Permitir 1
IBM273 IBM EBCDIC (Alemania) byte Kana)
IBM277 IBM EBCDIC (Dinamarca- iso-2022-jp Japons (JIS-Permitir 1
Noruega) byte Kana - SO/SI)
IBM278 IBM EBCDIC (Finlandia- iso-2022-kr Coreano (ISO)
Suecia) x-cp50227 Chino simplificado (ISO-
IBM280 IBM EBCDIC (Italia) 2022)
IBM284 IBM EBCDIC (Espaa) euc-jp Japons (EUC)
IBM285 IBM EBCDIC (UK) EUC-CN Chino simplificado (EUC)
IBM290 IBM EBCDIC (Katakana euc-kr Coreano (EUC)
japons) hz-gb-2312 Chino simplificado (HZ)
IBM297 IBM EBCDIC (Francia) GB18030 Chino simplificado
IBM420 IBM EBCDIC (rabe) (GB18030)
IBM423 IBM EBCDIC (Griego) x-iscii-de ISCII Devanagari
IBM424 IBM EBCDIC (Hebreo) x-iscii-be ISCII Bengal
x-EBCDIC-KoreanExtended IBM x-iscii-ta ISCII Tamil
EBCDIC (Coreano extendido) x-iscii-te ISCII Telugu
IBM-Thai IBM EBCDIC (Tai) x-iscii-as ISCII Asams
koi8-r Cirlico (KOI8-R) x-iscii-or ISCII Oriya
IBM871 IBM EBCDIC (Islands) x-iscii-ka ISCII Kannada
IBM880 IBM EBCDIC (Cirlico ruso) x-iscii-ma ISCII Malayalam
IBM905 IBM EBCDIC (Turco) x-iscii-gu ISCII Gujarati
IBM00924 IBM Latino-1 x-iscii-pa ISCII Punjab
EUC-JP Japons (JIS 0208-1990 y utf-7 Unicode (UTF-7)
0212-1990) utf-8 Unicode (UTF-8)
x-cp20936 Chino simplificado
(GB2312)
x-cp20949 Coreano Wansung
cp1025 IBM EBCDIC (Cirlico serbio-
blgaro)
koi8-u Cirlico (KOI8-U)
iso-8859-1 Europeo occidental
(ISO)
iso-8859-2 Centroeuropeo (ISO)
iso-8859-3 Latino 3 (ISO)
iso-8859-4 Bltico (ISO)
iso-8859-5 Cirlico (ISO)
iso-8859-6 rabe (ISO)
iso-8859-7 Griego (ISO)
iso-8859-8 Hebreo (ISO-Visual)

16

You might also like