scapy.contrib.ppi_geotag module

PPI-GEOLOCATION tags

class scapy.contrib.ppi_geotag.Fixed3_6Field(name, default, *args, **kargs)

Bases: scapy.contrib.ppi_geotag._RMMLEIntField

class scapy.contrib.ppi_geotag.Fixed3_7Field(name, default, *args, **kargs)

Bases: scapy.contrib.ppi_geotag._RMMLEIntField

class scapy.contrib.ppi_geotag.Fixed6_4Field(name, default, *args, **kargs)

Bases: scapy.contrib.ppi_geotag._RMMLEIntField

class scapy.contrib.ppi_geotag.GPSTime_Field(name, default)

Bases: scapy.contrib.ppi_geotag.LETimeField

class scapy.contrib.ppi_geotag.HCSIAppField(name, default)

Bases: scapy.fields.StrFixedLenField

class scapy.contrib.ppi_geotag.HCSIDescField(name, default)

Bases: scapy.fields.StrFixedLenField

class scapy.contrib.ppi_geotag.HCSIFlagsField(name, default, size, names)

Bases: scapy.fields.FlagsField

A FlagsField where each bit/flag turns a conditional field on or off.

If the value is None when building a packet, i2m() will check the value of every field in self.names. If the field’s value is not None, the corresponding flag will be set.

i2m(pkt, val)

Convert internal value to machine value

class scapy.contrib.ppi_geotag.HCSINullField(name)

Bases: scapy.fields.Field

class scapy.contrib.ppi_geotag.HCSIPacket

Bases: scapy.layers.ppi.PPI_Element

aliastypes = [<class 'scapy.contrib.ppi_geotag.HCSIPacket'>, <class 'scapy.layers.ppi.PPI_Element'>, <class 'scapy.packet.Packet'>]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.ppi_geotag.LETimeField(name, default, epoch=None, strf='%a, %d %b %Y %H:%M:%S %z')

Bases: scapy.fields.UTCTimeField, scapy.fields.LEIntField

delta
epoch
strf
class scapy.contrib.ppi_geotag.NSCounter_Field(name, default)

Bases: scapy.contrib.ppi_geotag._RMMLEIntField

class scapy.contrib.ppi_geotag.PPI_Geotag_Antenna

Bases: scapy.contrib.ppi_geotag.HCSIPacket

aliastypes = [<class 'scapy.contrib.ppi_geotag.PPI_Geotag_Antenna'>, <class 'scapy.contrib.ppi_geotag.HCSIPacket'>, <class 'scapy.layers.ppi.PPI_Element'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_ver>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_pad>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_len>, <Field (PPI_Geotag_Antenna).present>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
hcsi_fields = [<Field (PPI_Geotag_Antenna).AntennaFlags>, <Field (PPI_Geotag_Antenna).Gain>, <Field (PPI_Geotag_Antenna).HorizBw>, <Field (PPI_Geotag_Antenna).VertBw>, <Field (PPI_Geotag_Antenna).PrecisionGain>, <Field (PPI_Geotag_Antenna).BeamID>, <Field (PPI_Geotag_Antenna).Reserved06>, <Field (PPI_Geotag_Antenna).Reserved07>, <Field (PPI_Geotag_Antenna).Reserved08>, <Field (PPI_Geotag_Antenna).Reserved09>, <Field (PPI_Geotag_Antenna).Reserved10>, <Field (PPI_Geotag_Antenna).Reserved11>, <Field (PPI_Geotag_Antenna).Reserved12>, <Field (PPI_Geotag_Antenna).Reserved13>, <Field (PPI_Geotag_Antenna).Reserved14>, <Field (PPI_Geotag_Antenna).Reserved15>, <Field (PPI_Geotag_Antenna).Reserved16>, <Field (PPI_Geotag_Antenna).Reserved17>, <Field (PPI_Geotag_Antenna).Reserved18>, <Field (PPI_Geotag_Antenna).Reserved19>, <Field (PPI_Geotag_Antenna).Reserved20>, <Field (PPI_Geotag_Antenna).Reserved21>, <Field (PPI_Geotag_Antenna).Reserved22>, <Field (PPI_Geotag_Antenna).Reserved23>, <Field (PPI_Geotag_Antenna).Reserved24>, <Field (PPI_Geotag_Antenna).Reserved25>, <Field (PPI_Geotag_Antenna).SerialNumber>, <Field (PPI_Geotag_Antenna).ModelName>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).DescString>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).AppId>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).AppData>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).Extended>]
class scapy.contrib.ppi_geotag.PPI_Geotag_GPS

