Skip to content

Commit

Permalink
Merge pull request Kkevsterrr#17 from Kkevsterrr/GEN-1-new_layers
Browse files Browse the repository at this point in the history
Reorganized layers into new directory.
  • Loading branch information
Kkevsterrr authored Jul 5, 2020
2 parents b27ea50 + 0796312 commit 08b98b9
Show file tree
Hide file tree
Showing 45 changed files with 1,204 additions and 1,175 deletions.
10 changes: 5 additions & 5 deletions actions/fragment.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import random
from actions.action import Action
import actions.packet
import layers.packet

from scapy.all import IP, TCP, fragment

Expand Down Expand Up @@ -88,8 +88,8 @@ def ip_fragment(self, packet, logger):
else:
# packet can be fragmented as requested
frags = self.fragment(packet.copy().packet, fragsize=self.fragsize*8)
packet1 = actions.packet.Packet(frags[0])
packet2 = actions.packet.Packet(frags[1])
packet1 = layers.packet.Packet(frags[0])
packet2 = layers.packet.Packet(frags[1])
if self.correct_order:
return packet1, packet2
else:
Expand Down Expand Up @@ -132,8 +132,8 @@ def tcp_segment(self, packet, logger):
if not pkt2.haslayer("TCP"):
pkt2 = IP(packet["IP"])/TCP(bytes(pkt2["IP"].load))

packet1 = actions.packet.Packet(pkt1)
packet2 = actions.packet.Packet(pkt2)
packet1 = layers.packet.Packet(pkt1)
packet2 = layers.packet.Packet(pkt2)

# Reset packet2's SYN number
if packet2["TCP"].seq + fragsize > MAX_UINT:
Expand Down
Loading

0 comments on commit 08b98b9

Please sign in to comment.