diff --git a/conpot/core/filesystem.py b/conpot/core/filesystem.py index e4c9207c..68c9b04e 100644 --- a/conpot/core/filesystem.py +++ b/conpot/core/filesystem.py @@ -27,7 +27,6 @@ from os import F_OK, R_OK, W_OK from typing import Optional, Union, Text, Any, List from fs import open_fs, mirror, errors, subfs, base -from fs.time import datetime_to_epoch from fs.mode import Mode from fs.wrapfs import WrapFS from fs.permissions import Permissions diff --git a/conpot/core/fs_utils.py b/conpot/core/fs_utils.py index f0e0de86..9081c60e 100644 --- a/conpot/core/fs_utils.py +++ b/conpot/core/fs_utils.py @@ -20,7 +20,6 @@ """ import fs from typing import Optional, Union -from fs import errors from fs.permissions import Permissions import typing from fs.subfs import SubFS diff --git a/conpot/core/loggers/stix_transform.py b/conpot/core/loggers/stix_transform.py index 1d04a58e..0f5f4791 100644 --- a/conpot/core/loggers/stix_transform.py +++ b/conpot/core/loggers/stix_transform.py @@ -29,11 +29,7 @@ from stix.incident.time import Time as StixTime from stix.indicator import Indicator from stix.ttp import TTP, VictimTargeting -from stix.extensions.identity.ciq_identity_3_0 import ( - CIQIdentity3_0Instance, - STIXCIQIdentity3_0, - OrganisationInfo, -) +from stix.extensions.identity.ciq_identity_3_0 import CIQIdentity3_0Instance from cybox.core import Observable from cybox.objects.socket_address_object import SocketAddress diff --git a/conpot/core/virtual_fs.py b/conpot/core/virtual_fs.py index 696dbcb1..baccb628 100644 --- a/conpot/core/virtual_fs.py +++ b/conpot/core/virtual_fs.py @@ -20,7 +20,7 @@ import sys import fs import conpot -from fs import open_fs, errors, subfs +from fs import open_fs, subfs from conpot.core.filesystem import AbstractFS, SubAbstractFS logger = logging.getLogger(__name__) diff --git a/conpot/protocols/bacnet/bacnet_app.py b/conpot/protocols/bacnet/bacnet_app.py index 829d5d56..84c3e29e 100644 --- a/conpot/protocols/bacnet/bacnet_app.py +++ b/conpot/protocols/bacnet/bacnet_app.py @@ -23,7 +23,6 @@ import sys from bacpypes.pdu import GlobalBroadcast import bacpypes.object -from bacpypes import errors from bacpypes.app import BIPSimpleApplication from bacpypes.constructeddata import Any from bacpypes.constructeddata import InvalidParameterDatatype diff --git a/conpot/protocols/ftp/ftp_base_handler.py b/conpot/protocols/ftp/ftp_base_handler.py index 76fb31fd..79b19ad6 100644 --- a/conpot/protocols/ftp/ftp_base_handler.py +++ b/conpot/protocols/ftp/ftp_base_handler.py @@ -17,8 +17,6 @@ import socketserver import gevent -from gevent import queue -from gevent import select import conpot.core as conpot_core from conpot.core.filesystem import FilesystemError import logging @@ -27,10 +25,7 @@ import fs from datetime import datetime import os -from fs import errors -from fs.path import frombase from conpot.helpers import sanitize_file_name -from gevent import event from conpot.protocols.ftp.ftp_utils import FTPPrivilegeException from gevent import socket diff --git a/conpot/protocols/ftp/ftp_handler.py b/conpot/protocols/ftp/ftp_handler.py index 4e3e23cb..fe1ed488 100644 --- a/conpot/protocols/ftp/ftp_handler.py +++ b/conpot/protocols/ftp/ftp_handler.py @@ -11,7 +11,6 @@ from datetime import datetime import gevent from gevent import socket -from fs import errors from conpot.core.filesystem import FilesystemError, FSOperationNotPermitted from conpot.protocols.ftp.ftp_utils import FTPPrivilegeException, get_data_from_iter diff --git a/conpot/protocols/kamstrup/usage_simulator.py b/conpot/protocols/kamstrup/usage_simulator.py index b692f77f..03346826 100644 --- a/conpot/protocols/kamstrup/usage_simulator.py +++ b/conpot/protocols/kamstrup/usage_simulator.py @@ -18,7 +18,6 @@ import logging import gevent -from gevent import event import conpot.core as conpot_core diff --git a/conpot/protocols/snmp/conpot_cmdrsp.py b/conpot/protocols/snmp/conpot_cmdrsp.py index 2a0837d5..654539fe 100644 --- a/conpot/protocols/snmp/conpot_cmdrsp.py +++ b/conpot/protocols/snmp/conpot_cmdrsp.py @@ -1,7 +1,6 @@ import sys import logging import random -from datetime import datetime from pysnmp.entity.rfc3413 import cmdrsp from pysnmp.proto import error diff --git a/conpot/protocols/tftp/tftp_handler.py b/conpot/protocols/tftp/tftp_handler.py index ca605b1a..4dbcb8bd 100644 --- a/conpot/protocols/tftp/tftp_handler.py +++ b/conpot/protocols/tftp/tftp_handler.py @@ -4,7 +4,6 @@ import tftpy import time from gevent import socket -from fs import errors from tftpy import TftpException, TftpErrors from tftpy.TftpStates import TftpStateExpectACK, TftpStateExpectDAT from tftpy.TftpPacketTypes import TftpPacketRRQ, TftpPacketWRQ diff --git a/conpot/protocols/tftp/tftp_server.py b/conpot/protocols/tftp/tftp_server.py index ef9c4379..90861035 100644 --- a/conpot/protocols/tftp/tftp_server.py +++ b/conpot/protocols/tftp/tftp_server.py @@ -25,7 +25,6 @@ from gevent.server import DatagramServer import conpot.core as conpot_core from conpot.core.protocol_wrapper import conpot_protocol -from gevent import event from tftpy import TftpException, TftpTimeout import logging from conpot.utils.ext_ip import get_interface_ip diff --git a/conpot/tests/helpers/s7comm_client.py b/conpot/tests/helpers/s7comm_client.py index 84ed8642..9753a877 100644 --- a/conpot/tests/helpers/s7comm_client.py +++ b/conpot/tests/helpers/s7comm_client.py @@ -18,7 +18,7 @@ from struct import pack, unpack from optparse import OptionGroup -from conpot.helpers import chr_py3, str_to_bytes +from conpot.helpers import str_to_bytes import struct import socket import string diff --git a/conpot/tests/helpers/snmp_client.py b/conpot/tests/helpers/snmp_client.py index 45c751a8..40dd52cc 100644 --- a/conpot/tests/helpers/snmp_client.py +++ b/conpot/tests/helpers/snmp_client.py @@ -4,7 +4,6 @@ from pysnmp.entity import engine, config from pysnmp.carrier.asynsock.dgram import udp from pysnmp.entity.rfc3413 import cmdgen -from pysnmp.proto import rfc1902 class SNMPClient(object): diff --git a/conpot/tests/test_bacnet_server.py b/conpot/tests/test_bacnet_server.py index 0a4778ed..a45fa416 100644 --- a/conpot/tests/test_bacnet_server.py +++ b/conpot/tests/test_bacnet_server.py @@ -32,8 +32,6 @@ WhoHasRequest, ReadPropertyRequest, ReadPropertyACK, - AtomicReadFileRequest, - AuthenticateRequest, ) from bacpypes.constructeddata import Any from bacpypes.primitivedata import Real diff --git a/conpot/tests/test_vfs.py b/conpot/tests/test_vfs.py index 09b017f8..6729c700 100644 --- a/conpot/tests/test_vfs.py +++ b/conpot/tests/test_vfs.py @@ -25,7 +25,6 @@ from freezegun import freeze_time import fs from datetime import datetime -from fs import permissions from fs.time import epoch_to_datetime