Bases: scapy.contrib.ppi_geotag.HCSIPacket

aliastypes = [<class 'scapy.contrib.ppi_geotag.PPI_Geotag_GPS'>, <class 'scapy.contrib.ppi_geotag.HCSIPacket'>, <class 'scapy.layers.ppi.PPI_Element'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_ver>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_pad>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_len>, <Field (PPI_Geotag_GPS).present>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
hcsi_fields = [<Field (PPI_Geotag_GPS).GPSFlags>, <Field (PPI_Geotag_GPS).Latitude>, <Field (PPI_Geotag_GPS).Longitude>, <Field (PPI_Geotag_GPS).Altitude>, <Field (PPI_Geotag_GPS).Altitude_g>, <Field (PPI_Geotag_GPS).GPSTime>, <Field (PPI_Geotag_GPS).FractionalTime>, <Field (PPI_Geotag_GPS).eph>, <Field (PPI_Geotag_GPS).epv>, <Field (PPI_Geotag_GPS).ept>, <Field (PPI_Geotag_GPS).Reserved10>, <Field (PPI_Geotag_GPS).Reserved11>, <Field (PPI_Geotag_GPS).Reserved12>, <Field (PPI_Geotag_GPS).Reserved13>, <Field (PPI_Geotag_GPS).Reserved14>, <Field (PPI_Geotag_GPS).Reserved15>, <Field (PPI_Geotag_GPS).Reserved16>, <Field (PPI_Geotag_GPS).Reserved17>, <Field (PPI_Geotag_GPS).Reserved18>, <Field (PPI_Geotag_GPS).Reserved19>, <Field (PPI_Geotag_GPS).Reserved20>, <Field (PPI_Geotag_GPS).Reserved21>, <Field (PPI_Geotag_GPS).Reserved22>, <Field (PPI_Geotag_GPS).Reserved23>, <Field (PPI_Geotag_GPS).Reserved24>, <Field (PPI_Geotag_GPS).Reserved25>, <Field (PPI_Geotag_GPS).Reserved26>, <Field (PPI_Geotag_GPS).Reserved27>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).DescString>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).AppId>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).AppData>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).Extended>]
class scapy.contrib.ppi_geotag.PPI_Geotag_Sensor

Bases: scapy.contrib.ppi_geotag.HCSIPacket

