-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwa.php
67 lines (65 loc) · 2.09 KB
/
wa.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
<?php
// Copyright (c) 2022-2024 Tuber Boy. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
set_time_limit(0);
error_reporting(0);
function check_number($number) {
$url = "https://api.whatsapp.com/send/?phone=".$number."&text&type=phone_number&app_absent=0";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
'Accept-Encoding: ',
'Accept-Language: en-US,en;q=0.9',
'sec-ch-ua: "Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"',
'sec-ch-ua-mobile: ?0',
'sec-ch-ua-platform: "Windows"',
'Sec-Fetch-Dest: document',
'Sec-Fetch-Mode: navigate',
'Sec-Fetch-Site: none',
'Sec-Fetch-User: ?1',
'Upgrade-Insecure-Requests: 1',
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36'
]);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$result = curl_exec($ch);
preg_match('/"_9vd5 _9scb _9scr">(.+?)</', $result, $matched);
if ($matched[1] != null) {
return $matched[1];
} else {
return false;
}
}
wa:
echo "First Range (14044625390): ";
$first = trim(fgets(STDIN));
echo "Last Range (19999999999): ";
$last = trim(fgets(STDIN));
if($last <= $first){
echo "The number format is incorrect!\n";
goto wa;
} else {
$a = 1;
$b = 0;
$c = 0;
for($i = $first; $i <= $last; $i++) {
$number = $i;
$check = check_number($number);
if($check !== false) {
echo "[$a] Number: \033[32m$number\033[0m detected: \033[34m$check\033[0m\n";
$f = fopen("whatsapp_number.txt", "a");
fwrite($f, $number."|".$check.PHP_EOL);
fclose($f);
} else {
echo "[$a] Number is invalid: \033[31m$number\033[0m\n";
$c++;
}
$a++;
}
}
goto wa;
?>