semvec/pypi-packages huggingface dataset:
async-dnsbl-client 0.0.5
Asynchronous dnsbl client module and CLI utility
License: MIT
Requires Python: >=3

# async-dnsbl-client
Asynchronous dnsbl client

## Install
~~~
pip3 install async-dnsbl-client
~~~
or
~~~
pip3 install git+https://github.com/yaroslaff/async-dnsbl-client
~~~

## CLI usage:
~~~
$ adnsbl.py 117.207.230.178 
dnsbl.sorbs.net
dul.dnsbl.sorbs.net
spam.dnsbl.sorbs.net
zen.spamhaus.org
noptr.spamrats.com
b.barracudacentral.org
web.dnsbl.sorbs.net
pbl.spamhaus.org

# or with hostname
$ bin/adnsbl.py gmail-smtp-in.l.google.com
~~~

you may remove some DNSBL from checklist with `-r`/`--remove`: `-r dnsbl.sorbs.net dul.dnsbl.sorbs.net`, or add new
DNSBL zones same way with `-a`/`--append`.

`adnsbl.py` exit code is 0 if host isn't blacklisted anywhere, and 1 otherwise.

## Usage in your python code
See adnsbl.py sources, it's simple.
~~~python
import asyncio
import async_dnsbl_client

result = asyncio.run(async_dnsbl_client.dnsbl('gmail-smtp-in.l.google.com'))

~~~

## Why not adns?
There is already python3 adns support in [python3-adns](https://github.com/trolldbois/python3-adns) package. But it crashes on ARM machines (such as Raspberri Pi (arch: armv7l) and Oracle Ampere A1 (arch: aarch64)). (maybe you know why?)

~~~python3
>>> import adns
>>> adns.init()
Segmentation fault (core dumped)
~~~

on 'normal' amd64 it works fine, 

async-dnsbl-client works fine on ARM machines (), checking host in 53 blacklists in 0.127s (fastest).

## See also

This project uses [aiodns package](https://github.com/saghul/aiodns) 

[pydnsbl](https://github.com/dmippolitov/pydnsbl) - more mature package, looks more powerful, same fast. (But I need my project because sometimes simpler is better)
directory-browser-mcp 0.1.5
A secure MCP server for browsing directories and files with access control
License: MIT
Requires Python: >=3.10
Keywords: mcp, directory, browser, file, server, model-context-protocol

# Directory Browser MCP Server

一个用于浏览目录和文件的MCP (Model Context Protocol) 服务器。

## 功能特性

- 📁 **目录浏览** - 列出指定目录的内容
- 📄 **文件信息** - 获取文件/目录的详细信息
- 🔍 **权限检查** - 检查路径的访问权限
- 🛡️ **安全控制** - 基于白名单的目录访问控制

## 安装

```bash
cd directory_browser_mcp
pip install -e .
```

## 配置

编辑 `config.json` 文件来配置允许访问的目录：

```json
{
  "allowed_directories": [
    "/Users/用户名/Documents",
    "/Users/用户名/Desktop",
    "/项目根目录"
  ],
  "show_hidden_files": false,
  "max_entries": 1000
}
```

## 使用方法

### 作为MCP服务器运行

```bash
python -m directory_browser_mcp
```

### 可用工具

1. **list_directory** - 列出目录内容
   - `path`: 目录路径
   - `show_hidden`: 是否显示隐藏文件 (可选)

2. **get_file_info** - 获取文件详细信息
   - `path`: 文件或目录路径

3. **check_path_access** - 检查路径访问权限
   - `path`: 要检查的路径

## 安全特性

- ✅ 白名单目录访问控制
- ✅ 路径穿越攻击防护
- ✅ 文件系统权限检查
- ✅ 安全错误处理

## 示例

```python
# 列出目录
{
  "tool": "list_directory",
  "arguments": {
    "path": "/Users/username/Documents",
    "show_hidden": false
  }
}

# 获取文件信息
{
  "tool": "get_file_info",
  "arguments": {
    "path": "/Users/username/Documents/file.txt"
  }
}

# 检查访问权限
{
  "tool": "check_path_access",
  "arguments": {
    "path": "/Users/username/Documents"
  }
}
```