Skip to main content

Cybersecure Easy

A small beginner-friendly Python facade for common defensive security operations. It gives common tasks readable names while keeping their underlying tools visible. It is a starter wrapper, not a replacement for learning the tools or a claim that one library covers every item in a security stack.

Install

From this folder:

python -m pip install -e ".[network,web,crypto]"

Install all supported optional Python dependencies with python -m pip install -e ".[all]". Some tasks also need external tools: Nmap for scan_ports, Bandit for audit_python, and Node.js/npm for audit_dependencies. Socket, Snyk, Helmet, Express, bcrypt, Argon2, JWT, Zod, CORS, Paramiko, Impacket, TensorFlow and similar ecosystems remain their own tools/frameworks; this package does not silently install or wrap all of them.

Examples

from cybersecure import Cybersecure

# Sends a TCP SYN to a private or loopback address (may need administrator rights).
Cybersecure.send_packet(Ip="127.0.0.1", Port=80)

# Scan only your private/loopback host.
print(Cybersecure.scan_ports(Ip="192.168.1.10", Ports="22,80,443"))

print(Cybersecure.get_page(URL="https://example.com")["status"])
print(Cybersecure.Curl_Call(CURL='curl --url "https://example.com" -H "Accept: text/html"'))
print(Cybersecure.extract_links(URL="https://example.com"))
print(Cybersecure.extract_element(URL="https://example.com", Selector="h1"))
print(Cybersecure.extract_element(URL="https://example.com", Selector="p", All=True))

# Optional: choose one proxy from monosans/proxy-list, or pass one of your own.
proxy = Cybersecure.proxies()  # random HTTP proxy
print(Cybersecure.get_page(URL="https://example.com", Proxy=proxy)["status"])
# Or use Proxy="random" directly in get_page/extract_links/extract_element.
print(Cybersecure.sha256(File="download.bin"))

blob = Cybersecure.encrypt_text(Text="hello", Password="use a long unique passphrase")
print(Cybersecure.decrypt_text(Encrypted=blob, Password="use a long unique passphrase"))

print(Cybersecure.audit_python(PathToCode="./src"))
print(Cybersecure.audit_dependencies(PathToProject="./web-app"))
print(Cybersecure.express_security_template())  # starter code for a separate Express app

# Added network / DNS / password / file helpers:
print(Cybersecure.ping_host(Ip="192.168.1.1"))
print(Cybersecure.dns_lookup(Domain="example.com", RecordType="A"))
print(Cybersecure.check_security_headers(URL="https://example.com"))
print(Cybersecure.check_password_strength("a-long-example-passphrase"))
print(Cybersecure.hash_text(Text="hello", Algorithm="sha256"))
print(Cybersecure.get_file_metadata(File="sample.bin"))

# Print the complete command reference:
import cybersecure
cybersecure.help()

# Explain Python findings, preview/apply conservative fixes, and verify:
report = Cybersecure.audit("./myapp")
print(report.explain())
print(report.preview_fixes())
# Only deterministic literal-command B602 cases are auto-fixable.
report.apply_fixes(confirm=True)  # changes source files; inspect preview first
print(report.verify())

# Save a baseline, then compare future scans:
Cybersecure.snapshot("./myapp")
changes = Cybersecure.diff_snapshot("./myapp", FailOnNew="HIGH")
print(changes)
if changes["fail"]:
    raise SystemExit("New high severity findings")

Cybersecure.audit() currently uses Bandit for Python code. Findings share a Finding interface (severity, confidence, cwe, cve, location, evidence, explanation, remediation, fix_available, explain(), preview_fix(), and verify()). The first automatic fix handles only Bandit B602 when the command is a static string with no interpolation; other findings are guidance-only. Snapshots are stored under .cybersecure/snapshot.json by default. Snapshot comparisons use rule, basename, line, and evidence as an identity, so moving code can appear as a new and fixed finding.

Network helpers accept loopback and private IPs by default. For an authorized public target only, explicitly set CYBERSECURE_ALLOW_PUBLIC_TARGETS=1. Get written authorization before sending traffic or scanning any system. HTTP helpers only fetch pages and do not fuzz or exploit endpoints. Never use this package to access systems without permission. Secret material and passwords are never logged by this package.

Optional extras: [dns] installs DNS and WHOIS support, [passwords] installs Argon2, and [images] installs Pillow. [all] includes these extras. Reputation lookups may need ABUSEIPDB_API_KEY or a VirusTotal API key. check_pwned_password() uses the Pwned Passwords range API and sends only the first five characters of the SHA-1 hash. Static code scanners are heuristic and do not replace a full security review.

Metadata

Release files for cybersecure-easy 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cybersecure-easy 0.3.0
File Size Uploaded
cybersecure_easy-0.3.0.tar.gz 28.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cybersecure-easy 0.3.0
File Interpreter ABI Platform
cybersecure_easy-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 54.9 kB

Release files / cybersecure_easy-0.3.0.tar.gz

Download URL cybersecure_easy-0.3.0.tar.gz
Size 28.6 kB
Tags Source
SHA-256 checksum
How to use checksums
73161fdc1d7879823cc2ac77f83e0ca804709d7e61f36ade8c5ed454e801b4fd
BLAKE2b-256 checksum
How to use checksums
ebf48e2f49f2640b3dfa1ad1b15676d798c130424fcb6dde74e55f04a55d851a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / cybersecure_easy-0.3.0-py3-none-any.whl

Download URL cybersecure_easy-0.3.0-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6c7507181945287fc966f192714407a19ff3f129c6913aacca603ca655a7982
BLAKE2b-256 checksum
How to use checksums
230674dc10332e2fcae6f7b8b96c71bf26ac688f7458c02200d44e74f719f6de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page