|
Peach ::
Generators ::
data ::
IcmpChecksum ::
Class IcmpChecksum
|
|
Class IcmpChecksum
source code
Will generate the ICMP checksum of Block or another Generator.
IcmpChecksum can can detect recursive calls and provides a default based
on ICMP RFC.
Produced value is 16 bits.
Example:
>>> block = Block([ Static('12345') ])
>>> icmpChecksum = IcmpChecksum( block )
>>> print icmpChecksum.getValue()
5
|
|
|
|
|
_checksum(self,
checksum_packet)
Calculate checksum |
source code
|
|
|
|
getValue(self)
Return data, passed through a transformer if set. |
source code
|
|
|
string
|
|
|
Block
|
|
|
|
|
- Parameters:
block (Block) - Block to get size of
|
|
Returns size of block as string.
- Returns: string
- size of specified Block
|
|
Get block object we act on.
- Returns: Block
- current Block
|
|
Set block we act on.
- Parameters:
block (Block) - Block to set.
|