forked from omermaksutii/olux
-
Notifications
You must be signed in to change notification settings - Fork 1
/
check2smtp.php
73 lines (63 loc) · 2.22 KB
/
check2smtp.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
<?php
ob_start();
session_start();
date_default_timezone_set('UTC');
include "includes/config.php";
if (!isset($_SESSION['sname']) and !isset($_SESSION['spass'])) {
header("location: ../");
exit();
}
$usrid = mysqli_real_escape_string($dbcon, $_SESSION['sname']);
function curl_get_contents($url)
{
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 8);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 8);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
$id = mysqli_real_escape_string($dbcon, $_GET['id']);
$sql = "SELECT * FROM smtps WHERE id=$id";
$query = mysqli_query($dbcon, $sql);
function srl($item)
{
$item0 = $item;
$item1 = rtrim($item0);
$item2 = ltrim($item1);
return $item2;
}
while ($row = mysqli_fetch_array($query))
$serverurl = $row['url'];
$d = explode("|", $serverurl);
$url = srl($d[0]);
$login = srl($d[1]);
$pass = srl($d[2]);
$port = srl($d[3]);
$sqlppp = "SELECT * FROM users where username='$usrid'";
$querypppp = mysqli_query($dbcon, $sqlppp);
while ($rozd = mysqli_fetch_array($querypppp))
$testemail = $rozd['testemail'];
$socks = "https://jerux.to/buyer/PortChecker.php?host=$url&port=$port";
$socks2 = curl_get_contents($socks);
if (preg_match('#Success!#', $socks2)) {
$urltoapi = "https://jerux.to/buyer/SMTPSend.php?host=$url&login=$login&pass=$pass&port=$port&id=$id&testmail=$testemail";
$urltoapi2 = curl_get_contents($urltoapi);
if (preg_match('#Message sent!#', $urltoapi2)) {
echo "<span class='label label-success'>Sent to $testemail (#$id)</span>";
return true;
} else {
echo "<span class='label label-danger'>Bad!</span>";
$sql = "UPDATE smtps SET sold='deleted' WHERE id='$id'";
$query = mysqli_query($dbcon, $sql);
}
} else {
echo "<span class='label label-danger'>Bad!</span>";
$sql = "UPDATE smtps SET sold='deleted' WHERE id='$id'";
$query = mysqli_query($dbcon, $sql);
}
?>