-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathscript.js
160 lines (144 loc) · 5.31 KB
/
script.js
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
const checkBtn = document.getElementById("check-btn");
const aliNumbersDiv = document.getElementById("ali-numbers");
const muhammadNumbersDiv = document.getElementById("muhammad-numbers");
const muradNumbersDiv = document.getElementById("murad-numbers");
const stopCheckBtn = document.getElementById("stop-check-btn");
let updateNumbers;
// Function to perform Luhn check (standard and Amex)
function isValidCreditCard(number) {
// Remove non-digit characters
number = number.replace(/\D/g, '');
// Check if it's potentially a valid credit card number
if (!/^(?:3[47][0-9]{13}|4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/.test(number)) {
return false;
}
let sum = 0;
let alternate = false;
for (let i = number.length - 1; i >= 0; i--) {
let n = parseInt(number.substring(i, i + 1));
if (alternate) {
n *= 2;
if (n > 9) {
n = (n % 10) + 1;
}
}
sum += n;
alternate = !alternate;
}
return (sum % 10) === 0;
}
checkBtn.addEventListener("click", function () {
const numbers = document.getElementById("numbers").value;
const numberArray = numbers.split("\n").filter((number) => {
return number.trim() !== "";
});
aliNumbersDiv.innerHTML = "";
muhammadNumbersDiv.innerHTML = "";
muradNumbersDiv.innerHTML = "";
checkBtn.classList.add("shake");
setTimeout(() => {
checkBtn.classList.remove("shake");
}, 500);
let aliList = [];
let muhammadList = [];
let muradList = [];
for (let i = 0; i < numberArray.length; i++) {
const line = numberArray[i].trim();
const cardNumber = line.split("|")[0].trim();
// CORRECTED LOGIC:
// 1. Perform Luhn check FIRST
if (!isValidCreditCard(cardNumber)) {
muradList.push(`<span style='color:grey; font-weight:bold;'>Invalid (Luhn Check)</span> | ${line} /OshekherO`);
// If invalid, continue to the next card
continue;
}
// 2. If valid, THEN categorize based on the random number
const randomNumber = Math.random();
if (randomNumber < 0.2) {
aliList.push(`<span style='color:green; font-weight:bold;'>Live</span> | ${line} -> [Charge <span style='color:green; font-weight:bold;'>$4,99</span>] [GATE:01]. /OshekherO`);
} else if (randomNumber < 0.9) {
muhammadList.push(`<span style='color:red; font-weight:bold;'>Dead</span> | ${line} -> [Charge <span style='color:red; font-weight:bold;'>$0,00</span>] [GATE:01]. /OshekherO`);
} else {
muradList.push(`<span style='color:orange; font-weight:bold;'>Unknown</span> | ${line} -> [Charge <span style='color:orange; font-weight:bold;'>N/A</span>] [GATE:01]. /OshekherO`);
}
}
let aliCount = 0;
let muhammadCount = 0;
let muradCount = 0;
const minDelay = 2000;
const maxDelay = 5000;
let i = 0;
updateNumbers = setInterval(() => {
if (i < aliList.length) {
aliCount++;
aliNumbersDiv.innerHTML += aliList[i] + "<br>";
document.getElementById("ali-count").innerHTML = "Checked: " + aliCount;
}
if (i < muhammadList.length) {
muhammadCount++;
muhammadNumbersDiv.innerHTML += muhammadList[i] + "<br>";
document.getElementById("muhammad-count").innerHTML = "Checked: " + muhammadCount;
}
if (i < muradList.length) {
muradCount++;
muradNumbersDiv.innerHTML += muradList[i] + "<br>";
document.getElementById("murad-count").innerHTML = "Checked: " + muradCount;
}
i++;
if (i >= aliList.length && i >= muhammadList.length && i >= muradList.length) {
clearInterval(updateNumbers);
Swal.fire({
title: "Checking completed!",
text: "All CC have been checked successfully.",
icon: "success",
confirmButtonText: "Okay",
});
checkBtn.disabled = false;
stopCheckBtn.disabled = true;
document.getElementById("numbers").value = "";
}
}, Math.floor(Math.random() * (maxDelay - minDelay + 1) + minDelay));
});
// copy buttons
const copyButtons = document.querySelectorAll(".copy-btn");
copyButtons.forEach(function (button) {
button.addEventListener("click", function () {
const parentElement = button.parentElement;
const text = parentElement.innerHTML.replace(/<\/?[^>]+(>|$)/g, "").trim();
navigator.clipboard.writeText(text);
button.classList.add("copied");
const span = document.createElement("span");
span.innerHTML = "Copied!";
span.style.color = "green";
span.style.marginLeft = "5px";
button.parentNode.insertBefore(span, button.nextSibling);
setTimeout(function () {
button.classList.remove("copied");
span.remove();
}, 2000);
});
});
// stop check button
stopCheckBtn.addEventListener("click", function () {
clearInterval(updateNumbers);
Swal.fire({
title: "Checking stopped!",
text: "The checking process has been stopped.",
icon: "error",
confirmButtonText: "Okay",
});
stopCheckBtn.disabled = true;
checkBtn.disabled = false;
stopCheckBtn.classList.add("shake");
setTimeout(() => {
stopCheckBtn.classList.remove("shake");
}, 500);
});
// toggle buttons
function toggleButtons() {
const checkBtn = document.getElementById("check-btn");
const stopCheckBtn = document.getElementById("stop-check-btn");
checkBtn.disabled = true;
stopCheckBtn.disabled = false;
stopCheckBtn.style.backgroundColor = "green";
}