scraperjavascript16240
TempMail 10-Minute Disposable Email & Inbox Poller
Engine email sementara otomatis untuk verifikasi akun, penerima OTP, dan bypass registrasi. Dilengkapi inbox listener otomatis.
Vamz Spectre29 Sep 2026334 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/tempmail-scraper" -o tempmail-scraper.js
# 2. Jalankan script
node tempmail-scraper.js
Dependencies npm yang Dibutuhkan:
npm install axiosPanduan Penggunaan:
// Instalasi: npm install axios // Penggunaan: node tempmail-scraper.js
tempmail-scraper.js(334 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
/**
* Temp Mail Scraper (Literal Pure / Raw Output)
* Providers: Mail.tm & Guerrilla Mail
* Author: Vamz Spectre (Vamx)
*
* Menghasilkan output murni (raw JSON) langsung dari upstream tanpa modifikasi/filter.
*
* Penggunaan CLI:
* node tempmail.js # Menjalankan demo lengkap & cetak output murni
* node tempmail.js domains # List domain aktif murni
* node tempmail.js create [username] [domain] [pwd] # Buat email & token baru murni
* node tempmail.js token <email> <password> # Dapatkan JWT token murni
* node tempmail.js inbox <token> # Cek inbox murni (Mail.tm)
* node tempmail.js message <token> <message_id> # Baca email detail murni
* node tempmail.js guerrilla-create # Buat email Guerrilla murni
* node tempmail.js guerrilla-inbox <sid_token> # Cek inbox Guerrilla murni
* node tempmail.js guerrilla-message <sid> <id> # Baca pesan Guerrilla murni
*/
const crypto = require("crypto");
const MAILTM_BASE = "https://api.mail.tm";
const GUERRILLA_BASE = "https://api.guerrillamail.com/ajax.php";
const USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36";
/**
* 1. Mail.tm - Get Active Domains (Murni)
*/
async function getMailTmDomains() {
const res = await fetch(`${MAILTM_BASE}/domains`, {
headers: { "User-Agent": USER_AGENT, Accept: "application/json" },
});
if (!res.ok) {
const errText = await res.text();
throw new Error(`Failed to get domains (${res.status}): ${errText}`);
}
return await res.json();
}
/**
* 2. Mail.tm - Create Account (Murni)
*/
async function createMailTmAccount(address, password) {
const res = await fetch(`${MAILTM_BASE}/accounts`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"User-Agent": USER_AGENT,
Accept: "application/json",
},
body: JSON.stringify({ address, password }),
});
const data = await res.json();
if (!res.ok) {
throw new Error(`Failed to create account (${res.status}): ${JSON.stringify(data)}`);
}
return data;
}
/**
* 3. Mail.tm - Get Auth Token (Murni)
*/
async function getMailTmToken(address, password) {
const res = await fetch(`${MAILTM_BASE}/token`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"User-Agent": USER_AGENT,
Accept: "application/json",
},
body: JSON.stringify({ address, password }),
});
const data = await res.json();
if (!res.ok) {
throw new Error(`Failed to get token (${res.status}): ${JSON.stringify(data)}`);
}
return data;
}
/**
* 4. Mail.tm - Get Account Info / Me (Murni)
*/
async function getMailTmMe(token) {
const res = await fetch(`${MAILTM_BASE}/me`, {
headers: {
Authorization: `Bearer ${token}`,
"User-Agent": USER_AGENT,
Accept: "application/json",
},
});
const data = await res.json();
if (!res.ok) {
throw new Error(`Failed to get account info (${res.status}): ${JSON.stringify(data)}`);
}
return data;
}
/**
* 5. Mail.tm - Get Messages / Inbox (Murni)
*/
async function getMailTmMessages(token, page = 1) {
const res = await fetch(`${MAILTM_BASE}/messages?page=${page}`, {
headers: {
Authorization: `Bearer ${token}`,
"User-Agent": USER_AGENT,
Accept: "application/json",
},
});
const data = await res.json();
if (!res.ok) {
throw new Error(`Failed to get messages (${res.status}): ${JSON.stringify(data)}`);
}
return data;
}
/**
* 6. Mail.tm - Get Single Message Detail (Murni)
*/
async function getMailTmMessage(token, messageId) {
const res = await fetch(`${MAILTM_BASE}/messages/${messageId}`, {
headers: {
Authorization: `Bearer ${token}`,
"User-Agent": USER_AGENT,
Accept: "application/json",
},
});
const data = await res.json();
if (!res.ok) {
throw new Error(`Failed to get message (${res.status}): ${JSON.stringify(data)}`);
}
return data;
}
/**
* 7. Mail.tm - Delete Message (Murni)
*/
async function deleteMailTmMessage(token, messageId) {
const res = await fetch(`${MAILTM_BASE}/messages/${messageId}`, {
method: "DELETE",
headers: {
Authorization: `Bearer ${token}`,
"User-Agent": USER_AGENT,
},
});
if (res.status === 204) {
return { success: true, statusCode: 204, message: "Message deleted successfully." };
}
const data = await res.json().catch(() => ({}));
return { success: res.ok, statusCode: res.status, data };
}
/**
* 8. Guerrilla Mail - Get Address (Murni)
*/
async function getGuerrillaAddress(lang = "en") {
const res = await fetch(`${GUERRILLA_BASE}?f=get_email_address&lang=${lang}`, {
headers: { "User-Agent": USER_AGENT, Accept: "application/json" },
});
return await res.json();
}
/**
* 9. Guerrilla Mail - Check Inbox (Murni)
*/
async function checkGuerrillaInbox(sidToken, seq = 0) {
const res = await fetch(`${GUERRILLA_BASE}?f=check_email&seq=${seq}&sid_token=${sidToken}`, {
headers: { "User-Agent": USER_AGENT, Accept: "application/json" },
});
return await res.json();
}
/**
* 10. Guerrilla Mail - Fetch Email Detail (Murni)
*/
async function fetchGuerrillaEmail(sidToken, emailId) {
const res = await fetch(`${GUERRILLA_BASE}?f=fetch_email&email_id=${emailId}&sid_token=${sidToken}`, {
headers: { "User-Agent": USER_AGENT, Accept: "application/json" },
});
return await res.json();
}
// Module Exports
if (typeof module !== "undefined" && module.exports) {
module.exports = {
getMailTmDomains,
createMailTmAccount,
getMailTmToken,
getMailTmMe,
getMailTmMessages,
getMailTmMessage,
deleteMailTmMessage,
getGuerrillaAddress,
checkGuerrillaInbox,
fetchGuerrillaEmail,
};
}
// CLI Execution Handler
if (require.main === module) {
const args = process.argv.slice(2);
const command = args[0] ? args[0].toLowerCase() : "demo";
(async () => {
try {
if (command === "domains") {
console.log("=== [Mail.tm] GET /domains (Output Murni) ===");
const rawDomains = await getMailTmDomains();
console.log(JSON.stringify(rawDomains, null, 2));
} else if (command === "create") {
const username = args[1] || `user_${crypto.randomBytes(4).toString("hex")}`;
let domain = args[2];
if (!domain) {
const domData = await getMailTmDomains();
domain = domData["hydra:member"]?.[0]?.domain || "uberip.com";
}
const password = args[3] || `Vamx${crypto.randomBytes(4).toString("hex")}!`;
const address = `${username}@${domain}`;
console.log(`=== [Mail.tm] POST /accounts for ${address} (Output Murni) ===`);
const account = await createMailTmAccount(address, password);
console.log(JSON.stringify(account, null, 2));
console.log(`\n=== [Mail.tm] POST /token for ${address} (Output Murni) ===`);
const token = await getMailTmToken(address, password);
console.log(JSON.stringify(token, null, 2));
} else if (command === "token") {
const address = args[1];
const password = args[2];
if (!address || !password) {
console.error("Usage: node tempmail.js token <email> <password>");
process.exit(1);
}
console.log(`=== [Mail.tm] POST /token for ${address} (Output Murni) ===`);
const token = await getMailTmToken(address, password);
console.log(JSON.stringify(token, null, 2));
} else if (command === "inbox") {
const token = args[1];
if (!token) {
console.error("Usage: node tempmail.js inbox <token>");
process.exit(1);
}
console.log("=== [Mail.tm] GET /messages (Output Murni) ===");
const messages = await getMailTmMessages(token);
console.log(JSON.stringify(messages, null, 2));
} else if (command === "message") {
const token = args[1];
const messageId = args[2];
if (!token || !messageId) {
console.error("Usage: node tempmail.js message <token> <message_id>");
process.exit(1);
}
console.log(`=== [Mail.tm] GET /messages/${messageId} (Output Murni) ===`);
const message = await getMailTmMessage(token, messageId);
console.log(JSON.stringify(message, null, 2));
} else if (command === "guerrilla-create") {
console.log("=== [Guerrilla Mail] get_email_address (Output Murni) ===");
const addr = await getGuerrillaAddress();
console.log(JSON.stringify(addr, null, 2));
} else if (command === "guerrilla-inbox") {
const sidToken = args[1];
if (!sidToken) {
console.error("Usage: node tempmail.js guerrilla-inbox <sid_token>");
process.exit(1);
}
console.log("=== [Guerrilla Mail] check_email (Output Murni) ===");
const inbox = await checkGuerrillaInbox(sidToken);
console.log(JSON.stringify(inbox, null, 2));
} else if (command === "guerrilla-message") {
const sidToken = args[1];
const mailId = args[2];
if (!sidToken || !mailId) {
console.error("Usage: node tempmail.js guerrilla-message <sid_token> <mail_id>");
process.exit(1);
}
console.log(`=== [Guerrilla Mail] fetch_email id=${mailId} (Output Murni) ===`);
const email = await fetchGuerrillaEmail(sidToken, mailId);
console.log(JSON.stringify(email, null, 2));
} else {
// Default Demo: Shows literally pure output from active endpoints
console.log("=================================================");
console.log(" DEMO SCRAPER TEMP MAIL - OUTPUT MURNI (RAW)");
console.log("=================================================\n");
console.log("1. [Mail.tm] GET /domains (Murni):");
const domains = await getMailTmDomains();
console.log(JSON.stringify(domains, null, 2));
const domain = domains["hydra:member"]?.[0]?.domain || "uberip.com";
const username = `vamx_${crypto.randomBytes(4).toString("hex")}`;
const password = `Vamx@${crypto.randomBytes(4).toString("hex")}!`;
const address = `${username}@${domain}`;
console.log(`\n2. [Mail.tm] POST /accounts -> ${address} (Murni):`);
const account = await createMailTmAccount(address, password);
console.log(JSON.stringify(account, null, 2));
console.log("\n3. [Mail.tm] POST /token (Murni):");
const tokenData = await getMailTmToken(address, password);
console.log(JSON.stringify(tokenData, null, 2));
console.log("\n4. [Mail.tm] GET /me (Murni):");
const me = await getMailTmMe(tokenData.token);
console.log(JSON.stringify(me, null, 2));
console.log("\n5. [Mail.tm] GET /messages (Murni):");
const messages = await getMailTmMessages(tokenData.token);
console.log(JSON.stringify(messages, null, 2));
console.log("\n6. [Guerrilla Mail] get_email_address (Murni):");
const guerrillaAddr = await getGuerrillaAddress();
console.log(JSON.stringify(guerrillaAddr, null, 2));
console.log("\n7. [Guerrilla Mail] check_email (Murni):");
const guerrillaInbox = await checkGuerrillaInbox(guerrillaAddr.sid_token);
console.log(JSON.stringify(guerrillaInbox, null, 2));
if (guerrillaInbox.list && guerrillaInbox.list.length > 0) {
const firstMailId = guerrillaInbox.list[0].mail_id;
console.log(`\n8. [Guerrilla Mail] fetch_email ID ${firstMailId} (Murni):`);
const guerrillaDetail = await fetchGuerrillaEmail(guerrillaAddr.sid_token, firstMailId);
console.log(JSON.stringify(guerrillaDetail, null, 2));
}
console.log("\n=================================================");
console.log(" PENGUJIAN OUTPUT MURNI SELESAI");
console.log("=================================================");
}
} catch (err) {
console.error("\n[Error]", err.message);
process.exit(1);
}
})();
}