Template Errors: PAGE_CONTAINER

  1. Accessed unknown getter 'hasUnreadUpdates' on XF:User[0] in /var/www/html/src/XF/Mvc/Entity/Entity.php, line 1821
        1820: 		if (XenForo_Application::debugMode()) {
    >>> 1821: 			trigger_error("Accessed unknown getter '$originalKey' on " . $this->__toString(), E_USER_WARNING);
        1822: 		}
    


    🔍 Stack Trace:
    #0 trigger_error() called at [Entity.php:1821]
    
    📄 Show code context (±10 lines)
        1811: 
        1812: 		if (isset($structure->columns[$key]) || isset($structure->relations[$key])) {
        1813: 			return true;
        1814: 		}
        1815: 
        1816: 		if (!empty($structure->columnAliases[$key])) {
        1817: 			return true;
        1818: 		}
        1819: 
        1820: 		if (XenForo_Application::debugMode()) {
    >>> 1821: 			trigger_error("Accessed unknown getter '$originalKey' on " . $this->__toString(), E_USER_WARNING);
        1822: 		}
        1823: 
        1824: 		XenForo_Error::logException(
        1825: 			new InvalidArgumentException("Accessed unknown getter '$originalKey' on " . $this->__toString()),
        1826: 			false
        1827: 		);
        1828: 
        1829: 		return false;
        1830: 	}
        1831: 
    
    #1 XF\Mvc\Entity\Entity->__isset() called at [Entity.php:1834]
    📄 Show code context (±10 lines)
        1824: 		XenForo_Error::logException(
        1825: 			new InvalidArgumentException("Accessed unknown getter '$originalKey' on " . $this->__toString()),
        1826: 			false
        1827: 		);
        1828: 
        1829: 		return false;
        1830: 	}
        1831: 
        1832: 	public function offsetExists($key): bool
        1833: 	{
    >>> 1834: 		return $this->__isset($key);
        1835: 	}
        1836: 
        1837: 	public function offsetUnset($key): void
        1838: 	{
        1839: 		throw new LogicException('Entity offsets may not be unset');
        1840: 	}
        1841: 
        1842: 	public function isValidColumn($key)
        1843: 	{
        1844: 		return isset($this->_structure->columns[$key]);
    
    #2 XF\Mvc\Entity\Entity->offsetExists() called at [S.49,L.1,PAGE_CONTAINER.php:1013]
    📄 Show code context (±10 lines)
        1003:   </a>
        1004:   <a class="burger__link" href="' . XenForo_Template_Helper_Core::link('help/faq', false, array()) . '">
        1005:     <div class="burger__link-cont">
        1006:       <img class="burger__icon" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguOTkxNjIgMTIuMTYzNVY4LjQ4MDk2IiBzdHJva2U9IiM0RjRGNEYiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTguOTkxNiA1LjgzNzA4SDguOTk5OTMiIHN0cm9rZT0iIzRGNEY0RiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyLjYxMjIgMS4yOTE5OUg1LjM4ODA3QzIuODcwNTcgMS4yOTE5OSAxLjI5MjI0IDMuMDc0NDkgMS4yOTIyNCA1LjU5Njk5VjEyLjQwMzdDMS4yOTIyNCAxNC45MjYyIDIuODYzMDcgMTYuNzA4NyA1LjM4ODA3IDE2LjcwODdIMTIuNjExNEMxNS4xMzcyIDE2LjcwODcgMTYuNzA4OSAxNC45MjYyIDE2LjcwODkgMTIuNDAzN1Y1LjU5Njk5QzE2LjcwODkgMy4wNzQ0OSAxNS4xMzcyIDEuMjkxOTkgMTIuNjEyMiAxLjI5MTk5WiIgc3Ryb2tlPSIjNEY0RjRGIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=" alt="FAQ">
        1007:       <span class="burger__link-text">FAQ</span>
        1008:     </div>
        1009:   </a>
        1010:   <a class="burger__link" href="' . XenForo_Template_Helper_Core::link('full:new-features/unread', false, array()) . '">
        1011:     <div class="burger__link-cont">
        1012:       <img class="burger__icon" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04Ljk5OTg0IDEuMjkxOTlDMTMuMjU3MyAxLjI5MTk5IDE2LjcwODIgNC43NDM2NiAxNi43MDgyIDkuMDAwMzNDMTYuNzA4MiAxMy4yNTcgMTMuMjU3MyAxNi43MDg3IDguOTk5ODQgMTYuNzA4N0M0Ljc0MzE3IDE2LjcwODcgMS4yOTE1IDEzLjI1NyAxLjI5MTUgOS4wMDAzM0MxLjI5MTUgNC43NDM2NiA0Ljc0MzE3IDEuMjkxOTkgOC45OTk4NCAxLjI5MTk5WiIgc3Ryb2tlPSIjNEY0RjRGIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik04Ljk5NTc3IDUuODM2OTFWOS41MTk0MSIgc3Ryb2tlPSIjNEY0RjRGIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik04Ljk5NTc1IDEyLjE2MzdIOS4wMDQwOSIgc3Ryb2tlPSIjNEY0RjRGIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=" alt="' . 'New features' . '">
    >>> 1013:       <span class="burger__link-text"  style="display: ruby">' . 'New features' . ' ' . (((XenForo_Template_Helper_Core::deenumify($visitor['hasUnreadUpdates'] ?? null))) ? ('
        1014: 																<span class="hasUnreadArticles">
        1015: 																</span>
        1016: 																') : ('')) . '</span>
        1017:     </div>
        1018:   </a>
        1019:   <a class="burger__link" href="' . XenForo_Template_Helper_Core::link('misc/ads', false, array()) . '">
        1020:     <div class="burger__link-cont">
        1021:       <img class="burger__icon" src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOCAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi45MzY5IDcuMTI3MjdDMTYuNDA0MyAzLjg0OTQ0IDEzLjYyMDEgMS40MTA5IDEwLjMwMDcgMS4zMTQ5MUMxMC4xNDI5IDEuMzA4NzIgOS45ODkwOCAxLjM2NTU1IDkuODczMTggMS40NzI4NkM5Ljc1NzI4IDEuNTgwMTcgOS42ODg4MSAxLjcyOTE2IDkuNjgyODYgMS44ODY5OVYxLjg4Njk5VjEuOTQwMzlMMTAuMDU2NiA3LjUzMTU0QzEwLjA4MTEgNy45MDc5MiAxMC40MDQ3IDguMTk0MDIgMTAuNzgxMyA4LjE3MjI3TDE2LjM4NzcgNy43OTg1MUMxNi41NDU2IDcuNzg2ODMgMTYuNjkyNCA3LjcxMjYzIDE2Ljc5NTUgNy41OTIzNkMxNi44OTg2IDcuNDcyMDkgMTYuOTQ5NSA3LjMxNTY4IDE2LjkzNjkgNy4xNTc3OFY3LjEyNzI3WiIgc3Ryb2tlPSIjNEY0RjRGIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik02LjQxODA5IDQuNjQwOEM2Ljc3NDcyIDQuNTU4MzEgNy4xMzk2NyA0Ljc0MDc5IDcuMjg3NjUgNS4wNzU1OUM3LjMyNjQyIDUuMTU0MzMgNy4zNDk3MiA1LjIzOTc4IDcuMzU2MyA1LjMyNzNDNy40MzI1OCA2LjQxMDQ0IDcuNTkyNzYgOC43ODI2OCA3LjY4NDMgMTAuMDY0MUM3LjY5OTkyIDEwLjI5NSA3LjgwNjkgMTAuNTEwMSA3Ljk4MTU1IDEwLjY2MThDOC4xNTYyIDEwLjgxMzYgOC4zODQxMyAxMC44ODk1IDguNjE0ODggMTAuODcyN1YxMC44NzI3TDEzLjMyMTIgMTAuNTgyOEMxMy41MzEzIDEwLjU3MDIgMTMuNzM3MyAxMC42NDUgMTMuODkwNCAxMC43ODk0QzE0LjA0MzUgMTAuOTMzOCAxNC4xMzAxIDExLjEzNTEgMTQuMTI5OCAxMS4zNDU2VjExLjM0NTZDMTMuOTM5IDE0LjE4NzYgMTEuODk3MiAxNi41NjM0IDkuMTE2MTcgMTcuMTc5M0M2LjMzNTE3IDE3Ljc5NTEgMy40ODExNSAxNi41MDM1IDIuMTA4NCAxNC4wMDc3QzEuNjk4NjEgMTMuMjg5NCAxLjQzOTEgMTIuNDk1MyAxLjM0NTYyIDExLjY3MzZDMS4zMDU2NiAxMS40MjE0IDEuMjkwMzQgMTEuMTY2IDEuMjk5ODYgMTAuOTEwOEMxLjMwNzk1IDcuODc1ODMgMy40Mzk0NSA1LjI2MDc3IDYuNDEwNDYgNC42NDA4IiBzdHJva2U9IiM0RjRGNEYiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==" alt="' . 'Ad' . '">
        1022:       <span class="burger__link-text">' . 'Ad' . '</span>
        1023:     </div>
    

Загрузка...

S as asd asd

Thread in Web development created by grisha2217 Jun 12, 2022. (bumped Jun 13, 2022) 88 views

  1. grisha2217
    grisha2217 Topic starter Jun 12, 2022 guest пезда 7 Aug 26, 2021
     
  2. verdadee
  3. негр
    Честная система рандома определила победителя этого розыгрыша. Им становится avatarverdadee avatarKeller
     
  4. ALEGOR
    ALEGOR Jul 31, 2023 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
    ываываыв
     
  5. ALEGOR
    ALEGOR Aug 20, 2023 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
  6. testsetest
    testsetest Nov 18, 2023 Покупайте у меня, при покупке от 5 руб делаю ... 1 Sep 25, 2022
    Zend_Debug::dump($taggedThreads);
     
  7. ALEGOR
    ALEGOR Jul 23, 2024 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
    [CENSOR] sdfsdfsdfsd[/CENSOR]
     
  8. ALEGOR
    ALEGOR Jul 23, 2024 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
  9. ALEGOR
    ALEGOR Sep 12, 2024 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
    1

    Python
    from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import types
     
  10. ALEGOR
    ALEGOR Sep 12, 2024 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
    1

    Python
    from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import typesfrom aiogram.types import InlineKeyboardMar
     
  11. ALEGOR
    ALEGOR Sep 12, 2024 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
    1

    Python
    from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import types

    from onlinesimru import GetUser
    from data import User
    from utils import config, logger, Numbers, Country, misc

    from smsactivate.api import SMSActivateAPI

    buy_text = """
    <b> Cервис:</b> {service}
    <b> Cтрана:</b> {country}
    <b> Номер:</b> <code>{number}</code>
    <i>⏱Ожидайте код...</i>
    """

    more_code_text = """
    <b> Cервис:</b> {service} | {country}

    <b> Номер:</b> <code>{number}</code>
    <b> Повторный код:</b> <code>{code}</code>
    """

    good_code_text = """
    <b> Cервис:</b> {service} | {country}

    <b> Номер:</b> <code>{number}</code>
    <b> Cмс код:</b> <code>{code}</code>
    """



    class SimSMS():
    proxy_url = 'http://vladit537_gmail_com:[email protected]:30001'


    def __init__(self):
    self.errors = ['BAD_ACTION', 'BAD_KEY', 'ERROR_SQL',
    'NO_BALANCE', 'WRONG_SERVICE', 'NO_ACTIVATION']
    self.sa = SMSActivateAPI(api_key=config.config("api_smsactivate"))
    self.url = 'https://simsms.org/stubs/handler_api.php'
    self.api = config.config("api_simsms")
    self.api = config.config("api_smsactivate")

    async def buy_simsms(self, bot, user_id, service, country, operator, price):

    services = await SimSMS().buy_service(country, service, operator)
    print("SIMSMS", services)
    if services.split(":")[0] == 'ACCESS_NUMBER':
    operation_id, number = services.split(":")[1], services.split(":")[2]
    text = buy_text.format(service=Numbers().service_name(service),
    country=Country().get_country_name(country), number=number)
    print('s2', operation_id, number)


    stst = await SimSMS().set_status(operation_id, 1)
    print('sim3', stst)
    markup = InlineKeyboardMarkup().row(InlineKeyboardButton('Отменить номер', callback_data=f'cancel_number:{user_id}:{price}:{operation_id}:S2'))


    await bot.send_message(chat_id=user_id, text=text, reply_markup=markup)
    print("ASS")
    await User(user_id).update_balance(-float(price))
    await self.write_sms_list(user_id, operation_id, number, service, country, price, 'SMSActivate')
    code = 'ACCESS'
    else:
    print(467, services)
    if services.split(":")[0] == 'NO_NUMBERS':
    code = 'NO_NUMBERS'
    elif services == 'ERRORS:NO_NUMBERS':
    code = 'NO_NUMBERS'
    elif services.split(":")[0] == 'WHATSAPP_NOT_AVAILABLE':
    code = "NO_WHATSAPP"
    elif services.split(":")[0] == 'NO_YULA_MAIL':
    code = 'MAIL_RULE'
    else:
    await bot.send_message(chat_id=1056861593, text=f'[{user_id}] ACTIVATE ERROR: {services}')
    code = 'ERRORS'

    return code
     
  12. ALEGOR
    ALEGOR Sep 12, 2024 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
    1

    Python
    from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import types

    from onlinesimru import GetUser
    from data import User
    from utils import config, logger, Numbers, Country, misc

    from smsactivate.api import SMSActivateAPI

    buy_text = """
    <b> Cервис:</b> {service}
    <b> Cтрана:</b> {country}
    <b> Номер:</b> <code>{number}</code>
    <i>⏱Ожидайте код...</i>
    """

    more_code_text = """
    <b> Cервис:</b> {service} | {country}

    <b> Номер:</b> <code>{number}</code>
    <b> Повторный код:</b> <code>{code}</code>
    """

    good_code_text = """
    <b> Cервис:</b> {service} | {country}

    <b> Номер:</b> <code>{number}</code>
    <b> Cмс код:</b> <code>{code}</code>
    """



    class SimSMS():
    proxy_url = 'http://vladit537_gmail_com:[email protected]:30001'


    def __init__(self):
    self.errors = ['BAD_ACTION', 'BAD_KEY', 'ERROR_SQL',
    'NO_BALANCE', 'WRONG_SERVICE', 'NO_ACTIVATION']
    self.sa = SMSActivateAPI(api_key=config.config("api_smsactivate"))
    self.url = 'https://simsms.org/stubs/handler_api.php'
    self.api = config.config("api_simsms")
    self.api = config.config("api_smsactivate")


    async def get_price(self, country, service):
    try:
    price = self.sa.getPrices(service=service, country=country)[f"{country}"][f"{service}"]["cost"]
    # async with aiohttp.ClientSession() as session:
    # async with session.post()
    except:
    price = 0

    return price


    # async def get_price(self, country, service):
    # try:
    # data = {
    # 'api_key': self.api,
    # 'action': 'get_service_price',
    # 'service': service,
    # 'country': country,
    # }
    # async with aiohttp.ClientSession() as session:
    # async with session.post(url=self.url, data=data, proxy=SimSMS.proxy_url) as response:
    # print(f'[def get_price]response status: {response.status}')
    # if response.status == 200:
    # info = await response.text()
    # print(f'[def get_price] info: {info}')
    # info = json.loads(info).get(f'{country}')
    # price = info[f'{service}']['cost']
    # else:
    # logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')
    # print(f'58 ERROR SMS ACTIVATE: STATUS {response.status}')
    # price = 0
    # except Exception as _ex:
    # print(f'_ex: {_ex}')
    # price = 0
    #
    # print(f'[utils/activate]64 price: {price}')
    #
    # return price


    async def get_balance(self):
    data = {
    "api_key": self.api,
    "action": "getBalance",
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data, proxy=SimSMS.proxy_url) as response:
    if response.status == 200:
    info = await response.text()
    if info not in self.errors:
    balance = str(info).split(":")[1]
    else:
    logger.error(f'ERRORS: {info}')
    balance = 0
    else:
    logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')
    balance = 0

    return balance

    async def get_numbers_quantity(self, country: int, service: str, operator: str):
    data = {
    'api_key': self.api,
    'action': 'getNumbersStatus',
    'country': country,
    'operator': operator
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data, proxy=SimSMS.proxy_url) as response:
    if response.status == 200:
    info = await response.text()
    if info not in self.errors:
    data = json.loads(info)
    count = data.get(f'{service}_0')
    else:
    logger.error(f'ERRORS: {info}')
    count = 0
    else:
    logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')
    count = 0

    return count

    async def buy_service(self, country: int, service: str, operator: str):
    data = {
    'api_key': self.api,
    'action': 'getNumber',
    'service': service,
    'operator': operator,
    'country': country,
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    if response.status == 200 or response.status == 502:
    info = await response.text()
    if info not in self.errors:
    if 'NO_NUMBERS' not in info:
    service = info
    else:
    service = f'ERRORS:{info}'
    else:
    service = f'ERRORS:{info}'
    else:
    logger.error(f'ERROR SMS ACTIVATE: STATUS: {response.status}')
    service = f'ERRORS:NO_NUMBERS'


    return service

    async def set_status(self, operation_id: str, status: int):
    data = {
    'api_key': self.api,
    'action': 'setStatus',
    'status': status,
    'id': operation_id
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    info_status = await response.text()


    return info_status

    async def get_status(self, operation_id: str):
    data = {
    'api_key': self.api,
    'action': 'getStatus',
    'id': operation_id
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    if response.status == 200:
    info = await response.text()
    if info not in self.errors:
    status = info
    else:
    logger.error(f'ERROR: {info}')
    status = 'ERRORS'
    else:
    status = 'ERRORS'

    return status

    async def get_fullsms(self, operation_id):
    data = {
    'api_key': self.api,
    'action': 'getFullSms',
    'id': operation_id
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    if response.status == 200:
    status = await response.text()
    if status not in self.errors:
    if 'FULL_SMS:' in status:
    full_sms = status.split(":")[1]
    else:
    full_sms = 'WAIT_OR_CANCEL'
    else:
    full_sms = 'ERRORS'
    else:
    full_sms = 'ERRORS'
    logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')

    return full_sms
     
  13. ALEGOR
    ALEGOR Sep 12, 2024 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
    1

    Python
    from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import types

    from onlinesimru import GetUser
    from data import User
    from utils import config, logger, Numbers, Country, misc

    from smsactivate.api import SMSActivateAPI

    buy_text = """
    <b> Cервис:</b> {service}
    <b> Cтрана:</b> {country}
    <b> Номер:</b> <code>{number}</code>
    <i>⏱Ожидайте код...</i>
    """

    more_code_text = """
    <b> Cервис:</b> {service} | {country}

    <b> Номер:</b> <code>{number}</code>
    <b> Повторный код:</b> <code>{code}</code>
    """

    good_code_text = """
    <b> Cервис:</b> {service} | {country}

    <b> Номер:</b> <code>{number}</code>
    <b> Cмс код:</b> <code>{code}</code>
    """


    class OnlineSimRu():
    def __init__(self):
    self.api = config.config("api_onlinesimru")
    self.countries = misc.countries_sim
    self.services = misc.services
    self.countries_new = misc.countries_sim_new
    self.services_new = misc.services_new
    self.url = f'http://api-conserver.onlinesim.ru/stubs/handler_api.php?api_key={self.api}&action='

    async def get_balance(self):
    client = GetUser(self.api)
    try:
    balance = client.balance()
    balance = balance['balance']
    except:
    logger.error(f'ERRORS:')
    balance = 0

    return balance

    async def get_price(self, country: int, service: str):
    try:
    service_new = self.services_new[service]
    service = self.services[service]
    country_new = self.countries_new[country]
    country = self.countries[country]

    url = f'https://onlinesim.ru/api/getNumbersStats.php?apikey={self.api}&country={country}&service={service}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info = await response.text()
    resp = json.loads(info)
    price = resp['services'][f'service_{service}']['price']
    else:
    logger.error(f'ERROR OnlineSimRu: STATUS {response.status}')
    price = 0
    except:
    price = 0

    return price

    async def get_numbers_quantity(self, country, service, operator):
    try:
    service_new = self.services_new[service]
    service = self.services[service]
    country_new = self.countries_new[country]
    country = self.countries[country]

    url = f'https://onlinesim.ru/api/getNumbersStats.php?apikey={self.api}&country={country}&service={service}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info = await response.text()
    resp = json.loads(info)
    count = resp['services'][f'service_{service}']['count']
    else:
    logger.error(f'ERROR OnlineSimRu: STATUS {response.status}')
    count = 0
    except:
    count = 0

    return count

    async def buy_service(self, country: int, service: str, operator: str):
    try:
    service = self.services_new[service]
    country = self.countries_new[country]
    except:
    service = {'response' : "NO_THIS_COUNTRY"}
    return service
    errors = ['NO_BALANCE', 'WRONG_SERVICE']
    action = 'getNumber'
    url = self.url + action + f'&service={service}&country={country}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200 or response.status == 502:
    info = await response.text()
    if info not in errors:
    if 'NO_NUMBERS' not in info:
    service = info
    else:
    service = f'ERRORS:{info}'
    else:
    logger.error(f'ERROR OnlineSimRu: STATUS {response.status}')
    service = f'ERRORS:NO_NUMBERS'

    return service

    async def retry_num(self, operation_id: str):
    url = f'https://onlinesim.ru/api/setOperationRevise.php?apikey={self.api}&tzid={operation_id}'

    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info_status = await response.text()
    info = json.loads(info_status)
    tzid = info['tzid']
    else:
    tzid = 'ERRORS'

    return tzid

    async def get_status(self, operation_id: str):
    action = 'getStatus'
    url = self.url + action + f'&id={operation_id}'
    errors = ['BAD_STATUS']
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    status = await response.text()
    if response.status == 200:
    status = await response.text()
    else:
    logger.error(f'ERROR OnlineSimRu GET ACT STATE: STATUS {response.status} | {status}')
    status = 'ERRORS'

    return status

    async def set_status(self, operation_id: str, status: int):
    action = 'setStatus'
    url = self.url + action + f'&status={status}&id={operation_id}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info_status = await response.text()
    else:
    info_status = 'ERRORS'

    return info_status

    class SMSService():
    def __init__(self, obj=None):
    self.sql_path = './data/database.db'
    if obj != None:
    self.wait = iter(obj)

    def __aiter__(self):
    return self

    async def connect(self):
    async with aiosqlite.connect(self.sql_path) as db:
    return db

    async def __anext__(self):
    try:
    value = next(self.wait)
    except StopIteration:
    raise StopAsyncIteration
    return value

    async def write_sms_list(self, user_id, operation_id, number, service, country, price, provider):
    async with aiosqlite.connect(self.sql_path) as db:
    sms = [user_id, operation_id, number, service, country, 'first', time.time(), price, provider]
    await db.execute('INSERT INTO wait_sms VALUES (?,?,?,?,?,?,?,?,?)', sms)
    await db.commit()

    async def del_wait_sms(self, operation_id: str):
    async with aiosqlite.connect(self.sql_path) as db:

    await db.execute(f'DELETE FROM wait_sms WHERE operation_id = "{operation_id}"')
    await db.commit()

    async def write_logs(self, user_id: int, operation_id: str, service: str, country: int, number: str, price: float, status: str):
    price_service = await SimSMS().get_price(country, service)
    async with aiosqlite.connect(self.sql_path) as db:
    sms = [user_id, operation_id, service, country, number, price, price_service, status, time.time()]

    await db.execute('INSERT INTO service_logs VALUES (?,?,?,?,?,?,?,?,?)', sms)
    await db.commit()

    async def get_info_sms(self, operation_id: int):
    async with aiosqlite.connect(self.sql_path) as db:

    select = await db.execute(f'SELECT * FROM wait_sms WHERE operation_id = "{operation_id}"')
    service = await select.fetchone()
    await select.close()

    return service

    async def update_wait_status(self, operation_id: str, status: str):
    async with aiosqlite.connect(self.sql_path) as db:

    await db.execute(f'UPDATE wait_sms SET status = "{status}" WHERE operation_id = "{operation_id}"')
    await db.commit()

    async def add_notify(self, user_id, service, country, operator):
    async with aiosqlite.connect(self.sql_path) as db:
    sql = 'INSERT INTO notify_numbers VALUES (?,?,?,?)'
    await db.execute(sql, (user_id, service, country, operator))
    await db.commit()


    async def buy_service(self, bot, user_id, service, country, operator):
    price = await Numbers().get_service_price(country, service)
    text_error = 'Извините, у нас небольшие неполадки.\nАдминистрация бота была оповещена о данном сбое.'
    text_no_number = 'Кажется закончились номера, попробуйте позже'

    if float(User(user_id).balance) >= float(price):
    print(service, country)
    price_hub = price_sim = await OnlineSimRu().get_price(country, service)
    price_activate = await SimSMS().get_price(country, service)
    print(price_hub, price_activate)

    if float(price_activate) >= float(price_hub) and price_activate != 0:
    code = await self.buy_simsms(bot, user_id, service, country, operator, price)
    print("SIMSMS 1 CODE", code)
    if code != 'ACCESS':
    code = await self.buy_simru(bot, user_id, service, country, operator, price)
    print("SIMSMS 2 CODE", code)
    if code != 'ACCESS':
    if code == 'NO_NUMBERS':
    markup = self.notify_markup(service, country, operator)
    await bot.send_message(chat_id=user_id, text=text_no_number, reply_markup=markup)
    elif code == 'NO_WHATSAPP':
    await bot.send_message(chat_id=user_id, text='Извините, данный сервис недоступен.')
    elif code == 'MAIL_RULE':
    await bot.send_message(chat_id=user_id, text='Извините, данный сервис недоступен.')
    elif code == 'ERRORS':
    await bot.send_message(chat_id=user_id, text=text_error)
    else:
    print('Fuck u')
    code = await self.buy_simsms(bot, user_id, service, country, operator, price)
    print("SIMSMS 2 CODE", code)
    if code != 'ACCESS':
    code = await self.buy_simru(bot, user_id, service, country, operator, price)
    print("SIMSMS 2 CODE", code)
    if code != 'ACCESS':
    if code == 'NO_NUMBERS':
    markup = self.notify_markup(service, country, operator)
    await bot.send_message(chat_id=user_id, text=text_no_number, reply_markup=markup)
    elif code == 'NO_WHATSAPP':
    await bot.send_message(chat_id=user_id, text='Извините, данный сервис недоступен.')
    elif code == 'MAIL_RULE':
    await bot.send_message(chat_id=user_id, text='Извините, данный сервис недоступен.')
    elif code == 'ERRORS':
    await bot.send_message(chat_id=user_id, text=text_error)
    else:
    await bot.send_message(chat_id=user_id, text='Пополните баланс!')

    async def buy_simru(self, bot, user_id, service, country, operator, price):
    services = await OnlineSimRu().buy_service(country, service, operator)
    print(services)
    try:
    if services.split(":")[0] == 'ACCESS_NUMBER':
    operation_id, number = services.split(":")[1], services.split(":")[2]
    text = buy_text.format(service=Numbers().service_name(service),
    country=Country().get_country_name(country), number=number)

    await OnlineSimRu().set_status(operation_id, 1)
    await User(user_id).update_balance(-float(price))
    markup = InlineKeyboardMarkup().row(InlineKeyboardButton('Отменить номер', callback_data=f'cancel_number:{user_id}:{price}:{operation_id}:SMSHub'))

    await bot.send_message(chat_id=user_id, text=text, reply_markup=markup)

    await self.write_sms_list(user_id, operation_id, number, service, country, price, 'SMSHub')
    code = 'ACCESS'
    else:
    try:
    if services.split(":")[1] == 'NO_NUMBERS':
    code = 'NO_NUMBERS'
    else:
    code = 'ERRORS'
    except:
    code = 'ERRORS'

    except:
    code = "ERRORS"

    return code

    async def buy_simsms(self, bot, user_id, service, country, operator, price):

    services = await SimSMS().buy_service(country, service, operator)
    print("SIMSMS", services)
    if services.split(":")[0] == 'ACCESS_NUMBER':
    operation_id, number = services.split(":")[1], services.split(":")[2]
    text = buy_text.format(service=Numbers().service_name(service),
    country=Country().get_country_name(country), number=number)
    print('s2', operation_id, number)


    stst = await SimSMS().set_status(operation_id, 1)
    print('sim3', stst)
    markup = InlineKeyboardMarkup().row(InlineKeyboardButton('Отменить номер', callback_data=f'cancel_number:{user_id}:{price}:{operation_id}:S2'))


    await bot.send_message(chat_id=user_id, text=text, reply_markup=markup)
    print("ASS")
    await User(user_id).update_balance(-float(price))
    await self.write_sms_list(user_id, operation_id, number, service, country, price, 'SMSActivate')
    code = 'ACCESS'
    else:
    print(467, services)
    if services.split(":")[0] == 'NO_NUMBERS':
    code = 'NO_NUMBERS'
    elif services == 'ERRORS:NO_NUMBERS':
    code = 'NO_NUMBERS'
    elif services.split(":")[0] == 'WHATSAPP_NOT_AVAILABLE':
    code = "NO_WHATSAPP"
    elif services.split(":")[0] == 'NO_YULA_MAIL':
    code = 'MAIL_RULE'
    else:
    await bot.send_message(chat_id=1056861593, text=f'[{user_id}] ACTIVATE ERROR: {services}')
    code = 'ERRORS'

    return code
     
  14. ALEGOR
    ALEGOR Sep 12, 2024 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
    1

    Python
    from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import types

    from onlinesimru import GetUser
    from data import User
    from utils import config, logger, Numbers, Country, misc

    from smsactivate.api import SMSActivateAPI

    class SMSService():
    def __init__(self, obj=None):
    self.sql_path = './data/database.db'
    if obj != None:
    self.wait = iter(obj)

    async def buy_simru(self, bot, user_id, service, country, operator, price):
    services = await OnlineSimRu().buy_service(country, service, operator)
    print(services)
    try:
    if services.split(":")[0] == 'ACCESS_NUMBER':
    operation_id, number = services.split(":")[1], services.split(":")[2]
    text = buy_text.format(service=Numbers().service_name(service),
    country=Country().get_country_name(country), number=number)

    await OnlineSimRu().set_status(operation_id, 1)
    await User(user_id).update_balance(-float(price))
    markup = InlineKeyboardMarkup().row(InlineKeyboardButton('Отменить номер', callback_data=f'cancel_number:{user_id}:{price}:{operation_id}:SMSHub'))

    await bot.send_message(chat_id=user_id, text=text, reply_markup=markup)

    await self.write_sms_list(user_id, operation_id, number, service, country, price, 'SMSHub')
    code = 'ACCESS'
    else:
    try:
    if services.split(":")[1] == 'NO_NUMBERS':
    code = 'NO_NUMBERS'
    else:
    code = 'ERRORS'
    except:
    code = 'ERRORS'

    except:
    code = "ERRORS"

    return code

    async def buy_simsms(self, bot, user_id, service, country, operator, price):

    services = await SimSMS().buy_service(country, service, operator)
    print("SIMSMS", services)
    if services.split(":")[0] == 'ACCESS_NUMBER':
    operation_id, number = services.split(":")[1], services.split(":")[2]
    text = buy_text.format(service=Numbers().service_name(service),
    country=Country().get_country_name(country), number=number)
    print('s2', operation_id, number)


    stst = await SimSMS().set_status(operation_id, 1)
    print('sim3', stst)
    markup = InlineKeyboardMarkup().row(InlineKeyboardButton('Отменить номер', callback_data=f'cancel_number:{user_id}:{price}:{operation_id}:S2'))


    await bot.send_message(chat_id=user_id, text=text, reply_markup=markup)
    print("ASS")
    await User(user_id).update_balance(-float(price))
    await self.write_sms_list(user_id, operation_id, number, service, country, price, 'SMSActivate')
    code = 'ACCESS'
    else:
    print(467, services)
    if services.split(":")[0] == 'NO_NUMBERS':
    code = 'NO_NUMBERS'
    elif services == 'ERRORS:NO_NUMBERS':
    code = 'NO_NUMBERS'
    elif services.split(":")[0] == 'WHATSAPP_NOT_AVAILABLE':
    code = "NO_WHATSAPP"
    elif services.split(":")[0] == 'NO_YULA_MAIL':
    code = 'MAIL_RULE'
    else:
    await bot.send_message(chat_id=1056861593, text=f'[{user_id}] ACTIVATE ERROR: {services}')
    code = 'ERRORS'

    return code
     
  15. ALEGOR
    ALEGOR Sep 12, 2024 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
    1

    Python
    from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import types

    from onlinesimru import GetUser
    from data import User
    from utils import config, logger, Numbers, Country, misc

    from smsactivate.api import SMSActivateAPI

    buy_text = """
    <b> Cервис:</b> {service}
    <b> Cтрана:</b> {country}
    <b> Номер:</b> <code>{number}</code>
    <i>⏱Ожидайте код...</i>
    """

    more_code_text = """
    <b> Cервис:</b> {service} | {country}

    <b> Номер:</b> <code>{number}</code>
    <b> Повторный код:</b> <code>{code}</code>
    """

    good_code_text = """
    <b> Cервис:</b> {service} | {country}

    <b> Номер:</b> <code>{number}</code>
    <b> Cмс код:</b> <code>{code}</code>
    """



    class SimSMS():
    proxy_url = 'http://vladit537_gmail_com:[email protected]:30001'


    def __init__(self):
    self.errors = ['BAD_ACTION', 'BAD_KEY', 'ERROR_SQL',
    'NO_BALANCE', 'WRONG_SERVICE', 'NO_ACTIVATION']
    self.sa = SMSActivateAPI(api_key=config.config("api_smsactivate"))
    self.url = 'https://simsms.org/stubs/handler_api.php'
    self.api = config.config("api_simsms")
    self.api = config.config("api_smsactivate")


    async def get_price(self, country, service):
    try:
    price = self.sa.getPrices(service=service, country=country)[f"{country}"][f"{service}"]["cost"]
    # async with aiohttp.ClientSession() as session:
    # async with session.post()
    except:
    price = 0

    return price


    # async def get_price(self, country, service):
    # try:
    # data = {
    # 'api_key': self.api,
    # 'action': 'get_service_price',
    # 'service': service,
    # 'country': country,
    # }
    # async with aiohttp.ClientSession() as session:
    # async with session.post(url=self.url, data=data, proxy=SimSMS.proxy_url) as response:
    # print(f'[def get_price]response status: {response.status}')
    # if response.status == 200:
    # info = await response.text()
    # print(f'[def get_price] info: {info}')
    # info = json.loads(info).get(f'{country}')
    # price = info[f'{service}']['cost']
    # else:
    # logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')
    # print(f'58 ERROR SMS ACTIVATE: STATUS {response.status}')
    # price = 0
    # except Exception as _ex:
    # print(f'_ex: {_ex}')
    # price = 0
    #
    # print(f'[utils/activate]64 price: {price}')
    #
    # return price


    async def get_balance(self):
    data = {
    "api_key": self.api,
    "action": "getBalance",
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data, proxy=SimSMS.proxy_url) as response:
    if response.status == 200:
    info = await response.text()
    if info not in self.errors:
    balance = str(info).split(":")[1]
    else:
    logger.error(f'ERRORS: {info}')
    balance = 0
    else:
    logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')
    balance = 0

    return balance

    async def get_numbers_quantity(self, country: int, service: str, operator: str):
    data = {
    'api_key': self.api,
    'action': 'getNumbersStatus',
    'country': country,
    'operator': operator
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data, proxy=SimSMS.proxy_url) as response:
    if response.status == 200:
    info = await response.text()
    if info not in self.errors:
    data = json.loads(info)
    count = data.get(f'{service}_0')
    else:
    logger.error(f'ERRORS: {info}')
    count = 0
    else:
    logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')
    count = 0

    return count

    async def buy_service(self, country: int, service: str, operator: str):
    data = {
    'api_key': self.api,
    'action': 'getNumber',
    'service': service,
    'operator': operator,
    'country': country,
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    if response.status == 200 or response.status == 502:
    info = await response.text()
    if info not in self.errors:
    if 'NO_NUMBERS' not in info:
    service = info
    else:
    service = f'ERRORS:{info}'
    else:
    service = f'ERRORS:{info}'
    else:
    logger.error(f'ERROR SMS ACTIVATE: STATUS: {response.status}')
    service = f'ERRORS:NO_NUMBERS'


    return service

    async def set_status(self, operation_id: str, status: int):
    data = {
    'api_key': self.api,
    'action': 'setStatus',
    'status': status,
    'id': operation_id
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    info_status = await response.text()


    return info_status

    async def get_status(self, operation_id: str):
    data = {
    'api_key': self.api,
    'action': 'getStatus',
    'id': operation_id
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    if response.status == 200:
    info = await response.text()
    if info not in self.errors:
    status = info
    else:
    logger.error(f'ERROR: {info}')
    status = 'ERRORS'
    else:
    status = 'ERRORS'

    return status

    async def get_fullsms(self, operation_id):
    data = {
    'api_key': self.api,
    'action': 'getFullSms',
    'id': operation_id
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    if response.status == 200:
    status = await response.text()
    if status not in self.errors:
    if 'FULL_SMS:' in status:
    full_sms = status.split(":")[1]
    else:
    full_sms = 'WAIT_OR_CANCEL'
    else:
    full_sms = 'ERRORS'
    else:
    full_sms = 'ERRORS'
    logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')

    return full_sms

    class OnlineSimRu():
    def __init__(self):
    self.api = config.config("api_onlinesimru")
    self.countries = misc.countries_sim
    self.services = misc.services
    self.countries_new = misc.countries_sim_new
    self.services_new = misc.services_new
    self.url = f'http://api-conserver.onlinesim.ru/stubs/handler_api.php?api_key={self.api}&action='

    async def get_balance(self):
    client = GetUser(self.api)
    try:
    balance = client.balance()
    balance = balance['balance']
    except:
    logger.error(f'ERRORS:')
    balance = 0

    return balance

    async def get_price(self, country: int, service: str):
    try:
    service_new = self.services_new[service]
    service = self.services[service]
    country_new = self.countries_new[country]
    country = self.countries[country]

    url = f'https://onlinesim.ru/api/getNumbersStats.php?apikey={self.api}&country={country}&service={service}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info = await response.text()
    resp = json.loads(info)
    price = resp['services'][f'service_{service}']['price']
    else:
    logger.error(f'ERROR OnlineSimRu: STATUS {response.status}')
    price = 0
    except:
    price = 0

    return price

    async def get_numbers_quantity(self, country, service, operator):
    try:
    service_new = self.services_new[service]
    service = self.services[service]
    country_new = self.countries_new[country]
    country = self.countries[country]

    url = f'https://onlinesim.ru/api/getNumbersStats.php?apikey={self.api}&country={country}&service={service}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info = await response.text()
    resp = json.loads(info)
    count = resp['services'][f'service_{service}']['count']
    else:
    logger.error(f'ERROR OnlineSimRu: STATUS {response.status}')
    count = 0
    except:
    count = 0

    return count

    async def buy_service(self, country: int, service: str, operator: str):
    try:
    service = self.services_new[service]
    country = self.countries_new[country]
    except:
    service = {'response' : "NO_THIS_COUNTRY"}
    return service
    errors = ['NO_BALANCE', 'WRONG_SERVICE']
    action = 'getNumber'
    url = self.url + action + f'&service={service}&country={country}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200 or response.status == 502:
    info = await response.text()
    if info not in errors:
    if 'NO_NUMBERS' not in info:
    service = info
    else:
    service = f'ERRORS:{info}'
    else:
    logger.error(f'ERROR OnlineSimRu: STATUS {response.status}')
    service = f'ERRORS:NO_NUMBERS'

    return service

    async def retry_num(self, operation_id: str):
    url = f'https://onlinesim.ru/api/setOperationRevise.php?apikey={self.api}&tzid={operation_id}'

    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info_status = await response.text()
    info = json.loads(info_status)
    tzid = info['tzid']
    else:
    tzid = 'ERRORS'

    return tzid

    async def get_status(self, operation_id: str):
    action = 'getStatus'
    url = self.url + action + f'&id={operation_id}'
    errors = ['BAD_STATUS']
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    status = await response.text()
    if response.status == 200:
    status = await response.text()
    else:
    logger.error(f'ERROR OnlineSimRu GET ACT STATE: STATUS {response.status} | {status}')
    status = 'ERRORS'

    return status

    async def set_status(self, operation_id: str, status: int):
    action = 'setStatus'
    url = self.url + action + f'&status={status}&id={operation_id}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info_status = await response.text()
    else:
    info_status = 'ERRORS'

    return info_status

    class SMSService():
    def __init__(self, obj=None):
    self.sql_path = './data/database.db'
    if obj != None:
    self.wait = iter(obj)

    async def buy_simru(self, bot, user_id, service, country, operator, price):
    services = await OnlineSimRu().buy_service(country, service, operator)
    print(services)
    try:
    if services.split(":")[0] == 'ACCESS_NUMBER':
    operation_id, number = services.split(":")[1], services.split(":")[2]
    text = buy_text.format(service=Numbers().service_name(service),
    country=Country().get_country_name(country), number=number)

    await OnlineSimRu().set_status(operation_id, 1)
    await User(user_id).update_balance(-float(price))
    markup = InlineKeyboardMarkup().row(InlineKeyboardButton('Отменить номер', callback_data=f'cancel_number:{user_id}:{price}:{operation_id}:SMSHub'))

    await bot.send_message(chat_id=user_id, text=text, reply_markup=markup)

    await self.write_sms_list(user_id, operation_id, number, service, country, price, 'SMSHub')
    code = 'ACCESS'
    else:
    try:
    if services.split(":")[1] == 'NO_NUMBERS':
    code = 'NO_NUMBERS'
    else:
    code = 'ERRORS'
    except:
    code = 'ERRORS'

    except:
    code = "ERRORS"

    return code

    async def buy_simsms(self, bot, user_id, service, country, operator, price):

    services = await SimSMS().buy_service(country, service, operator)
    print("SIMSMS", services)
    if services.split(":")[0] == 'ACCESS_NUMBER':
    operation_id, number = services.split(":")[1], services.split(":")[2]
    text = buy_text.format(service=Numbers().service_name(service),
    country=Country().get_country_name(country), number=number)
    print('s2', operation_id, number)


    stst = await SimSMS().set_status(operation_id, 1)
    print('sim3', stst)
    markup = InlineKeyboardMarkup().row(InlineKeyboardButton('Отменить номер', callback_data=f'cancel_number:{user_id}:{price}:{operation_id}:S2'))


    await bot.send_message(chat_id=user_id, text=text, reply_markup=markup)
    print("ASS")
    await User(user_id).update_balance(-float(price))
    await self.write_sms_list(user_id, operation_id, number, service, country, price, 'SMSActivate')
    code = 'ACCESS'
    else:
    print(467, services)
    if services.split(":")[0] == 'NO_NUMBERS':
    code = 'NO_NUMBERS'
    elif services == 'ERRORS:NO_NUMBERS':
    code = 'NO_NUMBERS'
    elif services.split(":")[0] == 'WHATSAPP_NOT_AVAILABLE':
    code = "NO_WHATSAPP"
    elif services.split(":")[0] == 'NO_YULA_MAIL':
    code = 'MAIL_RULE'
    else:
    await bot.send_message(chat_id=1056861593, text=f'[{user_id}] ACTIVATE ERROR: {services}')
    code = 'ERRORS'

    return code
     
  16. ALEGOR
    ALEGOR Sep 12, 2024 я не навижу жс и ебал всех кто на нем пишет 5 Jun 8, 2022
    1

    Python
    from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
    import aiohttp, aiosqlite, json, time, asyncio
    from aiogram import types

    from onlinesimru import GetUser
    from data import User
    from utils import config, logger, Numbers, Country, misc

    from smsactivate.api import SMSActivateAPI

    buy_text = """
    <b> Cервис:</b> {service}
    <b> Cтрана:</b> {country}
    <b> Номер:</b> <code>{number}</code>
    <i>⏱Ожидайте код...</i>
    """

    more_code_text = """
    <b> Cервис:</b> {service} | {country}

    <b> Номер:</b> <code>{number}</code>
    <b> Повторный код:</b> <code>{code}</code>
    """

    good_code_text = """
    <b> Cервис:</b> {service} | {country}

    <b> Номер:</b> <code>{number}</code>
    <b> Cмс код:</b> <code>{code}</code>
    """



    class SimSMS():
    proxy_url = 'http://vladit537_gmail_com:[email protected]:30001'


    def __init__(self):
    self.errors = ['BAD_ACTION', 'BAD_KEY', 'ERROR_SQL',
    'NO_BALANCE', 'WRONG_SERVICE', 'NO_ACTIVATION']
    self.sa = SMSActivateAPI(api_key=config.config("api_smsactivate"))
    self.url = 'https://simsms.org/stubs/handler_api.php'
    self.api = config.config("api_simsms")
    self.api = config.config("api_smsactivate")


    async def get_price(self, country, service):
    try:
    price = self.sa.getPrices(service=service, country=country)[f"{country}"][f"{service}"]["cost"]
    # async with aiohttp.ClientSession() as session:
    # async with session.post()
    except:
    price = 0

    return price


    # async def get_price(self, country, service):
    # try:
    # data = {
    # 'api_key': self.api,
    # 'action': 'get_service_price',
    # 'service': service,
    # 'country': country,
    # }
    # async with aiohttp.ClientSession() as session:
    # async with session.post(url=self.url, data=data, proxy=SimSMS.proxy_url) as response:
    # print(f'[def get_price]response status: {response.status}')
    # if response.status == 200:
    # info = await response.text()
    # print(f'[def get_price] info: {info}')
    # info = json.loads(info).get(f'{country}')
    # price = info[f'{service}']['cost']
    # else:
    # logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')
    # print(f'58 ERROR SMS ACTIVATE: STATUS {response.status}')
    # price = 0
    # except Exception as _ex:
    # print(f'_ex: {_ex}')
    # price = 0
    #
    # print(f'[utils/activate]64 price: {price}')
    #
    # return price


    async def get_balance(self):
    data = {
    "api_key": self.api,
    "action": "getBalance",
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data, proxy=SimSMS.proxy_url) as response:
    if response.status == 200:
    info = await response.text()
    if info not in self.errors:
    balance = str(info).split(":")[1]
    else:
    logger.error(f'ERRORS: {info}')
    balance = 0
    else:
    logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')
    balance = 0

    return balance

    async def get_numbers_quantity(self, country: int, service: str, operator: str):
    data = {
    'api_key': self.api,
    'action': 'getNumbersStatus',
    'country': country,
    'operator': operator
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data, proxy=SimSMS.proxy_url) as response:
    if response.status == 200:
    info = await response.text()
    if info not in self.errors:
    data = json.loads(info)
    count = data.get(f'{service}_0')
    else:
    logger.error(f'ERRORS: {info}')
    count = 0
    else:
    logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')
    count = 0

    return count

    async def buy_service(self, country: int, service: str, operator: str):
    data = {
    'api_key': self.api,
    'action': 'getNumber',
    'service': service,
    'operator': operator,
    'country': country,
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    if response.status == 200 or response.status == 502:
    info = await response.text()
    if info not in self.errors:
    if 'NO_NUMBERS' not in info:
    service = info
    else:
    service = f'ERRORS:{info}'
    else:
    service = f'ERRORS:{info}'
    else:
    logger.error(f'ERROR SMS ACTIVATE: STATUS: {response.status}')
    service = f'ERRORS:NO_NUMBERS'


    return service

    async def set_status(self, operation_id: str, status: int):
    data = {
    'api_key': self.api,
    'action': 'setStatus',
    'status': status,
    'id': operation_id
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    info_status = await response.text()


    return info_status

    async def get_status(self, operation_id: str):
    data = {
    'api_key': self.api,
    'action': 'getStatus',
    'id': operation_id
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    if response.status == 200:
    info = await response.text()
    if info not in self.errors:
    status = info
    else:
    logger.error(f'ERROR: {info}')
    status = 'ERRORS'
    else:
    status = 'ERRORS'

    return status

    async def get_fullsms(self, operation_id):
    data = {
    'api_key': self.api,
    'action': 'getFullSms',
    'id': operation_id
    }
    async with aiohttp.ClientSession() as session:
    async with session.post(url=self.url, data=data) as response:
    if response.status == 200:
    status = await response.text()
    if status not in self.errors:
    if 'FULL_SMS:' in status:
    full_sms = status.split(":")[1]
    else:
    full_sms = 'WAIT_OR_CANCEL'
    else:
    full_sms = 'ERRORS'
    else:
    full_sms = 'ERRORS'
    logger.error(f'ERROR SMS ACTIVATE: STATUS {response.status}')

    return full_sms

    class OnlineSimRu():
    def __init__(self):
    self.api = config.config("api_onlinesimru")
    self.countries = misc.countries_sim
    self.services = misc.services
    self.countries_new = misc.countries_sim_new
    self.services_new = misc.services_new
    self.url = f'http://api-conserver.onlinesim.ru/stubs/handler_api.php?api_key={self.api}&action='

    async def get_balance(self):
    client = GetUser(self.api)
    try:
    balance = client.balance()
    balance = balance['balance']
    except:
    logger.error(f'ERRORS:')
    balance = 0

    return balance

    async def get_price(self, country: int, service: str):
    try:
    service_new = self.services_new[service]
    service = self.services[service]
    country_new = self.countries_new[country]
    country = self.countries[country]

    url = f'https://onlinesim.ru/api/getNumbersStats.php?apikey={self.api}&country={country}&service={service}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info = await response.text()
    resp = json.loads(info)
    price = resp['services'][f'service_{service}']['price']
    else:
    logger.error(f'ERROR OnlineSimRu: STATUS {response.status}')
    price = 0
    except:
    price = 0

    return price

    async def get_numbers_quantity(self, country, service, operator):
    try:
    service_new = self.services_new[service]
    service = self.services[service]
    country_new = self.countries_new[country]
    country = self.countries[country]

    url = f'https://onlinesim.ru/api/getNumbersStats.php?apikey={self.api}&country={country}&service={service}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info = await response.text()
    resp = json.loads(info)
    count = resp['services'][f'service_{service}']['count']
    else:
    logger.error(f'ERROR OnlineSimRu: STATUS {response.status}')
    count = 0
    except:
    count = 0

    return count

    async def buy_service(self, country: int, service: str, operator: str):
    try:
    service = self.services_new[service]
    country = self.countries_new[country]
    except:
    service = {'response' : "NO_THIS_COUNTRY"}
    return service
    errors = ['NO_BALANCE', 'WRONG_SERVICE']
    action = 'getNumber'
    url = self.url + action + f'&service={service}&country={country}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200 or response.status == 502:
    info = await response.text()
    if info not in errors:
    if 'NO_NUMBERS' not in info:
    service = info
    else:
    service = f'ERRORS:{info}'
    else:
    logger.error(f'ERROR OnlineSimRu: STATUS {response.status}')
    service = f'ERRORS:NO_NUMBERS'

    return service

    async def retry_num(self, operation_id: str):
    url = f'https://onlinesim.ru/api/setOperationRevise.php?apikey={self.api}&tzid={operation_id}'

    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info_status = await response.text()
    info = json.loads(info_status)
    tzid = info['tzid']
    else:
    tzid = 'ERRORS'

    return tzid

    async def get_status(self, operation_id: str):
    action = 'getStatus'
    url = self.url + action + f'&id={operation_id}'
    errors = ['BAD_STATUS']
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    status = await response.text()
    if response.status == 200:
    status = await response.text()
    else:
    logger.error(f'ERROR OnlineSimRu GET ACT STATE: STATUS {response.status} | {status}')
    status = 'ERRORS'

    return status

    async def set_status(self, operation_id: str, status: int):
    action = 'setStatus'
    url = self.url + action + f'&status={status}&id={operation_id}'
    async with aiohttp.ClientSession() as session:
    async with session.post(url=url) as response:
    if response.status == 200:
    info_status = await response.text()
    else:
    info_status = 'ERRORS'

    return info_status

    class SMSService():
    def __init__(self, obj=None):
    self.sql_path = './data/database.db'
    if obj != None:
    self.wait = iter(obj)

    def __aiter__(self):
    return self

    async def connect(self):
    async with aiosqlite.connect(self.sql_path) as db:
    return db

    async def __anext__(self):
    try:
    value = next(self.wait)
    except StopIteration:
    raise StopAsyncIteration
    return value

    async def write_sms_list(self, user_id, operation_id, number, service, country, price, provider):
    async with aiosqlite.connect(self.sql_path) as db:
    sms = [user_id, operation_id, number, service, country, 'first', time.time(), price, provider]
    await db.execute('INSERT INTO wait_sms VALUES (?,?,?,?,?,?,?,?,?)', sms)
    await db.commit()

    async def del_wait_sms(self, operation_id: str):
    async with aiosqlite.connect(self.sql_path) as db:

    await db.execute(f'DELETE FROM wait_sms WHERE operation_id = "{operation_id}"')
    await db.commit()

    async def write_logs(self, user_id: int, operation_id: str, service: str, country: int, number: str, price: float, status: str):
    price_service = await SimSMS().get_price(country, service)
    async with aiosqlite.connect(self.sql_path) as db:
    sms = [user_id, operation_id, service, country, number, price, price_service, status, time.time()]

    await db.execute('INSERT INTO service_logs VALUES (?,?,?,?,?,?,?,?,?)', sms)
    await db.commit()

    async def get_info_sms(self, operation_id: int):
    async with aiosqlite.connect(self.sql_path) as db:

    select = await db.execute(f'SELECT * FROM wait_sms WHERE operation_id = "{operation_id}"')
    service = await select.fetchone()
    await select.close()

    return service

    async def update_wait_status(self, operation_id: str, status: str):
    async with aiosqlite.connect(self.sql_path) as db:

    await db.execute(f'UPDATE wait_sms SET status = "{status}" WHERE operation_id = "{operation_id}"')
    await db.commit()

    async def add_notify(self, user_id, service, country, operator):
    async with aiosqlite.connect(self.sql_path) as db:
    sql = 'INSERT INTO notify_numbers VALUES (?,?,?,?)'
    await db.execute(sql, (user_id, service, country, operator))
    await db.commit()


    async def buy_service(self, bot, user_id, service, country, operator):
    price = await Numbers().get_service_price(country, service)
    text_error = 'Извините, у нас небольшие неполадки.\nАдминистрация бота была оповещена о данном сбое.'
    text_no_number = 'Кажется закончились номера, попробуйте позже'

    if float(User(user_id).balance) >= float(price):
    print(service, country)
    price_hub = price_sim = await OnlineSimRu().get_price(country, service)
    price_activate = await SimSMS().get_price(country, service)
    print(price_hub, price_activate)

    if float(price_activate) >= float(price_hub) and price_activate != 0:
    code = await self.buy_simsms(bot, user_id, service, country, operator, price)
    print("SIMSMS 1 CODE", code)
    if code != 'ACCESS':
    code = await self.buy_simru(bot, user_id, service, country, operator, price)
    print("SIMSMS 2 CODE", code)
    if code != 'ACCESS':
    if code == 'NO_NUMBERS':
    markup = self.notify_markup(service, country, operator)
    await bot.send_message(chat_id=user_id, text=text_no_number, reply_markup=markup)
    elif code == 'NO_WHATSAPP':
    await bot.send_message(chat_id=user_id, text='Извините, данный сервис недоступен.')
    elif code == 'MAIL_RULE':
    await bot.send_message(chat_id=user_id, text='Извините, данный сервис недоступен.')
    elif code == 'ERRORS':
    await bot.send_message(chat_id=user_id, text=text_error)
    else:
    print('Fuck u')
    code = await self.buy_simsms(bot, user_id, service, country, operator, price)
    print("SIMSMS 2 CODE", code)
    if code != 'ACCESS':
    code = await self.buy_simru(bot, user_id, service, country, operator, price)
    print("SIMSMS 2 CODE", code)
    if code != 'ACCESS':
    if code == 'NO_NUMBERS':
    markup = self.notify_markup(service, country, operator)
    await bot.send_message(chat_id=user_id, text=text_no_number, reply_markup=markup)
    elif code == 'NO_WHATSAPP':
    await bot.send_message(chat_id=user_id, text='Извините, данный сервис недоступен.')
    elif code == 'MAIL_RULE':
    await bot.send_message(chat_id=user_id, text='Извините, данный сервис недоступен.')
    elif code == 'ERRORS':
    await bot.send_message(chat_id=user_id, text=text_error)
    else:
    await bot.send_message(chat_id=user_id, text='Пополните баланс!')

    async def buy_simru(self, bot, user_id, service, country, operator, price):
    services = await OnlineSimRu().buy_service(country, service, operator)
    print(services)
    try:
    if services.split(":")[0] == 'ACCESS_NUMBER':
    operation_id, number = services.split(":")[1], services.split(":")[2]
    text = buy_text.format(service=Numbers().service_name(service),
    country=Country().get_country_name(country), number=number)

    await OnlineSimRu().set_status(operation_id, 1)
    await User(user_id).update_balance(-float(price))
    markup = InlineKeyboardMarkup().row(InlineKeyboardButton('Отменить номер', callback_data=f'cancel_number:{user_id}:{price}:{operation_id}:SMSHub'))

    await bot.send_message(chat_id=user_id, text=text, reply_markup=markup)

    await self.write_sms_list(user_id, operation_id, number, service, country, price, 'SMSHub')
    code = 'ACCESS'
    else:
    try:
    if services.split(":")[1] == 'NO_NUMBERS':
    code = 'NO_NUMBERS'
    else:
    code = 'ERRORS'
    except:
    code = 'ERRORS'

    except:
    code = "ERRORS"

    return code

    async def buy_simsms(self, bot, user_id, service, country, operator, price):

    services = await SimSMS().buy_service(country, service, operator)
    print("SIMSMS", services)
    if services.split(":")[0] == 'ACCESS_NUMBER':
    operation_id, number = services.split(":")[1], services.split(":")[2]
    text = buy_text.format(service=Numbers().service_name(service),
    country=Country().get_country_name(country), number=number)
    print('s2', operation_id, number)


    stst = await SimSMS().set_status(operation_id, 1)
    print('sim3', stst)
    markup = InlineKeyboardMarkup().row(InlineKeyboardButton('Отменить номер', callback_data=f'cancel_number:{user_id}:{price}:{operation_id}:S2'))


    await bot.send_message(chat_id=user_id, text=text, reply_markup=markup)
    print("ASS")
    await User(user_id).update_balance(-float(price))
    await self.write_sms_list(user_id, operation_id, number, service, country, price, 'SMSActivate')
    code = 'ACCESS'
    else:
    print(467, services)
    if services.split(":")[0] == 'NO_NUMBERS':
    code = 'NO_NUMBERS'
    elif services == 'ERRORS:NO_NUMBERS':
    code = 'NO_NUMBERS'
    elif services.split(":")[0] == 'WHATSAPP_NOT_AVAILABLE':
    code = "NO_WHATSAPP"
    elif services.split(":")[0] == 'NO_YULA_MAIL':
    code = 'MAIL_RULE'
    else:
    await bot.send_message(chat_id=1056861593, text=f'[{user_id}] ACTIVATE ERROR: {services}')
    code = 'ERRORS'

    return code
     
Loading...