# Path: beeswarm/drones/client/baits/http.py
# class Http(ClientBase):
#     def __init__(self, options):
#     def start(self):
#     def _make_url(self, server, path, port=80):
#     def _get_links(self, response):
# 
# Path: beeswarm/drones/client/baits/clientbase.py
# 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)
#         self.sessions[session.id] = session
#         return session
# 
#     def close_session(self, session):
#         session.end_session()
#         if session.id in self.sessions:
#             del self.sessions[session]
#         else:
#             assert False


from beeswarm.drones.client.baits import http
from beeswarm.drones.client.baits.clientbase import ClientBase
# Copyright (C) 2013 Aniket Panse <contact@aniketpanse.in>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# 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/>.

# Aniket Panse <contact@aniketpanse.in> grants Johnny Vestergaard <jkv@unixcluster.dk>
# a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
# copyright license to reproduce, prepare derivative works of, publicly
# display, publicly perform, sublicense, relicense, and distribute [the] Contributions
# and such derivative works.




class Https(http.Http, ClientBase):
    def _make_url(self, server, path, port=443):
        if port == 443:
            url = 'https://{}/{}'.format(server, path)
        else:

# Path: beeswarm/drones/client/baits/http.py
# class Http(ClientBase):
#     def __init__(self, options):
#     def start(self):
#     def _make_url(self, server, path, port=80):
#     def _get_links(self, response):
# 
# Path: beeswarm/drones/client/baits/clientbase.py
# 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)
#         self.sessions[session.id] = session
#         return session
# 
#     def close_session(self, session):
#         session.end_session()
#         if session.id in self.sessions:
#             del self.sessions[session]
#         else:
#             assert False


# Path: beeswarm/drones/client/baits/https.py
from beeswarm.drones.client.baits import http
from beeswarm.drones.client.baits.clientbase import ClientBase

# Copyright (C) 2013 Aniket Panse <contact@aniketpanse.in>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# 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/>.

# Aniket Panse <contact@aniketpanse.in> grants Johnny Vestergaard <jkv@unixcluster.dk>
# a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
# copyright license to reproduce, prepare derivative works of, publicly
# display, publicly perform, sublicense, relicense, and distribute [the] Contributions
# and such derivative works.




class Https(http.Http, ClientBase):
    def _make_url(self, server, path, port=443):
        if port == 443:
            url = 'https://{}/{}'.format(server, path)
        else:

            url = 'https://{}:{}/{}'.format(server, port, path)