# Path: beeswarm/drones/client/models/session.py
# class BaitSession(BaseSession):
#     client_id = ''
# 
#     def __init__(self, protocol, destination_ip, destination_port, honeypot_id):
#         super(BaitSession, self).__init__(protocol, destination_ip=destination_ip,
#                                           destination_port=destination_port)
# 
#         assert BaitSession.client_id
# 
#         self.client_id = BaitSession.client_id
#         self.honeypot_id = honeypot_id
# 
#         self.did_connect = False
#         self.did_login = False
#         self.alldone = False
#         self.did_complete = False
#         self.protocol_data = {}
# 
#     def to_dict(self):
#         return vars(self)
# 
#     def end_session(self):
#         super(BaitSession, self).end_session(Messages.SESSION_CLIENT.value)


from beeswarm.drones.client.models.session import BaitSession
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.



class ClientBase(object):
    """ Base class for Bees. This should only be used after sub-classing. """

    def __init__(self, options):
        """
            Initializes common values.
        :param sessions: A dict which is updated every time a new session is created.
        :param options: A dict containing the options entry for this bait
        """
        self.options = options
        self.sessions = {}

    def create_session(self, server_host, server_port, honeypot_id):
        """
            Creates a new session.

        :param server_host: IP address of the server
        :param server_port: Server port
        :return: A new `BaitSession` object.
        """
        protocol = self.__class__.__name__.lower()

# Path: beeswarm/drones/client/models/session.py
# class BaitSession(BaseSession):
#     client_id = ''
# 
#     def __init__(self, protocol, destination_ip, destination_port, honeypot_id):
#         super(BaitSession, self).__init__(protocol, destination_ip=destination_ip,
#                                           destination_port=destination_port)
# 
#         assert BaitSession.client_id
# 
#         self.client_id = BaitSession.client_id
#         self.honeypot_id = honeypot_id
# 
#         self.did_connect = False
#         self.did_login = False
#         self.alldone = False
#         self.did_complete = False
#         self.protocol_data = {}
# 
#     def to_dict(self):
#         return vars(self)
# 
#     def end_session(self):
#         super(BaitSession, self).end_session(Messages.SESSION_CLIENT.value)


# Path: beeswarm/drones/client/baits/clientbase.py
from beeswarm.drones.client.models.session import BaitSession

# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.



class ClientBase(object):
    """ Base class for Bees. This should only be used after sub-classing. """

    def __init__(self, options):
        """
            Initializes common values.
        :param sessions: A dict which is updated every time a new session is created.
        :param options: A dict containing the options entry for this bait
        """
        self.options = options
        self.sessions = {}

    def create_session(self, server_host, server_port, honeypot_id):
        """
            Creates a new session.

        :param server_host: IP address of the server
        :param server_port: Server port
        :return: A new `BaitSession` object.
        """
        protocol = self.__class__.__name__.lower()

        session = BaitSession(protocol, server_host, server_port, honeypot_id)