New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

amprem

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons
Malware was recently detected in this package.

Affected versions:

0.0.0-stage0.0.1-security0.0.10.0.21.0.0
+2 more

amprem

API Scraper untuk Alight Motion Premium Activator

unpublished
npmnpm
Version
0.0.2
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

AmPrem Activator

Alight Motion Premium Activator — NPM Package untuk bypass AES-128-CBC Cookie authentication dan aktivasi lisensi premium otomatis.

License: MIT Node.js

📋 Table of Contents

Apa itu?

AmPrem Activator adalah package Node.js yang mengotomatisasi proses aktivasi lisensi Alight Motion Premium. Package ini menangani:

  • AES Cookie Bypass — Automatically decrypt AES-128-CBC encrypted cookie dari server
  • Email Verification — Send verification links ke email target
  • Magic Link Processing — Verify magic links untuk activate premium licenses

Cocok untuk:

  • Batch activation workflows
  • Automated testing
  • Account management automation
  • API research

Features

✅ AES-128-CBC Cookie Bypass — Otomatis extract dan decrypt cookies dari server
✅ Email Verification API — Send verification links dengan mudah
✅ Magic Link Verification — Verify links untuk activate premium
✅ Error Handling — Comprehensive error messages dan validation
✅ Zero Dependencies — Hanya gunakan Node.js built-in modules
✅ Clean API — Simple, intuitive methods
✅ Modular Code — Mudah di-extend atau di-customize

Installation

npm install amprem

Quick Start

Basic Usage (3 steps)

const AmPrem = require('amprem');

// Step 1: Send verification link to email
const sendResponse = await AmPrem.sendLink('user@example.com');
console.log(sendResponse);
// Output: { status: true, message: "Link sent to email" } atau error response

// Step 2: Wait for user to click link in email dan get magic link URL

// Step 3: Verify the magic link to activate premium
const verifyResponse = await AmPrem.verifyLink('user@example.com', 'https://...magic-link-url...');
console.log(verifyResponse);
// Output: { status: true, message: "Premium activated", ... }

Complete Workflow Example

const AmPrem = require('amprem');

async function activatePremium() {
  try {
    // Send link
    console.log('📧 Sending verification link...');
    const send = await AmPrem.sendLink('john@gmail.com');
    console.log('Response:', send);
    
    // User receives email, clicks link, gets magic link URL
    // Misal: https://alight-motion-premium.site.je/verify?token=abc123
    
    // Verify link
    console.log('\n🔗 Verifying magic link...');
    const verify = await AmPrem.verifyLink(
      'john@gmail.com',
      'https://alight-motion-premium.site.je/verify?token=abc123'
    );
    console.log('Response:', verify);
    
    if (verify.status) {
      console.log('✅ Premium activated successfully!');
    }
  } catch (error) {
    console.error('❌ Error:', error.message);
  }
}

activatePremium();

API Reference

AmPrem.sendLink(email)

Mengirim verification link ke email target.

Parameters:

{
  email: string  // Email address yang valid (harus mengandung @)
}

Returns:

Promise<Object|string>

Response Examples:

Success:

{
  "status": true,
  "message": "Verification link sent to email",
  "email": "user@example.com"
}

Error:

{
  "status": false,
  "message": "Email already registered"
}

Throws:

  • Error: Email tidak valid atau kosong — Email format invalid atau empty
  • Error: Gagal mengekstrak parameter AES dari server — Server tidak return expected data

Usage:

const AmPrem = require('amprem');

try {
  const response = await AmPrem.sendLink('user@example.com');
  
  if (response.status) {
    console.log('Link sent successfully');
  } else {
    console.log('Error:', response.message);
  }
} catch (error) {
  console.error('Exception:', error.message);
}

Memverifikasi magic link untuk mengaktifkan premium license.

Parameters:

{
  email: string,  // Email yang sebelumnya digunakan di sendLink()
  link: string    // Magic link URL dari email (full URL)
}

Returns:

Promise<Object|string>

Response Examples:

Success:

{
  "status": true,
  "message": "License activated",
  "premium": true,
  "expiryDate": "2026-08-05"
}

Error:

{
  "status": false,
  "message": "Invalid or expired link"
}

Throws:

  • Error: Email dan Magic Link wajib diisi — Missing email atau link parameter
  • Error: Gagal mengekstrak parameter AES dari server — Server connection issue

Usage:

const AmPrem = require('amprem');

try {
  const response = await AmPrem.verifyLink(
    'user@example.com',
    'https://alight-motion-premium.site.je/verify?token=xyz789'
  );
  
  if (response.status) {
    console.log('✅ Premium activated!');
  } else {
    console.log('❌ Activation failed:', response.message);
  }
} catch (error) {
  console.error('Exception:', error.message);
}

Usage Examples

