Skip to content

Commit

Permalink
Remove uncommented code
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanDeveloper committed Aug 30, 2024
1 parent d9d1eee commit f83886a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
7 changes: 0 additions & 7 deletions heifip/layers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import os
import pickle
from abc import ABC
from enum import Enum, unique
from typing import Type

from scapy.all import (Packet,load_layer,
sniff, wrpcap)
Expand All @@ -11,7 +8,6 @@
from scapy.layers.inet import IP, TCP, UDP, Ether
from scapy.layers.inet6 import IPv6

from heifip.exceptions import FIPWrongParameterException
from heifip.layers.dns import DNSPacket
from heifip.layers.http import (HTTPPacket, HTTPRequestPacket,
HTTPResponsePacket)
Expand Down Expand Up @@ -43,9 +39,6 @@ def __init__(
file_extension="pcap",
) -> None:
self.hash_dict = set()
# if os.path.isfile('hashes_pkt.pkl'):
# with open('hashes_pkt.pkl', 'rb') as f:
# self.hash_dict = pickle.load(f)
load_layer("tls")

def write_packet(self) -> None:
Expand Down
2 changes: 0 additions & 2 deletions heifip/layers/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
class DNSPacket(TransportPacket):
def __init__(self, packet: Packet, address_mapping={}, layer_map={}) -> None:
TransportPacket.__init__(self, packet, address_mapping, layer_map)
# if DNS in self.layer_map:
# self.hash = hashlib.md5(f"{self.packet[DNS].qr}".encode('utf-8')).hexdigest()

def header_preprocessing(self):
# TODO: Fix issue with DNS processing
Expand Down
1 change: 0 additions & 1 deletion heifip/layers/ip.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import hashlib
from typing import Type

from scapy.all import Packet, RandIP, RandIP6, Raw
from scapy.layers.http import HTTP
Expand Down
3 changes: 1 addition & 2 deletions heifip/layers/transport.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import hashlib
from typing import Type

from scapy.all import Packet, Raw
from scapy.layers.http import HTTP, HTTPRequest, HTTPResponse
from scapy.layers.http import HTTP
from scapy.layers.inet import TCP, UDP
from scapy.layers.tls.all import TLS

Expand Down

0 comments on commit f83886a

Please sign in to comment.