LucasMod

akunlama

Nov 9th, 2025
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 2.72 KB | Source Code | 0 0
  1. /*
  2.  @ Base: https://akunlama.com/
  3.  @ Author: Shannz
  4.  @ By: 𖧄 𝐋𝐔𝐂𝐀𝐒 𝐌𝐎𝐃 𝐃𝐎𝐌𝐈𝐍𝐀 𖧄
  5.  @ Canal: https://whatsapp.com/channel/0029Vb69bDnAe5VmzSMwBH11
  6. */
  7.  
  8. const axios = require('axios');
  9. const cheerio = require('cheerio');
  10.  
  11. const akunlama = {
  12. cekEmail: async (recipient) => {
  13. const url = `https://akunlama.com/api/v1/mail/list?recipient=${recipient}`;
  14. try {
  15. const response = await axios.get(url);
  16. if (Array.isArray(response.data) && response.data.length === 0) {
  17. return {
  18. status: 'disponível',
  19. email: `${recipient}@akunlama.com`
  20. };
  21. } else {
  22. return {
  23. status: 'já tomadas',
  24. message: 'Tente outra, esta funciona, mas alguém já a usou.'
  25. };
  26. }
  27. } catch (error) {
  28. throw error;
  29. }
  30. },
  31.  
  32. inbox: async (recipient) => {
  33. const url = `https://akunlama.com/api/v1/mail/list?recipient=${recipient}`;
  34. try {
  35. const response = await axios.get(url);
  36. const messages = response.data;
  37. if (!Array.isArray(messages) || messages.length === 0) {
  38. return [];
  39. }
  40. const formattedInbox = messages.map(item => ({
  41. region: item.storage.region,
  42. key: item.storage.key,
  43. timestamp: item.timestamp,
  44. sender: item.sender,
  45. subject: item.message.headers.subject,
  46. from: item.message.headers.from
  47. }));
  48. return formattedInbox;
  49. } catch (error) {
  50. throw error;
  51. }
  52. },
  53.  
  54. getInbox: async (region, key) => {
  55. const url = `https://akunlama.com/api/v1/mail/getHtml?region=${region}&key=${key}`;
  56. try {
  57. const response = await axios.get(url);
  58. const html = response.data;
  59. if (!html || typeof html !== 'string') {
  60. return { plainText: '', links: [] };
  61. }
  62. const $ = cheerio.load(html);
  63. $('script, style').remove();
  64. const plainText = $('body').text().replace(/\s+/g, ' ').trim();
  65. const links = [];
  66. $('a').each((i, el) => {
  67. const href = $(el).attr('href');
  68. if (href) {
  69. links.push({
  70. href: href,
  71. text: $(el).text().trim()
  72. });
  73. }
  74. });
  75. return {
  76. plainText: plainText,
  77. links: links
  78. };
  79. } catch (error) {
  80. throw error;
  81. }
  82. }
  83. };
  84.  
  85. module.exports = { akunlama }
  86.  
  87. /*
  88. EXEMPLO DE USO:
  89.  
  90. const { akunlama } = require('./akunlama');
  91.  
  92. async function contohPenggunaan() {
  93. try {
  94. const cek = await akunlama.cekEmail('username');
  95. console.log('Cek Email:', cek);
  96. const inbox = await akunlama.inbox('username');
  97. console.log('Inbox:', inbox);
  98. if (inbox.length > 0) {
  99. const emailPertama = inbox[0];
  100. const konten = await akunlama.getInbox(emailPertama.region, emailPertama.key);
  101. console.log('Konten Email:', konten);
  102. }
  103. } catch (error) {
  104. console.error('Error:', error.message);
  105. }
  106. }
  107. // contohPenggunaan();
  108.  
  109. FUNÇÕES:
  110. 1. cekEmail(destinatário) - Verifica a disponibilidade do nome de usuário/e-mail
  111. 2. inbox(destinatário) - Exibe uma lista de e-mails recebidos
  112. 3. getInbox(região, chave) - Lê o conteúdo de um e-mail específico
  113. */
Advertisement
Add Comment
Please, Sign In to add comment