Example 1: Single Email Activation

const AmPrem = require('amprem');

async function activateUser(email, magicLink) {
  try {
    // Send link
    const sendRes = await AmPrem.sendLink(email);
    console.log('Send response:', sendRes);
    
    // Verify link
    const verifyRes = await AmPrem.verifyLink(email, magicLink);
    console.log('Verify response:', verifyRes);
    
    return verifyRes;
  } catch (err) {
    console.error('Error:', err.message);
    return null;
  }
}

// Usage
activateUser('john@gmail.com', 'https://...link...');

Example 2: Batch Activation

const AmPrem = require('amprem');

async function batchActivate(users) {
  const results = [];
  
  for (const user of users) {
    try {
      console.log(`Processing ${user.email}...`);
      
      // Send link
      const send = await AmPrem.sendLink(user.email);
      
      if (!send.status) {
        results.push({
          email: user.email,
          success: false,
          error: send.message
        });
        continue;
      }
      
      // Assume user gets link and magicLink is extracted
      const verify = await AmPrem.verifyLink(user.email, user.magicLink);
      
      results.push({
        email: user.email,
        success: verify.status,
        message: verify.message
      });
    } catch (err) {
      results.push({
        email: user.email,
        success: false,
        error: err.message
      });
    }
  }
  
  return results;
}

// Usage
const users = [
  { email: 'user1@gmail.com', magicLink: 'https://...link1...' },
  { email: 'user2@gmail.com', magicLink: 'https://...link2...' },
  { email: 'user3@gmail.com', magicLink: 'https://...link3...' }
];

batchActivate(users).then(results => {
  console.log('Results:', JSON.stringify(results, null, 2));
});

Example 3: With Custom Error Handling

const AmPrem = require('amprem');

async function smartActivate(email, magicLink) {
  try {
    console.log('Sending link to:', email);
    const sendRes = await AmPrem.sendLink(email);
    
    // Check if send was successful
    if (!sendRes.status) {
      if (sendRes.message.includes('already registered')) {
        console.log('⚠️ Email already registered');
        return 'ALREADY_REGISTERED';
      }
      throw new Error(`Send failed: ${sendRes.message}`);
    }
    
    console.log('Verifying link...');
    const verifyRes = await AmPrem.verifyLink(email, magicLink);
    
    if (!verifyRes.status) {
      if (verifyRes.message.includes('expired')) {
        console.log('⚠️ Link expired');
        return 'LINK_EXPIRED';
      }
      throw new Error(`Verify failed: ${verifyRes.message}`);
    }
    
    console.log('✅ Activation successful!');
    return 'SUCCESS';
    
  } catch (error) {
    console.error('Exception caught:', error.message);
    
    if (error.message.includes('Email tidak valid')) {
      return 'INVALID_EMAIL';
    } else if (error.message.includes('AES')) {
      return 'SERVER_ERROR';
    } else {
      return 'UNKNOWN_ERROR';
    }
  }
}

// Usage
smartActivate('user@example.com', 'https://...link...')
  .then(status => console.log('Final status:', status));

Example 4: Promise.all untuk Concurrent Requests

const AmPrem = require('amprem');

async function parallelActivate(emailList) {
  // Send all links concurrently
  const sendPromises = emailList.map(email =>
    AmPrem.sendLink(email).catch(err => ({ error: err.message }))
  );
  
  const sendResults = await Promise.all(sendPromises);
  
  // Check results
  const successfulEmails = emailList.filter((email, idx) => 
    sendResults[idx].status === true
  );
  
  console.log(`Sent to ${successfulEmails.length}/${emailList.length} emails`);
  
  return sendResults;
}

// Usage
const emails = ['user1@gmail.com', 'user2@gmail.com', 'user3@gmail.com'];
parallelActivate(emails);

How It Works

High-Level Flow

User Request
    ↓
[1] getCookie() — Bypass AES encryption
    ├─ Fetch base page
    ├─ Extract AES parameters (key, IV, encrypted)
    └─ Decrypt AES-128-CBC → get session cookie
    ↓
[2] sendLink(email) — Send verification
    ├─ Use decrypted cookie
    ├─ POST /index.php?action=send_eceran
    └─ Server sends email to user
    ↓
[3] User receives email, clicks link
    ├─ Gets magic link URL
    └─ Extracts link parameter
    ↓
[4] verifyLink(email, link) — Activate premium
    ├─ Use decrypted cookie
    ├─ POST /index.php?action=verify_eceran
    └─ Server activates premium license
    ↓
Success Response

Step 1: Fetch Base Page

GET https://alight-motion-premium.site.je/
User-Agent: Mozilla/5.0 ...

Step 2: Extract HTML Parameters

Server returns HTML dengan:

