Skip to main content

Scapy Manager (scapy-man)

Step CA Manager using Python

Documenation: scapy.nikz.in

Setup

git clone https://github.com/nikhiljohn10/scapy
cd scapy
pip install poetry
poetry update

Demo

poetry run bash examples/deploy.sh

You will be asked to provide a Cloudflare Token to upload the worker. The worker will be uploaded to your Cloudflare Account and deployed to Cloudflare Edge Network.

If successully deployed, you will find a url where the demo CA Root certificate and hosted. Install this certificate in systems to access stepca.nikz.in.

Python Package

pip install scapy-man

Completion

scapy --completion

This command will install the shell completion. To activate the shell completion in currently working shell, run . ~/.bash_completion or source ~/.bash_completion.

Troubleshooting

  • If scapy not found: export PATH=$PATH:$(realpath ~/.local/bin)
  • If pip not found: sudo apt install python3-pip -y
  • If python3-pip not found: sudo apt update

Usage with Step CA

INSTALLATION_PATHS=$(scapy get step all -p)
sudo dpkg -i $INSTALLATION_PATHS
scapy gen passwords
scapy gen worker

export CA_NAME="Scapy CA"
export CA_DNS="$(hostname).local,localhost"
step ca init \
--name "$CA_NAME" \
--deployment-type standalone \
--dns "$CA_DNS" \
--address ":443" \
--provisioner admin \
--password-file $(scapy path password root) \
--provisioner-password-file $(scapy path password provisioner)

step crypto change-pass $(scapy path key intermediate) -f \
--password-file $(scapy path password root) \
--new-password-file $(scapy path password intermediate)

export FINGERPRINT=$(step certificate fingerprint $(scapy path cert root))
scapy deploy --worker scapy --js worker.js

sudo setcap CAP_NET_BIND_SERVICE=+eip $(which step-ca)
step-ca $(scapy path config ca) --password-file $(scapy path password intermediate)

In the above commands,

  • Generate a password and store in step path
  • Generate a basic worker file
  • Export CA_NAME variable with CA Name
  • Generate PKI using Step CA
  • Export FINGERPRINT variable with fingerprint of Root Certificate
  • Deploy worker scapy with worker.js as script file.

Commandline Interface

Scapy CLI

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scapy-man-0.3.2.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scapy_man-0.3.2-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file scapy-man-0.3.2.tar.gz.

File metadata

  • Download URL: scapy-man-0.3.2.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for scapy-man-0.3.2.tar.gz
Algorithm Hash digest
SHA256 39d797590b05ca5679b169109ca7d6c4dac1d3600768d1c3533733dc515ddcc9
MD5 d355c75df3323e6e92ee36899ac6aac5
BLAKE2b-256 e003d54401b4ffb6ca1fd7c012dba546b2f634a7106af2d01a06a80f0f25aa04

See more details on using hashes here.

File details

Details for the file scapy_man-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: scapy_man-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for scapy_man-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3fbd5f0532354d6407746d7968acafea39229a067d8b2302d6ba82637bea2fe1
MD5 383438d33ad2833edef5636f57d8bcc5
BLAKE2b-256 bc8009f9c73f6383b1ea4becfc6dfd6691b15698d82b4db615f562e706be82d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page