aliastypes = [<class 'scapy.contrib.ppi_geotag.PPI_Geotag_Sensor'>, <class 'scapy.contrib.ppi_geotag.HCSIPacket'>, <class 'scapy.layers.ppi.PPI_Element'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_ver>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_pad>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_len>, <Field (PPI_Geotag_Sensor).present>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
hcsi_fields = [<Field (PPI_Geotag_Sensor).SensorType>, <Field (PPI_Geotag_Sensor).ScaleFactor>, <Field (PPI_Geotag_Sensor).Val_X>, <Field (PPI_Geotag_Sensor).Val_Y>, <Field (PPI_Geotag_Sensor).Val_Z>, <Field (PPI_Geotag_Sensor).Val_T>, <Field (PPI_Geotag_Sensor).Val_E>, <Field (PPI_Geotag_Sensor).Reserved07>, <Field (PPI_Geotag_Sensor).Reserved08>, <Field (PPI_Geotag_Sensor).Reserved09>, <Field (PPI_Geotag_Sensor).Reserved10>, <Field (PPI_Geotag_Sensor).Reserved11>, <Field (PPI_Geotag_Sensor).Reserved12>, <Field (PPI_Geotag_Sensor).Reserved13>, <Field (PPI_Geotag_Sensor).Reserved14>, <Field (PPI_Geotag_Sensor).Reserved15>, <Field (PPI_Geotag_Sensor).Reserved16>, <Field (PPI_Geotag_Sensor).Reserved17>, <Field (PPI_Geotag_Sensor).Reserved18>, <Field (PPI_Geotag_Sensor).Reserved19>, <Field (PPI_Geotag_Sensor).Reserved20>, <Field (PPI_Geotag_Sensor).Reserved21>, <Field (PPI_Geotag_Sensor).Reserved22>, <Field (PPI_Geotag_Sensor).Reserved23>, <Field (PPI_Geotag_Sensor).Reserved24>, <Field (PPI_Geotag_Sensor).Reserved25>, <Field (PPI_Geotag_Sensor).Reserved26>, <Field (PPI_Geotag_Sensor).Reserved27>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).DescString>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).AppId>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).AppData>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).Extended>]
class scapy.contrib.ppi_geotag.PPI_Geotag_Vector

Bases: scapy.contrib.ppi_geotag.HCSIPacket

aliastypes = [<class 'scapy.contrib.ppi_geotag.PPI_Geotag_Vector'>, <class 'scapy.contrib.ppi_geotag.HCSIPacket'>, <class 'scapy.layers.ppi.PPI_Element'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_ver>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_pad>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).geotag_len>, <Field (PPI_Geotag_Vector).present>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
hcsi_fields = [<Field (PPI_Geotag_Vector).VectorFlags>, <Field (PPI_Geotag_Vector).VectorChars>, <Field (PPI_Geotag_Vector).Pitch>, <Field (PPI_Geotag_Vector).Roll>, <Field (PPI_Geotag_Vector).Heading>, <Field (PPI_Geotag_Vector).Off_X>, <Field (PPI_Geotag_Vector).Off_Y>, <Field (PPI_Geotag_Vector).Off_Z>, <Field (PPI_Geotag_Vector).Reserved08>, <Field (PPI_Geotag_Vector).Reserved09>, <Field (PPI_Geotag_Vector).Reserved10>, <Field (PPI_Geotag_Vector).Reserved11>, <Field (PPI_Geotag_Vector).Reserved12>, <Field (PPI_Geotag_Vector).Reserved13>, <Field (PPI_Geotag_Vector).Reserved14>, <Field (PPI_Geotag_Vector).Reserved15>, <Field (PPI_Geotag_Vector).Err_Rot>, <Field (PPI_Geotag_Vector).Err_Off>, <Field (PPI_Geotag_Vector).Reserved18>, <Field (PPI_Geotag_Vector).Reserved19>, <Field (PPI_Geotag_Vector).Reserved20>, <Field (PPI_Geotag_Vector).Reserved21>, <Field (PPI_Geotag_Vector).Reserved22>, <Field (PPI_Geotag_Vector).Reserved23>, <Field (PPI_Geotag_Vector).Reserved24>, <Field (PPI_Geotag_Vector).Reserved25>, <Field (PPI_Geotag_Vector).Reserved26>, <Field (PPI_Geotag_Vector).Reserved27>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).DescString>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).AppId>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).AppData>, <Field (PPI_Geotag_GPS,PPI_Geotag_Vector,PPI_Geotag_Sensor,PPI_Geotag_Antenna).Extended>]
class scapy.contrib.ppi_geotag.VectorFlags_Field(name, default)

Bases: scapy.fields.XLEIntField

Represents the VectorFlags field. Handles the RelativeTo:sub-field

any2i(pkt, x)

Try to understand the most input values possible and make an internal value from them

i2repr(pkt, x)

Convert internal value to a nice representation