├── config.json ├── package.json ├── README.md └── index.js /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "password": "Defuk123#" 3 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "capcut", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "type": "module", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "@faker-js/faker": "^9.5.0", 15 | "chalk": "^5.4.1", 16 | "cheerio": "^1.0.0", 17 | "node-fetch": "^3.3.2" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Capcut Account Creator 2 | 3 | This project automates the creation of Capcut accounts using random email addresses and a predefined password. It fetches random email domains, generates random usernames, and registers accounts on Capcut. 4 | 5 | ## Prerequisites 6 | 7 | - Node.js (version 20 or higher) 8 | - npm or pnpm 9 | 10 | ## Installation 11 | 12 | 1. Clone the repository: 13 | ```sh 14 | git clone https://github.com/wahdalo/capcut-auto-regist.git 15 | cd capcut 16 | ``` 17 | 18 | 2. Install the dependencies: 19 | ```sh 20 | pnpm install 21 | ``` 22 | 23 | ## Configuration 24 | 25 | 1. Update the [config.json](http://_vscodecontentref_/0) file with the desired password: 26 | ```json 27 | { 28 | "password": "YourPasswordHere" 29 | } 30 | ``` 31 | 32 | ## Usage 33 | 34 | 1. Run the script: 35 | ```sh 36 | node index.js 37 | ``` 38 | 39 | Replace `` with the number of accounts you want to create. If not specified, it defaults to 1. 40 | 41 | ## License 42 | 43 | This project is licensed under the ISC License. -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import fetch from "node-fetch"; 2 | import * as cheerio from 'cheerio'; 3 | import chalk from 'chalk'; 4 | import { faker } from '@faker-js/faker'; 5 | import { promises as fs, readFileSync} from 'fs'; 6 | 7 | // 1. Baca config 8 | const config = JSON.parse(readFileSync('./config.json', 'utf-8')) 9 | 10 | function encryptToTargetHex(input) { 11 | let hexResult = ""; 12 | for (const char of input) { 13 | const encryptedCharCode = char.charCodeAt(0) ^ 0x05; 14 | hexResult += encryptedCharCode.toString(16).padStart(2, "0"); 15 | } 16 | return hexResult; 17 | } 18 | 19 | const getEmailRandom = async () => { 20 | try { 21 | const res = await fetch('https://generator.email/'); 22 | const text = await res.text(); 23 | const $ = cheerio.load(text); 24 | const result = []; 25 | $('.e7m.tt-suggestions').find('div > p').each(function (index, element) { 26 | result.push($(element).text()); 27 | }); 28 | return result; 29 | } catch (err) { 30 | console.error(chalk.red("Error generating email domains:", err.message)); 31 | return []; 32 | } 33 | }; 34 | 35 | const functionGetLink = async (email, domain) => new Promise((resolve, reject) => { 36 | fetch('https://generator.email/', { 37 | headers: { 38 | 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', 39 | 'accept-language': 'id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7', 40 | 'cookie': `_gid=GA1.2.989703044.1735637209; embx=%5B%22xaviermoen51%40dogonoithatlienha.com%22%2C%22sadahayuv%40jagomail.com%22%2C%22sadahayua%40jagomail.com%22%2C%22sadahayu%40jagomail.com%22%2C%22ajacoba%40auhit.com%22%5D; _ga=GA1.1.1696815852.1733235907; __gads=ID=08e2714256afd00c:T=1733235907:RT=1735638862:S=ALNI_MaFvYNYLhdTjGzS2xa3eZ3jls6QMQ; __gpi=UID=00000f7f6013ca38:T=1733235907:RT=1735638862:S=ALNI_MayYarsiugqTzh0Ky4wHiYNrSnGtQ; __eoi=ID=101f6e905a8358a1:T=1733235907:RT=1735638862:S=AA-AfjZCYAfxlwf-nyRYeP_9J9rE; FCNEC=%5B%5B%22AKsRol8j6KSk9Pga59DuS0D4a2pk72ZTqwfVO82pNZ4h-bO_EWCi04aWAU6ULkfWs6oHpsd6Cs949FJ6fmNfbqNhHt8GslL8Aa0Dzr20gerHRB_kL3qK8nW6DeD0WzT9KfeamIWXb1LyD2b7IDCPM94I8fUvBRcTqA%3D%3D%22%5D%5D; _ga_1GPPTBHNKN=GS1.1.1735637208.2.1.1735638882.38.0.0; surl=${domain}%2F${email}`, 41 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' 42 | }, 43 | redirect: 'follow' 44 | }) 45 | .then(res => res.text()) 46 | .then(async text => { 47 | const $ = cheerio.load(text); 48 | const src = $("#email-table > div.e7m.row.list-group-item > div.e7m.col-md-12.ma1 > div.e7m.mess_bodiyy > div > div > div:nth-child(2) > p:nth-child(2) > span").text().trim(); 49 | resolve(src) 50 | }) 51 | .catch(err => reject(err)); 52 | }); 53 | 54 | async function regist_sendRequest(encryptedEmail, encryptedPassword) { 55 | try { 56 | const url = new URL('https://www.capcut.com/passport/web/email/send_code/'); 57 | const queryParams = { 58 | aid: '348188', 59 | account_sdk_source: 'web', 60 | language: 'en', 61 | verifyFp: 'verify_m7euzwhw_PNtb4tlY_I0az_4me0_9Hrt_sEBZgW5GGPdn', 62 | check_region: '1' 63 | }; 64 | 65 | Object.entries(queryParams).forEach(([key, value]) => { 66 | url.searchParams.append(key, value); 67 | }); 68 | 69 | const formData = new URLSearchParams(); 70 | formData.append('mix_mode', '1'); 71 | formData.append('email', encryptedEmail); // Hex encoded 72 | formData.append('password', encryptedPassword); // XOR encoded 73 | formData.append('type', '34'); 74 | formData.append('fixed_mix_mode', '1'); 75 | const response = await fetch(url.toString(), { 76 | method: 'POST', 77 | headers: { 78 | 'Content-Type': 'application/x-www-form-urlencoded', 79 | }, 80 | body: formData 81 | }); 82 | const data = await response.json(); 83 | return data 84 | 85 | } catch (error) { 86 | console.error('Error:', error); 87 | } 88 | } 89 | 90 | async function verify_sendRequest(encryptedEmail, encryptedPassword, encryptedCode) { 91 | try { 92 | const originalDate = faker.date.birthdate() 93 | const dateObj = new Date(originalDate); 94 | const formattedDate = dateObj.toISOString().split('T')[0]; 95 | const url = new URL('https://www.capcut.com/passport/web/email/register_verify_login/'); 96 | const queryParams = { 97 | aid: '348188', 98 | account_sdk_source: 'web', 99 | language: 'en', 100 | verifyFp: 'verify_m7euzwhw_PNtb4tlY_I0az_4me0_9Hrt_sEBZgW5GGPdn', 101 | check_region: '1' 102 | }; 103 | 104 | Object.entries(queryParams).forEach(([key, value]) => { 105 | url.searchParams.append(key, value); 106 | }); 107 | const formData = new URLSearchParams(); 108 | formData.append('mix_mode', '1'); 109 | formData.append('email', encryptedEmail); 110 | formData.append('code', encryptedCode); 111 | formData.append('password', encryptedPassword); 112 | formData.append('type', '34'); 113 | formData.append('birthday', formattedDate); 114 | formData.append('force_user_region', 'ID'); 115 | formData.append('biz_param', '%7B%7D'); 116 | formData.append('check_region', '1'); 117 | formData.append('fixed_mix_mode', '1'); 118 | const response = await fetch(url.toString(), { 119 | method: 'POST', 120 | headers: { 121 | 'Content-Type': 'application/x-www-form-urlencoded', 122 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' // Contoh UA 123 | }, 124 | body: formData 125 | }); 126 | const data = await response.json(); 127 | return data 128 | 129 | } catch (error) { 130 | console.error('Error:', error); 131 | } 132 | } 133 | 134 | async function saveToFile(filename, data) { 135 | await fs.writeFile(filename, data, { flag: 'a' }); 136 | } 137 | 138 | // Jalankan fungsi 139 | 140 | (async () => { 141 | const loopCount = process.argv[2] ? parseInt(process.argv[2]) : 1; 142 | 143 | console.log(chalk.yellow(`Starting account creation loop (${loopCount} iterations)`)); 144 | 145 | for (let i = 1; i <= loopCount; i++) { 146 | try { 147 | console.log(chalk.cyan(`\n[Account ${i}/${loopCount}]`)); 148 | console.log(chalk.blue('Generating random email...')); 149 | 150 | const domainList = await getEmailRandom(); 151 | const domain = domainList[Math.floor(Math.random() * domainList.length)]; 152 | const name = faker.internet.username().toLowerCase().replace(/[^a-z0-9]/g, ''); 153 | const email = `${name}@${domain}`; 154 | console.log(chalk.green('Generated Email:'), email); 155 | const password = config.password; 156 | const encryptedHexEmail = encryptToTargetHex(email); 157 | const encryptedHexPassword = encryptToTargetHex(password); 158 | 159 | const reqnya = await regist_sendRequest(encryptedHexEmail, encryptedHexPassword); 160 | 161 | if (reqnya.message === "success") { 162 | console.log(chalk.blue('Waiting for verification email...')); 163 | 164 | let verificationCode; 165 | do { 166 | verificationCode = await functionGetLink(email.split('@')[0], email.split('@')[1]); 167 | if (!verificationCode) { 168 | await new Promise(resolve => setTimeout(resolve, 1000)); 169 | } 170 | } while (!verificationCode); 171 | 172 | console.log(chalk.green('Verification Code:'), verificationCode); 173 | const encryptedHexCode = encryptToTargetHex(verificationCode); 174 | 175 | const verifyData = await verify_sendRequest(encryptedHexEmail, encryptedHexPassword, encryptedHexCode); 176 | 177 | if (verifyData.message === "success") { 178 | const walletData = `${email}|${password}\n`; 179 | await saveToFile(`accounts.txt`, walletData); 180 | console.log(chalk.green('Account saved successfully')); 181 | } 182 | } else { 183 | console.log(chalk.red('Error creating account')); 184 | } 185 | } catch (error) { 186 | console.log(chalk.red(`Error in iteration ${i}:`), error.message); 187 | } 188 | } 189 | 190 | console.log(chalk.yellow('\nFinished all iterations!')); 191 | })() --------------------------------------------------------------------------------