Skip to content

π–²π—π–Ίπ—‹π–Όπ—ˆπ—‹π–Ύ π–²π–Ύπ—Œπ—Œπ—‚π—ˆπ—‡ is a high-performance session generator designed to streamline session management for Baileys-based WhatsApp bots. Built by 𝖬𝖺𝗅𝗏𝗂𝗇 π–ͺ𝗂𝗇𝗀, this tool ensures seamless authentication, secure pairing, and smooth bot operations.

Notifications You must be signed in to change notification settings

XdKing2/starcore-session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ Starcore Session

Ultra-Light Pair Session Generator for Baileys Bots
✨ One-click authentication β€’ Encrypted sessions β€’ Cross-platform Typing SVG

Typing Animation

WhatsApp Channel


Β 

Node Version Baileys Compatible License


πŸš€ Features

  • Base64 Session Support (starcore~ prefixed)
  • Auto-Restore after disconnections
  • Encrypted Credential Storage
  • QR Code + Pairing Code Fallback

Implementation Example

const fs = require('fs');
const path = require('path');

// Session directory setup
const sessionDir = path.join(__dirname, "./sessions");
const credsPath = path.join(sessionDir, "creds.json");

if (!fs.existsSync(sessionDir)) {
  fs.mkdirSync(sessionDir, { recursive: true });
}

/**
 * Decodes and saves a base64 session (starcore~ prefixed)
 * @param {string} base64Session - Format: "starcore~BASE64_DATA"
 */
async function loadBase64Session(base64Session) {
  try {
    if (!base64Session.startsWith("starcore~")) {
      throw new Error("Invalid format: Session must start with 'starcore~'");
    }

    const base64Data = base64Session.replace("starcore~", "");
    
    // Validate base64
    if (!/^[A-Za-z0-9+/=]+$/.test(base64Data)) {
      throw new Error("Invalid base64 characters detected");
    }

    // Decode and parse
    const decodedData = Buffer.from(base64Data, "base64");
    const sessionData = JSON.parse(decodedData.toString("utf-8"));

    // Save to file
    fs.writeFileSync(credsPath, decodedData);
    console.log("βœ… Session decoded and saved successfully");
    return sessionData;

  } catch (error) {
    console.error("❌ Base64 session error:", error.message);
    return null;
  }
}

// Usage Example:
const config = {
  SESSION_ID: "starcore~eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." // Your base64 session
};

if (config.SESSION_ID) {
  loadBase64Session(config.SESSION_ID).then(session => {
    if (!session) {
      console.log("πŸ”„ Falling back to QR/pairing code");
      // Initiate normal auth flow here
    }
  });
}

πŸ“¦ Installation

git clone https://github.com/XdKing2/starcore-session.git
cd starcore-session
npm install

About

π–²π—π–Ίπ—‹π–Όπ—ˆπ—‹π–Ύ π–²π–Ύπ—Œπ—Œπ—‚π—ˆπ—‡ is a high-performance session generator designed to streamline session management for Baileys-based WhatsApp bots. Built by 𝖬𝖺𝗅𝗏𝗂𝗇 π–ͺ𝗂𝗇𝗀, this tool ensures seamless authentication, secure pairing, and smooth bot operations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published