5.2. Modules¶
The project’s code base is split among multiple Python modules under the primary
king_phisher
package. Code which is not specific to either the client
or server code bases is directly in the root of the king_phisher
package with code that is specific to either the client or server being under
either the king_phisher.client
sub-package or
king_phisher.server
sub-package respectively.
5.2.1. Special Modules¶
Some modules have special designations to identify them as having particular qualities.
5.2.1.1. Clean Room Modules¶
Modules that qualify for the “Clean Room” classification are suitable for use during the early phases of the application’s initialization. They may also be used for general purposes.
- Modules must not import any code which is not either included in the Python
standard library or packaged with King Phisher. For example,
os
,sys
, andking_phisher.startup
may be imported whileadvancedhttpserver
,jinja2
, andsmoke_zephyr
may not. - Modules may only import other King Phisher modules which also have the “Clean Room” classification.
Modules with this designation have the following comment banner included in their source file just below the standard splat.
################################################################################
#
# CLEAN ROOM MODULE
#
# This module is classified as a "Clean Room" module and is subject to
# restrictions on what it may import.
#
# See: https://king-phisher.readthedocs.io/en/latest/development/modules.html#clean-room-modules
#
################################################################################