Use Advance BAT to EXE - https://www.battoexeconverter.com/
This script will generate a .desktop file for multiple telegram accounts.
| import { gcm as aes256gcm, randomBytes } from "@noble/ciphers/webcrypto"; | |
| import { base64 } from "@scure/base"; | |
| import { scryptAsync } from "@noble/hashes/scrypt"; | |
| const VERSION = 1; | |
| const SALT_BYTES = 32; | |
| const NONCE_BYTES = 12; | |
| const KEY_BYTES = 32; | |
| function generateSalt() { |
| const getPercentage = (amount) => { | |
| if (amount >= 300) { | |
| return 6.5 / 100; | |
| } else if (amount >= 20) { | |
| return 6 / 100; | |
| } else { | |
| return 5.5 / 100; | |
| } | |
| }; |
| 1) SSH into the server as a root user | |
| 2) Install the required dependencies. Run apt install cmake libpcre3 libpcre3-dev | |
| 3) Run wget "https://nginx.org/download/nginx-$(nginx -v 2>&1 | awk -F/ '{print $2}' | sed 's/(Ubuntu)//' | tr -d '[:space:]').tar.gz" | |
| 4) Run tar -xzf nginx-{{ version }}.tar.gz | |
| 5) Run git clone --recurse-submodules -j8 https://github.com/google/ngx_brotli | |
| 6) cd ngx_brotli/deps/brotli && mkdir out && cd out | |
| 7) Run cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed .. | |
| 8) Run cmake --build . --config Release --target brotlienc | |
| 9) Run cd ~/nginx-{{ version }} | |
| 10) Run ./configure --add-module=/root/ngx_brotli |
| import { Raw } from "telegram/events"; | |
| import { UpdateConnectionState } from "telegram/network"; | |
| /** Add Connected Event Handler */ | |
| client.addEventHandler( | |
| (event) => { | |
| console.log(event); | |
| /** Do Something With State **/ | |
| setConnected(event.state === UpdateConnectionState.connected); |
| <?php | |
| use Base64Url\Base64Url; | |
| use Elliptic\EdDSA; | |
| // composer require simplito/elliptic-php spomky-labs/base64url | |
| class TelegramValidator { | |
| /** | |
| * Check if is valid WebAppData | |
| * @param string $webAppData |
| const client = await GramClient.create("default"); | |
| /** POST: /telegram/login */ | |
| await client.startPending(); // Starts Client, response can be called later | |
| await client.startResponse("phoneNumber", "phone"); | |
| /** POST: /telegram/code */ | |
| await client.startResponse("phoneCode", "code"); | |
| name: Build/release Electron app | |
| on: | |
| push: | |
| tags: | |
| - v*.*.* | |
| permissions: | |
| contents: write |
Use Advance BAT to EXE - https://www.battoexeconverter.com/
This script will generate a .desktop file for multiple telegram accounts.
| # Start Server | |
| @reboot cd /home/ubuntu/laravel-app && screen -dmS server php artisan serve --host 0.0.0.0 | |
| # Send Server IP Address | |
| @reboot cd /home/ubuntu/laravel-app && php artisan app:send-server-address >> /dev/null 2>&1 | |
| # Run Scheduled Commands | |
| * * * * * cd /home/ubuntu/laravel-app && php artisan schedule:run >> /dev/null 2>&1 |