# ir_sniff¶

## Presentation¶

ir_sniff allows to sniff and decode the IR signals captured by an IRMA device. It allows to choose the frequency of the receiver (FREQUENCY parameter, set to 38 kHz by default) and to indicates how many signals have to be captured (NUMBER parameter).

## Input parameters¶

Name

Default value

Possible values

Description

INTERFACE

irma0

irmaX

Interface to display

FREQUENCY

38

<integer>

Frequency to use

NUMBER

1

<integer>

Number of captured signals

## Output parameters¶

If only one signal has been captured, the following output parameters are generated (CODE and CODE_SIZE are only generated if a known protocol is identified):

Name

Possible values

Description

INTERFACE

irmaX

Selected interface

DATA

<integers list>

Raw data describing the signal

PROTOCOL

<string>

Identified protocol of the signal

CODE (optional)

IR Code included in the signal

CODE_SIZE (optional)

<integer>

Size of the IR Code included in the signal

If multiple signals have been captured, the same output parameters are generated, but are suffixed by the number of the signals :

Name

Possible values

Description

INTERFACE

irmaX

Selected interface

DATA1

<integers list>

Raw data describing the 1st signal

PROTOCOL1

<string>

Identified protocol of the 1st signal

CODE1 (optional)

IR Code included in the 1st signal

CODE_SIZE1 (optional)

<integer>

Size of the IR Code included in the 1st signal

DATA2

<integers list>

Raw data describing the 2nd signal

PROTOCOL2

<string>

Identified protocol of the 2nd signal

CODE2 (optional)

IR Code included in the 2nd signal

CODE_SIZE2 (optional)

<integer>

Size of the IR Code included in the 2nd signal

...

...

...

## Usage¶

### Basic Usage¶

If you want to capture one signal, use the following command :

$mirage ir_sniff [INFO] Module ir_sniff loaded ! [PACKET] << IR - NEC Packet | code (32 bits) =76044fc0 >> [INFO] Mirage process terminated !  If you want to capture multiple signals, you can use the NUMBER parameter in order to provide the number of signal to capture: $ mirage ir_sniff NUMBER=3
[PACKET] << IR - NEC Packet | code (32 bits) =76044ff0 >>
[PACKET] << IR - NEC Packet | code (32 bits) =76044fd0 >>
[PACKET] << IR - NEC Packet | code (32 bits) =76044fc0 >>
[INFO] Mirage process terminated !


### Performing a replay attack¶

This module can be combined with ir_inject in order to perform replay attacks. You can launch this kind of attack by using the following command:

\$ mirage "ir_sniff|ir_inject"