1.1.14. web_cloner
This module contains the functionality used by the client to clone web pages.
1.1.14.1. Classes
- class ClonedResourceDetails(resource, mime_type, size, file_name)[source]
A named tuple which contains details regard a resource that has been cloned.
- class WebPageCloner(target_url, dest_dir)[source]
Bases:
object
This object is used to clone web pages. It will use the WebKit2GTK+ engine and hook signals to detect what remote resources that are loaded from the target URL. These resources are then written to disk. Resources that have a MIME type of text/html have the King Phisher server javascript file patched in..
- cloned_resources[source]
A
collections.OrderedDict
instance ofClonedResourceDetails
keyed by the web resource they describe.
- patch_html(data, encoding='utf-8')[source]
Patch the HTML data to include the King Phisher javascript resource. The script tag is inserted just before the closing head tag. If no head tag is present, the data is left unmodified.