Skip to main content

melek-shell 🛡️

Melek AI Asistan Projesi'nin 20x Gelişmiş, Sıfır-Güven (Zero-Trust) Güvenlik Kalkanlı ve Asenkron Gölge Terminal Köprüsü.

Bu kütüphane, Windows işletim sistemi üzerinde çalışan yapay zeka asistanlarının sistem komutlarını güvenli, arındırılmış ve oturum durumunu (dizin hafızası) koruyacak şekilde çalıştırmasını sağlar.


✨ 20x Güvenlik ve Mimari Özellikleri

  1. Oturum/Dizin Hafızası (Stateful CWD): cd komutunu özel olarak algılar, tırnaklı/boşluklu yolları yönetir ve sonraki komutların o dizinde çalışmasını garanti eder.
  2. Gelişmiş Güvenlik Duvarı & Base64 Payload Denetimi:
    • rmdir /s, del /f /s, format, diskpart, reg delete gibi tehlikeli CMD komutlarını engeller.
    • Remove-Item -Recurse -Force, Format-Volume gibi PowerShell yıkım komutlarını engeller.
    • Şifreli Kod Çözücü: powershell -enc <base64> şeklinde gizlenmiş zararlı komutları arka planda UTF-16LE çözüp içeriğindeki zararlı kodları yakalar ve engeller.
  3. Ortam Değişkeni Arındırma (Environment Sanitization):
    • Alt süreçlerin ortam değişkenlerinden gizli API anahtarlarını, PyPI tokenlarını veya kimlik bilgilerini okumasını önler (sanitize_env=True).
  4. Yetim Süreç ve Ağaç Temizleyici (Process Tree Killer):
    • Zaman aşımına uğrayan komutların arkasında kalan tüm çocuk/torun süreçleri (psutil ile) 2 saniyelik grace süresinin ardından zorla temizler.
  5. Çift Kanallı Canlı Akış (Streaming): stdout ve stderr çıktılarını birbirine karıştırmadan gerçek zamanlı olarak stream callback fonksiyonuna iletir.
  6. Denetim Kayıtları (Audit Logging): Çalıştırılan veya engellenen tüm komutları, çalışma sürelerini ve durumlarını hafızada denetim amacıyla saklar (get_audit_log()).
  7. Akıllı Takma Adlar (Alias): Sık kullanılan komutlar için kısayol tanımları sağlar.

🚀 Kurulum

pip install melek-shell

💻 Kullanım Örnekleri

from melek_shell import MelekShellController

# Güvenlik kalkanı ve ortam arındırması aktif başlat
shell = MelekShellController(default_timeout=20, sanitize_env=True)

# 1. Normal Komut Çalıştırma
result = shell.execute_command("echo Melek AI Çekirdek Hazır")
print(result["stdout"])

# 2. Dizin Değiştirme Hafızası
shell.execute_command('cd "C:\\Windows"')
res = shell.execute_command("dir")
print("C:\\Windows altındaki dosya satır sayısı:", len(res["stdout"]))

# 3. Güvenlik Duvarı Engellemesi
res_blocked = shell.execute_command("format d:")
print("Engellendi mi?:", not res_blocked["success"])
print("Hata:", res_blocked["stderr"])

# 4. Denetim Günlüğü
print("Son loglar:", shell.get_audit_log(limit=3))

Metadata

Release files for melek-shell 1.0.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 melek-shell 1.0.0
File Size Uploaded Provenance Actions
melek_shell-1.0.0.tar.gz 12.4 kB Without provenance Details for melek_shell-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for melek-shell 1.0.0
File Interpreter ABI Platform Actions
melek_shell-1.0.0-py3-none-any.whl Python 3 none any Details for melek_shell-1.0.0-py3-none-any.whl

Total release size: 21.4 kB

Release files / melek_shell-1.0.0.tar.gz

Download URL melek_shell-1.0.0.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3707f610e505ba6e9f3394a4d1a2e75c4cb83e063932df24b8ac1c2df888f2b3
BLAKE2b-256 checksum
How to use checksums
07236593dad5eafa3b1b175caa30f2110fb83491213383790b7b248545768eb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Release files / melek_shell-1.0.0-py3-none-any.whl

Download URL melek_shell-1.0.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f80bdc79445515fa5d8ebb68eabe1c6aa53288a6eeab10887eb96dc9122d704
BLAKE2b-256 checksum
How to use checksums
090462881d82f87f1ebc10ae002df749d2d596b5687f5258fe011751f7f87563
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Security for melek-shell 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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