├── README.md ├── index.js ├── package.json └── proxies.txt /README.md: -------------------------------------------------------------------------------- 1 | # Interlink Auto Bot 2 | 3 | Automated bot for claiming Interlink Labs airdrop tokens, designed for the Interlink platform. 4 | 5 | ## 🚦 Register 6 | 7 | - **Link**: https://interlinklabs.ai/referral?refCode=88570 8 | 9 | ## 🚀 Features 10 | 11 | - **Automatic Token Claims**: Claims airdrop tokens every 4 hours automatically 12 | - **Smart Proxy Support**: Rotates between multiple proxies to avoid IP blocks 13 | - **Persistent Login**: Securely stores your JWT token for automatic reconnection 14 | - **Error Handling**: Robust error handling with automatic retry mechanisms 15 | - **OTP Support**: Full support for email-based OTP verification 16 | 17 | ## 📋 Prerequisites 18 | 19 | - Node.js v16.x or higher 20 | - NPM v8.x or higher 21 | - Valid Interlink account with email verification 22 | 23 | ## 🔧 Installation 24 | 25 | 1. Clone the repository: 26 | ```bash 27 | git clone https://github.com/vikitoshi/Interlink-Auto-Bot.git 28 | cd Interlink-Auto-Bot 29 | ``` 30 | 31 | 2. Install dependencies: 32 | ```bash 33 | npm install 34 | ``` 35 | 36 | 3. Set up your proxies (optional): 37 | Create a `proxies.txt` file in the root directory and add your proxies, one per line. 38 | Format: `host:port:username:password` or `protocol://host:port:username:password` 39 | 40 | ## 🚦 Usage 41 | 42 | Run the bot: 43 | ```bash 44 | node index.js 45 | ``` 46 | 47 | On first run, you'll be prompted to enter: 48 | - Your login ID or email 49 | - Your passcode 50 | - Your verification email 51 | 52 | An OTP will be sent to your email. Enter the OTP when prompted. 53 | 54 | After successful login, the bot will: 55 | 1. Display your account information 56 | 2. Check if tokens are claimable 57 | 3. Claim tokens if available 58 | 4. Set up a countdown timer to the next claim 59 | 5. Automatically attempt claims at the optimal time 60 | 61 | ## ⚙️ Configuration 62 | 63 | ### Proxy Setup 64 | 65 | The bot supports HTTP, HTTPS, SOCKS4, and SOCKS5 proxies. 66 | 67 | Example proxies.txt: 68 | ``` 69 | http://1.2.3.4:8080:user:pass 70 | socks5://5.6.7.8:1080 71 | 1.2.3.4:8080:user:pass 72 | ``` 73 | 74 | ### Claim Interval 75 | 76 | The default claim interval is 4 hours. You can modify this in the source code if needed. 77 | 78 | ## 📝 Notes 79 | 80 | - The bot stores your JWT token in `token.txt` for persistent sessions 81 | - If your token expires, the bot will automatically prompt for re-login 82 | - Token balance is displayed after each successful claim 83 | - Console output is color-coded for better visibility 84 | 85 | ## 🔒 Security 86 | 87 | - Your credentials are never stored in plain text 88 | - The bot only stores the JWT token, not your login credentials 89 | - All API requests are made over HTTPS 90 | 91 | ## ⚠️ Disclaimer 92 | 93 | This bot is for educational purposes only. Use at your own risk. The developers are not responsible for any account restrictions or bans resulting from the use of this bot. 94 | 95 | ## 📄 License 96 | 97 | This project is licensed under the MIT License - see the LICENSE file for details. 98 | 99 | ## 👥 Contributors 100 | 101 | - Airdrop Insiders Community 102 | 103 | ## 🙏 Support 104 | 105 | If you find this bot helpful, consider supporting us by using our referral codes or contributing to the project. -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const fs = require('fs'); 3 | const path = require('path'); 4 | const moment = require('moment'); 5 | const readline = require('readline'); 6 | const { clear } = require('console'); 7 | const { HttpsProxyAgent } = require('https-proxy-agent'); 8 | const { SocksProxyAgent } = require('socks-proxy-agent'); 9 | const https = require('https'); 10 | 11 | const API_BASE_URL = 'https://prod.interlinklabs.ai/api/v1'; 12 | const TOKEN_FILE_PATH = path.join(__dirname, 'token.txt'); 13 | const PROXIES_FILE_PATH = path.join(__dirname, 'proxies.txt'); 14 | const CLAIM_INTERVAL_MS = 4 * 60 * 60 * 1000; 15 | 16 | const colors = { 17 | green: '\x1b[32m', 18 | yellow: '\x1b[33m', 19 | red: '\x1b[31m', 20 | white: '\x1b[37m', 21 | gray: '\x1b[90m', 22 | cyan: '\x1b[36m', 23 | reset: '\x1b[0m', 24 | bold: '\x1b[1m' 25 | }; 26 | 27 | const logger = { 28 | info: (msg) => console.log(`${colors.green}[✓] ${msg}${colors.reset}`), 29 | wallet: (msg) => console.log(`${colors.yellow}[➤] ${msg}${colors.reset}`), 30 | warn: (msg) => console.log(`${colors.yellow}[⚠] ${msg}${colors.reset}`), 31 | error: (msg) => console.log(`${colors.red}[✗] ${msg}${colors.reset}`), 32 | success: (msg) => console.log(`${colors.green}[✅] ${msg}${colors.reset}`), 33 | loading: (msg) => console.log(`${colors.cyan}[⟳] ${msg}${colors.reset}`), 34 | step: (msg) => console.log(`${colors.white}[➤] ${msg}${colors.reset}`), 35 | banner: () => { 36 | console.log(`${colors.cyan}${colors.bold}`); 37 | console.log(`---------------------------------------------`); 38 | console.log(`Interlink Auto Bot - Airdrop Insiders`); 39 | console.log(`---------------------------------------------${colors.reset}`); 40 | console.log(); 41 | } 42 | }; 43 | 44 | const rl = readline.createInterface({ 45 | input: process.stdin, 46 | output: process.stdout 47 | }); 48 | 49 | function promptInput(question) { 50 | return new Promise((resolve) => { 51 | rl.question(`${colors.white}${question}${colors.reset}`, (answer) => { 52 | resolve(answer.trim()); 53 | }); 54 | }); 55 | } 56 | 57 | async function sendOtp(apiClient, loginId, passcode, email) { 58 | try { 59 | const payload = { loginId, passcode, email }; 60 | const response = await apiClient.post('/auth/send-otp-email-verify-login', payload); 61 | if (response.data.statusCode === 200) { 62 | logger.success(response.data.message); 63 | logger.info(`If OTP doesn't arrive, stop the bot (Ctrl+C) and restart.`); 64 | } else { 65 | logger.error(`Failed to send OTP: ${JSON.stringify(response.data)}`); 66 | } 67 | } catch (error) { 68 | logger.error(`Error sending OTP: ${error.response?.data?.message || error.message}`); 69 | if (error.response?.data) { 70 | logger.error(`Response details: ${JSON.stringify(error.response.data)}`); 71 | } 72 | } 73 | } 74 | 75 | async function verifyOtp(apiClient, loginId, otp) { 76 | try { 77 | const payload = { loginId, otp }; 78 | const response = await apiClient.post('/auth/check-otp-email-verify-login', payload); 79 | if (response.data.statusCode === 200) { 80 | logger.success(response.data.message); 81 | const token = response.data.data.jwtToken; 82 | saveToken(token); 83 | return token; 84 | } else { 85 | logger.error(`Failed to verify OTP: ${JSON.stringify(response.data)}`); 86 | return null; 87 | } 88 | } catch (error) { 89 | logger.error(`Error verifying OTP: ${error.response?.data?.message || error.message}`); 90 | if (error.response?.data) { 91 | logger.error(`Response details: ${JSON.stringify(error.response.data)}`); 92 | } 93 | return null; 94 | } 95 | } 96 | 97 | function saveToken(token) { 98 | try { 99 | fs.writeFileSync(TOKEN_FILE_PATH, token); 100 | logger.info(`Token saved to ${TOKEN_FILE_PATH}`); 101 | } catch (error) { 102 | logger.error(`Error saving token: ${error.message}`); 103 | } 104 | } 105 | 106 | async function login(proxies) { 107 | const loginId = await promptInput('Enter your login ID (or email): '); 108 | const passcode = await promptInput('Enter your passcode: '); 109 | const email = await promptInput('Enter your email: '); 110 | 111 | let apiClient; 112 | const proxy = getRandomProxy(proxies); 113 | 114 | if (proxy) { 115 | logger.step(`Attempting to send OTP with proxy: ${proxy}`); 116 | apiClient = createApiClient(null, proxy); 117 | } else { 118 | logger.step(`Attempting to send OTP without proxy...`); 119 | apiClient = createApiClient(null); 120 | } 121 | 122 | await sendOtp(apiClient, loginId, passcode, email); 123 | const otp = await promptInput('Enter OTP: '); 124 | const token = await verifyOtp(apiClient, loginId, otp); 125 | 126 | return token; 127 | } 128 | 129 | function readToken() { 130 | try { 131 | return fs.readFileSync(TOKEN_FILE_PATH, 'utf8').trim(); 132 | } catch (error) { 133 | logger.warn(`Token file not found or invalid. Will attempt login.`); 134 | return null; 135 | } 136 | } 137 | 138 | function readProxies() { 139 | try { 140 | if (!fs.existsSync(PROXIES_FILE_PATH)) { 141 | logger.warn(`Proxies file not found. Running without proxies.`); 142 | return []; 143 | } 144 | 145 | const content = fs.readFileSync(PROXIES_FILE_PATH, 'utf8'); 146 | return content.split('\n') 147 | .map(line => line.trim()) 148 | .filter(line => line && !line.startsWith('#')); 149 | } catch (error) { 150 | logger.error(`Error reading proxies file: ${error.message}`); 151 | return []; 152 | } 153 | } 154 | 155 | function getRandomProxy(proxies) { 156 | if (!proxies.length) return null; 157 | return proxies[Math.floor(Math.random() * proxies.length)]; 158 | } 159 | 160 | function createProxyAgent(proxyUrl) { 161 | if (!proxyUrl) return null; 162 | 163 | if (proxyUrl.startsWith('socks://') || proxyUrl.startsWith('socks4://') || proxyUrl.startsWith('socks5://')) { 164 | return new SocksProxyAgent(proxyUrl); 165 | } else { 166 | return new HttpsProxyAgent(proxyUrl); 167 | } 168 | } 169 | 170 | function createApiClient(token, proxy = null) { 171 | const config = { 172 | baseURL: API_BASE_URL, 173 | headers: { 174 | 'User-Agent': 'okhttp/4.12.0', 175 | 'Accept-Encoding': 'gzip' 176 | }, 177 | timeout: 30000, 178 | httpsAgent: new https.Agent({ 179 | rejectUnauthorized: false 180 | }) 181 | }; 182 | 183 | if (token) { 184 | config.headers['Authorization'] = `Bearer ${token}`; 185 | } 186 | 187 | if (proxy) { 188 | try { 189 | const proxyAgent = createProxyAgent(proxy); 190 | config.httpsAgent = proxyAgent; 191 | config.proxy = false; 192 | logger.info(`Using proxy: ${proxy}`); 193 | } catch (error) { 194 | logger.error(`Error setting up proxy: ${error.message}`); 195 | } 196 | } 197 | 198 | return axios.create(config); 199 | } 200 | 201 | function formatTimeRemaining(milliseconds) { 202 | if (milliseconds <= 0) return '00:00:00'; 203 | 204 | const seconds = Math.floor((milliseconds / 1000) % 60); 205 | const minutes = Math.floor((milliseconds / (1000 * 60)) % 60); 206 | const hours = Math.floor((milliseconds / (1000 * 60 * 60)) % 24); 207 | 208 | return [hours, minutes, seconds] 209 | .map(val => val.toString().padStart(2, '0')) 210 | .join(':'); 211 | } 212 | 213 | async function getCurrentUser(apiClient) { 214 | try { 215 | const response = await apiClient.get('/auth/current-user'); 216 | return response.data.data; 217 | } catch (error) { 218 | logger.error(`Error getting user information: ${error.response?.data?.message || error.message}`); 219 | return null; 220 | } 221 | } 222 | 223 | async function getTokenBalance(apiClient) { 224 | try { 225 | const response = await apiClient.get('/token/get-token'); 226 | return response.data.data; 227 | } catch (error) { 228 | logger.error(`Error getting token balance: ${error.response?.data?.message || error.message}`); 229 | return null; 230 | } 231 | } 232 | 233 | async function checkIsClaimable(apiClient) { 234 | try { 235 | const response = await apiClient.get('/token/check-is-claimable'); 236 | return response.data.data; 237 | } catch (error) { 238 | logger.error(`Error checking if airdrop is claimable: ${error.response?.data?.message || error.message}`); 239 | return { isClaimable: false, nextFrame: Date.now() + 1000 * 60 * 5 }; 240 | } 241 | } 242 | 243 | async function claimAirdrop(apiClient) { 244 | try { 245 | const response = await apiClient.post('/token/claim-airdrop'); 246 | logger.success(`Airdrop claimed successfully!`); 247 | return response.data; 248 | } catch (error) { 249 | logger.error(`Error claiming airdrop: ${error.response?.data?.message || error.message}`); 250 | return null; 251 | } 252 | } 253 | 254 | function displayUserInfo(userInfo, tokenInfo) { 255 | if (!userInfo || !tokenInfo) return; 256 | 257 | console.log('\n' + '='.repeat(50)); 258 | console.log(`${colors.white}${colors.bold}USER INFORMATION${colors.reset}`); 259 | console.log(`${colors.white}Username:${colors.reset} ${userInfo.username}`); 260 | console.log(`${colors.white}Email:${colors.reset} ${userInfo.email}`); 261 | console.log(`${colors.white}Wallet:${colors.reset} ${userInfo.connectedAccounts?.wallet?.address || 'Not connected'}`); 262 | console.log(`${colors.white}User ID:${colors.reset} ${userInfo.loginId}`); 263 | console.log(`${colors.white}Referral ID:${colors.reset} ${tokenInfo.userReferralId}`); 264 | 265 | console.log('\n' + '='.repeat(50)); 266 | console.log(`${colors.yellow}${colors.bold}TOKEN BALANCE${colors.reset}`); 267 | console.log(`${colors.yellow}Gold Tokens:${colors.reset} ${tokenInfo.interlinkGoldTokenAmount}`); 268 | console.log(`${colors.yellow}Silver Tokens:${colors.reset} ${tokenInfo.interlinkSilverTokenAmount}`); 269 | console.log(`${colors.yellow}Diamond Tokens:${colors.reset} ${tokenInfo.interlinkDiamondTokenAmount}`); 270 | console.log(`${colors.yellow}Interlink Tokens:${colors.reset} ${tokenInfo.interlinkTokenAmount}`); 271 | console.log(`${colors.yellow}Last Claim:${colors.reset} ${moment(tokenInfo.lastClaimTime).format('YYYY-MM-DD HH:mm:ss')}`); 272 | console.log('='.repeat(50) + '\n'); 273 | } 274 | 275 | async function tryConnect(token, proxies) { 276 | let apiClient; 277 | let userInfo = null; 278 | let tokenInfo = null; 279 | 280 | logger.step(`Attempting connection without proxy...`); 281 | apiClient = createApiClient(token); 282 | 283 | logger.loading(`Retrieving user information...`); 284 | userInfo = await getCurrentUser(apiClient); 285 | 286 | if (!userInfo && proxies.length > 0) { 287 | let attempts = 0; 288 | const maxAttempts = Math.min(proxies.length, 5); 289 | 290 | while (!userInfo && attempts < maxAttempts) { 291 | const proxy = proxies[attempts]; 292 | logger.step(`Trying with proxy ${attempts + 1}/${maxAttempts}: ${proxy}`); 293 | 294 | apiClient = createApiClient(token, proxy); 295 | 296 | logger.loading(`Retrieving user information...`); 297 | userInfo = await getCurrentUser(apiClient); 298 | attempts++; 299 | 300 | if (!userInfo) { 301 | logger.warn(`Proxy ${proxy} failed. Trying next...`); 302 | } 303 | } 304 | } 305 | 306 | if (userInfo) { 307 | logger.loading(`Retrieving token balance...`); 308 | tokenInfo = await getTokenBalance(apiClient); 309 | } 310 | 311 | return { apiClient, userInfo, tokenInfo }; 312 | } 313 | 314 | async function runBot() { 315 | try { 316 | clear(); 317 | logger.banner(); 318 | 319 | const proxies = readProxies(); 320 | let token = readToken(); 321 | 322 | if (!token) { 323 | logger.step(`No token found. Initiating login...`); 324 | token = await login(proxies); 325 | if (!token) { 326 | logger.error(`Login failed. Exiting.`); 327 | process.exit(1); 328 | } 329 | } 330 | 331 | let { apiClient, userInfo, tokenInfo: initialTokenInfo } = await tryConnect(token, proxies); 332 | 333 | if (!userInfo || !initialTokenInfo) { 334 | logger.error(`Failed to retrieve necessary information. Attempting login...`); 335 | token = await login(proxies); 336 | if (!token) { 337 | logger.error(`Login failed. Exiting.`); 338 | process.exit(1); 339 | } 340 | const result = await tryConnect(token, proxies); 341 | apiClient = result.apiClient; 342 | userInfo = result.userInfo; 343 | initialTokenInfo = result.tokenInfo; 344 | if (!userInfo || !initialTokenInfo) { 345 | logger.error(`Failed to retrieve necessary information after login. Check your credentials and proxies.`); 346 | process.exit(1); 347 | } 348 | } 349 | 350 | let tokenInfo = initialTokenInfo; 351 | 352 | logger.success(`Connected as ${userInfo.username}`); 353 | logger.info(`Started at: ${moment().format('YYYY-MM-DD HH:mm:ss')}`); 354 | 355 | displayUserInfo(userInfo, tokenInfo); 356 | 357 | async function attemptClaim() { 358 | let currentApiClient = apiClient; 359 | if (proxies.length > 0) { 360 | const randomProxy = getRandomProxy(proxies); 361 | currentApiClient = createApiClient(token, randomProxy); 362 | } 363 | 364 | const claimCheck = await checkIsClaimable(currentApiClient); 365 | 366 | if (claimCheck.isClaimable) { 367 | logger.loading(`Airdrop is claimable! Attempting to claim...`); 368 | await claimAirdrop(currentApiClient); 369 | 370 | logger.loading(`Updating token information...`); 371 | const newTokenInfo = await getTokenBalance(currentApiClient); 372 | if (newTokenInfo) { 373 | tokenInfo = newTokenInfo; 374 | displayUserInfo(userInfo, tokenInfo); 375 | } 376 | } 377 | 378 | return claimCheck.nextFrame; 379 | } 380 | 381 | logger.step(`Checking if airdrop is claimable...`); 382 | let nextClaimTime = await attemptClaim(); 383 | 384 | const updateCountdown = () => { 385 | const now = Date.now(); 386 | const timeRemaining = Math.max(0, nextClaimTime - now); 387 | 388 | process.stdout.write(`\r${colors.white}Next claim in: ${colors.bold}${formatTimeRemaining(timeRemaining)}${colors.reset} `); 389 | 390 | if (timeRemaining <= 0) { 391 | process.stdout.write('\n'); 392 | logger.step(`Claim time reached!`); 393 | 394 | attemptClaim().then(newNextFrame => { 395 | nextClaimTime = newNextFrame; 396 | }); 397 | } 398 | }; 399 | 400 | setInterval(updateCountdown, 1000); 401 | 402 | const scheduleNextCheck = () => { 403 | const now = Date.now(); 404 | const timeUntilNextCheck = Math.max(1000, nextClaimTime - now); 405 | 406 | setTimeout(async () => { 407 | logger.step(`Scheduled claim time reached.`); 408 | nextClaimTime = await attemptClaim(); 409 | scheduleNextCheck(); 410 | }, timeUntilNextCheck); 411 | }; 412 | 413 | scheduleNextCheck(); 414 | 415 | logger.success(`Bot is running! Airdrop claims will be attempted automatically.`); 416 | logger.info(`Press Ctrl+C to exit`); 417 | 418 | } catch (error) { 419 | logger.error(`Unexpected error: ${error.message}`); 420 | process.exit(1); 421 | } 422 | } 423 | 424 | runBot().finally(() => rl.close()); 425 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "interlink-auto-bot", 3 | "version": "1.0.0", 4 | "description": "Automated bot for claiming Interlink Labs airdrop tokens", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/vikitoshi/Interlink-Auto-Bot.git" 13 | }, 14 | "keywords": [ 15 | "interlink", 16 | "airdrop", 17 | "crypto", 18 | "bot", 19 | "automation" 20 | ], 21 | "author": "Airdrop Insiders", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/vikitoshi/Interlink-Auto-Bot/issues" 25 | }, 26 | "homepage": "https://github.com/vikitoshi/Interlink-Auto-Bot#readme", 27 | "dependencies": { 28 | "axios": "^1.6.2", 29 | "https-proxy-agent": "^7.0.2", 30 | "moment": "^2.29.4", 31 | "socks-proxy-agent": "^8.0.1" 32 | }, 33 | "engines": { 34 | "node": ">=16.0.0" 35 | } 36 | } -------------------------------------------------------------------------------- /proxies.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vikitoshi/Interlink-Auto-Bot/2701f4b33e9a4f729063f158e7ffd621c3cd8ebe/proxies.txt --------------------------------------------------------------------------------