Reference
Core
Scapy core modules.
Cloudflare Worker module to deploy Root certificate.
- class scapy.core.worker.Worker(token=None)[source]
Cloudflare Worker class which handle the deployment of Root certificate.
- deploy(name, file)[source]
Deploy the worker in to Cloudflare Edge network.
- Parameters
name (str) – Name of worker. This name will be reflected in the worker url.
file (str) – Javascript file of the worker to deploy
- Returns
Worker url which is deployed in to CLoudflare Edge network
- Return type
str
- get_metadata(namespace)[source]
Generate for the Cloudflare worker.
- Parameters
namespace (CloudflareAPI.dataclass.Namespace) – Namespace instance of Cloudflare API.
- Return type
None
CLI
CLI Command utilities.
- exception scapy.cli.utils.DownloadError(*args, **kwargs)[source]
Error class raised while download fails.
- class scapy.cli.utils.Printer[source]
Custom Styled Printer class.
- animate(content, speed=0.2)[source]
Add animation in front of content using multithreading.
- Parameters
content (str) – Content to print
speed (float, optional) – Time intervel between each animation frame. Defaults to 0.2.
- Return type
None
- done(content, url='')[source]
Print completed content.
- Parameters
content (str) – Content to print
url (str, optional) – URL to print and launch in browser. Defaults to “”.
- Return type
None
- loop_animation(position, last_postition)[source]
Loop animation logic.
- Parameters
position (int) – Current position of moving part
last_postition (int) – Final position of moving part
- Returns
Calculated position of moving part
- Return type
int
- scapy.cli.utils.download(url, location=None, verbose=True)[source]
Download the content and write to file.
- Parameters
url (str) – URL location to download.
location (str, optional) – Location to write downloaded file. Defaults to None.
verbose (bool, optional) – Control verbose. Defaults to True.
- Returns
Path of the file written.
- Return type
str
- scapy.cli.utils.fetch(url)[source]
Fetch content from URL.
- Parameters
url (str) – URL string
- Raises
DownloadError – Raise when download fails
- Returns
JSON data or Binary data
- Return type
Any