semvec/pypi-packages huggingface dataset:
pentesttools 0.1.10
Pentest-Tools.com Vulnerability Scanners Library
Requires Python: >=3.10

Command-Line Interface and Python bindings for https://Pentest-Tools.com.

# Installing
PentestTools Python module is delivered through PyPI, so it can be installed directly via pip:
```bash
pip install pentesttools
```

# Usage
The `pentesttools` package provides a command line interface through the `ptt` utility. Right
now it supports the Website Scanner service.

Example for the simplest scan:
```bash
ptt run website_scanner <url>
```
This runs a freemium Website Scanner scan on the `<url>`. Unlike in the platform itself, you can omit the schema part from the url.

Global arguments, like a suitable key for a deep scan, have to be passed straight to `ptt`. Tool arguments have to be passed to the tool.

```bash
ptt --key <key> run website_scanner --scan_type deep <url>
```

If you want the command to fail if the report contains vulnerabilities with a higher risk than some value, you can use the `--fail argument`.

```bash
ptt --fail high run website_scanner <url>
```

You can also run `ptt` using docker. The docker image has `ptt` as an entrypoint, so you don't have to type it anymore. Note that the old `ptt-scan` name is still used on docker.

```bash
docker run pentesttoolscom/ptt-scan:latest run website_scanner <url>
```

# Development installation
If you want to easily modify the sources and your modifications:
```bash
pip install --edit .
```

# Uninstalling

```bash
pip uninstall pentesttools
```

# Testing and Coverage
You can run the tests and make coverage reports like this:
```bash
python3 -m pytest src/tests
```

```bash
coverage run -m pytest src/tests
coverage report -m
```

# MCP
There is an optional MCP server provided in this package.
## Installation:
```bash
pip install "pentesttools[mcp]"
```

## Usage
There is a hosted endpoint at `https://mcp.pentest-tools.com:9001/mcp`.

Example config:
```
"ptt-mcp-http": {
  "type": "http",
  "url": "https://mcp.pentest-tools.com:9001/mcp/",
  "headers": {
    "PTT_API_KEY": "<ptt-api-key>"
  }
}
```

You can also self-host the MCP server. This command will open an MCP server locally on port 9000.
```bash
ptt --key <ptt-api-key> mcp --mcp_method stdio
```
Connect with your favorite LLM client.
```bash
"ptt-mcp-remote": {
  "type": "stdio",
  "command": "ptt",
  "args": ["mcp", "--mcp_method", "stdio"],
  "env": {
    "PTT_API_KEY": "<ptt-api-key>"
  }
}
```

The MCP server also supports the HTTP method, which is also the default.

```bash
ptt mcp
```

In this case, you have to pass the API key as a header, called `PTT_API_KEY`.

Example config:
```
"ptt-mcp-http": {
  "type": "http",
  "url": "http://localhost:9000/mcp",
  "headers": {
    "PTT_API_KEY": "<ptt-api-key>"
  }
}
```
znum 0.6.0
Z-number data type for fuzzy arithmetic and multi-criteria decision making (TOPSIS, VIKOR, PROMETHEE)
Requires Python: >=3.10
Keywords: fuzzy-arithmetic, fuzzy-number, mcdm, multi-criteria-decision-making, optimization, promethee, topsis, vikor, z-number

# Znum

A Python library for Z-number arithmetic and multi-criteria decision making (MCDM).

A Z-number is a fuzzy number with two components:
- **A**: The main fuzzy set values (restriction on values)
- **B**: The confidence/belief values (reliability of A)

Znum supports full mathematical operations (addition, subtraction, multiplication, division, power), comparison operators, and includes implementations of TOPSIS, VIKOR, and PROMETHEE optimization methods.

## Installation

```bash
pip install znum
```

## Quick Start

```python
from znum import Znum

# Create Z-numbers
z1 = Znum([1, 2, 3, 4], [0.1, 0.2, 0.3, 0.4])
z2 = Znum([2, 4, 8, 10], [0.5, 0.6, 0.7, 0.8])

# Arithmetic operations
z3 = z1 + z2
z4 = z1 * z2
z5 = z1 - z2
z6 = z1 / z2

# Comparison
print(z1 > z2)  # False
print(z1 < z2)  # True

# Power
z7 = z1 ** 2
```

## MCDM Methods

### TOPSIS

```python
from znum import Znum, Topsis, Beast

# Create weights, alternatives, and criteria types
weights = [Znum([0.2, 0.3, 0.4, 0.5], [0.1, 0.2, 0.3, 0.4])]
alternatives = [[Znum([7, 8, 9, 10], [0.6, 0.7, 0.8, 0.9])]]
criteria_types = [Beast.CriteriaType.BENEFIT]

table = [weights, *alternatives, criteria_types]
topsis = Topsis(table)
result = topsis.solve()

# Access results
best_idx = topsis.index_of_best_alternative
worst_idx = topsis.index_of_worst_alternative
ranking = topsis.ordered_indices
```

### PROMETHEE

```python
from znum import Znum, Promethee, Beast

table = [weights, *alternatives, criteria_types]
promethee = Promethee(table)
sorted_alternatives = promethee.solve()

# Access results
best_idx = promethee.index_of_best_alternative
worst_idx = promethee.index_of_worst_alternative
ranking = promethee.ordered_indices
```

## Development

```bash
# Install dependencies
pip install -e ".[dev]"

# Run tests
pytest
```

## License

MIT