<script>
  a=toNumbers("48c9f404a8d03a48...")  // Key (hex)
  b=toNumbers("c82a8a7c2f9e1b4c...")  // IV (hex)
  c=toNumbers("7d2e4f8c9a1b3e5f...")  // Encrypted cookie (hex)
</script>

Step 3: Decrypt AES-128-CBC

Algorithm: AES-128-CBC
Key: a (converted from hex)
IV: b (converted from hex)
Encrypted: c (converted from hex)
Auto-padding: Disabled

Step 4: Convert to Hex

Decrypted bytes → Convert to hex string
Example: [120, 45, 230, ...] → "782de6..."

Step 5: Use as Cookie

Cookie: __test=782de6...

Sekarang cookie ini bisa digunakan di requests berikutnya.

Technical Details: AES-128-CBC

  • Algorithm: AES (Advanced Encryption Standard)
  • Mode: CBC (Cipher Block Chaining)
  • Key Size: 128 bits (16 bytes)
  • Block Size: 128 bits (16 bytes)
  • IV Size: 128 bits (16 bytes)
  • Padding: None (manual handling)
// Node.js crypto code
const crypto = require('crypto');
const decipher = crypto.createDecipheriv('aes-128-cbc', key, iv);
decipher.setAutoPadding(false); // Important!
const decrypted = Buffer.concat([
  decipher.update(encrypted),
  decipher.final()
]);

Error Handling

Common Errors & Solutions

Error 1: Email tidak valid atau kosong

Cause: Email parameter missing atau format invalid

Solution:

// ❌ Wrong
await AmPrem.sendLink('');
await AmPrem.sendLink('notanemail');

// ✅ Correct
await AmPrem.sendLink('user@example.com');

Check:

function validateEmail(email) {
  return email && email.includes('@') && email.includes('.');
}

if (validateEmail(email)) {
  await AmPrem.sendLink(email);
}

Cause: Missing email atau link parameter di verifyLink()

Solution:

// ❌ Wrong
await AmPrem.verifyLink('user@example.com');
await AmPrem.verifyLink('', 'https://...');

// ✅ Correct
await AmPrem.verifyLink('user@example.com', 'https://...full-link...');

Error 3: Gagal mengekstrak parameter AES dari server

Cause: Server doesn't return expected HTML structure (server down, changed, blocked)

Solution:

try {
  await AmPrem.sendLink(email);
} catch (err) {
  if (err.message.includes('AES')) {
    console.log('Server error - try again later');
    // Retry logic
    setTimeout(() => retry(), 5000);
  }
}

Error 4: Response is string (unexpected)

Cause: Server returned plain text instead of JSON

Solution:

const response = await AmPrem.sendLink(email);

if (typeof response === 'string') {
  // Server returned plain text
  console.log('Server response:', response);
} else if (response.status === false) {
  // Server returned error JSON
  console.log('Error:', response.message);
} else {
  // Success
  console.log('Success:', response);
}

Error Handling Best Practices

async function safeActivate(email, magicLink) {
  try {
    // Input validation
    if (!email || !email.includes('@')) {
      throw new Error('Invalid email format');
    }
    
    if (!magicLink || !magicLink.startsWith('http')) {
      throw new Error('Invalid magic link format');
    }
    
    // Execute
    const result = await AmPrem.verifyLink(email, magicLink);
    
    // Response validation
    if (typeof result === 'string') {
      console.warn('Unexpected response type (string)');
      return { success: false, error: result };
    }
    
    return {
      success: result.status === true,
      message: result.message || result
    };
    
  } catch (error) {
    return {
      success: false,
      error: error.message,
      timestamp: new Date().toISOString()
    };
  }
}

Architecture

Module Structure

amprem/
│
├── index.js (Main Class)
│   └── Exports: AmPrem
│       ├── sendLink(email)
│       └── verifyLink(email, link)
│
└── lib/
    ├── api.js (API Handler)
    │   └── AmPremAPI class
    │       ├── getCookie() → fetch + decrypt AES
    │       └── fetchAPI() → make HTTP requests
    │
    └── aes.js (Cryptography)
        ├── toNumbers(hex) → convert hex to array
        ├── toHex(array) → convert array to hex
        └── decryptAES() → AES-128-CBC decryption

Performance Characteristics

  • sendLink(): ~500-1000ms (includes cookie fetch + AES decrypt)
  • verifyLink(): ~300-500ms (uses cached logic)
  • Cookie extraction: ~400-700ms (depends on server response)
  • AES decryption: ~10-20ms (fast, local operation)

License

MIT License — See LICENSE file

© 2026 VinnxsynC

Permission to use, modify, distribute freely for any purpose.

📞 Contact Developer

For questions, support, or collaboration, feel free to contact the developer:

Keywords

alightmotion

FAQs

Package last updated on 13 Aug 2026

Related posts