| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
plist=[] |
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
plist.append(Ether()/IP()/GRE()/"tototiti") |
|---|
| 12 |
plist.append(Ether()/IP()/GRE(chksum_present=1)/"tototiti") |
|---|
| 13 |
plist.append(Ether()/IP()/GRE(key_present=1,chksum_present=1,key=0x1337beef)/"tototiti") |
|---|
| 14 |
plist.append(Ether()/IP()/GRE(seqnum_present=1, seqence_number=123456789)/"tototiti") |
|---|
| 15 |
plist.append(Ether()/IP()/GRE(routing_present=1)/GRErouting(address_family=1, SRE_len=4, routing_info="abcd")/GRErouting()/"tototiti") |
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
for p in plist: |
|---|
| 19 |
print "-----------------------------------" |
|---|
| 20 |
Ether(str(p)).show() |
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
plist.append(Ether()/IP()/GRE(chksum_present=1, chksum=0xcafe)/"BAD CHECKSUM") |
|---|
| 24 |
plist.append(Ether()/IP()/GRE(routing_present=1)/GRErouting(address_family=1, SRE_len=4, routing_info="abcd")/"BAD GRE routing info") |
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
plist.append(Ether()/IP()/GRE(seqnum_present=0, seqence_number=123456789)/"pouet") |
|---|
| 29 |
plist.append(Ether()/IP()/GRE(chksum_present=0, chksum=0xcafe)/"coin") |
|---|
| 30 |
|
|---|
| 31 |
wrpcap("scapy_gre.pcap", PacketList(plist)) |
|---|