forked from domingopa/WhatsAPI-Official
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresetAccount.php
More file actions
42 lines (30 loc) · 933 Bytes
/
Copy pathresetAccount.php
File metadata and controls
42 lines (30 loc) · 933 Bytes
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
<?php
require_once '../src/whatsprot.class.php';
$debug = false;
echo "####################\n";
echo "# #\n";
echo "# WA RESET #\n";
echo "# #\n";
echo "####################\n";
echo "\n\nUsername (country code + number without + or 00): ";
$username = trim(fgets(STDIN));
// Create a instance of WhastPort.
$w = new WhatsProt($username, '', $debug);
echo "\n\nYour accounts password: ";
$pw = trim(fgets(STDIN));
$w->connect();
try {
$w->loginWithPassword($pw);
} catch (Exception $e) {
echo "Failed to login, make sure your account is not blocked (use blockChecker.php) or check if your password is right\n\n";
exit(0);
}
$w->sendRemoveAccount();
$i = 0;
for ($i; $i < 5; $i++) {
$w->pollMessage();
}
$w->disconnect();
unlink("../src/wadata/id.$username.dat");
unlink("../src/wadata/nextChallenge.$username.dat");
echo "\n\n OK! Now use registerTool.php \n\n";