Metadata-Version: 2.4
Name: cryptgraph
Version: 0.1.0
Summary: Scenario-based Cybersecurity practical Python scripts
Author: CyberPracticals contributors
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Topic :: Security
Classifier: Topic :: Education
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Cryptgraphy

A downloadable collection of scenario-based Cybersecurity practical Python scripts transcribed from the supplied *Scenario Based CIS* PDF.

## Install

PyPI distribution name: `cryptgraph`. The installed command remains `cryptgraph`.

```bash
pip install cryptgraph
```

## Commands

```bash
cryptgraph list
cryptgraph list --category cloud-security
cryptgraph download confidentiality
cryptgraph download secure-communication
cryptgraph download cloud-security
cryptgraph download all
```

A single-script download writes a `.py` file to the current directory. Category downloads create a folder containing that category's scripts. `all` downloads the complete collection.

Use `-o` to choose a destination:

```bash
cryptgraph download confidentiality -o confidentiality.py
cryptgraph download all -o my_cyber_practicals
```

## Categories

- CIA: confidentiality, integrity, availability, authentication/accountability, non-repudiation
- OS Security: authentication/permissions, firewall logs, memory management, buffer overflow
- Secure Communication: RSA key generation, sender, receiver
- Database Security: SQL injection prevention, role-based access control
- Network Security: replay attack prevention
- Cloud Security: time-limited links, zero-trust client encryption, invisible watermarking
- IoT Security: packet sniffing, AES encryption
- Security Practices: HMAC verification, port scanning/banner checks

## Dependencies

The downloaded scripts use the dependencies required by their original examples:

```bash
pip install cryptography
pip install pycryptodome
pip install scapy
```

Most other examples use only the Python standard library. Install only the dependency required by the practical you want to run.

## Important notes

- The script logic, identifiers, statements, and printed messages are retained from the PDF; indentation was normalized where needed so the Python files parse.
- These are educational demonstrations, not production-ready security systems. Some examples use hard-coded demo credentials or keys and simplified cryptographic concepts.
- The RSA sender/receiver example imports generated keys from `generate_keys.py`; because that module generates fresh in-memory keys when imported in a new process, running the scripts as separate processes does not provide persistent matching keys without additional key-persistence work. The original example has been retained as requested.
- Packet sniffing is intended only for networks and devices you own or are explicitly authorized to inspect. On Windows, Scapy may require Npcap and elevated permissions.
- The port-scanning example should only be run against systems you own or have explicit permission to test.

## Build locally

```bash
python -m pip install --upgrade build
python -m build
```
