-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathview.php
More file actions
255 lines (168 loc) · 5.46 KB
/
view.php
File metadata and controls
255 lines (168 loc) · 5.46 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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<?php
/*
* Copyright (c) 2019-2020 Barchampas Gerasimos <makindosxx@gmail.com>.
* proxior is a wifi interception.
*
* proxior is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* proxior is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
session_start();
if (!isset($_SESSION['login']))
{
header("Location: index.php");
}
else
{
require('__ROOT__/class_cn.php');
$obj = new security;
$host=$obj->connect[0];
$user=$obj->connect[1];
$pass=$obj->connect[2];
$db=$obj->connect[3];
$conn = new mysqli($host,$user,$pass,$db);
if($conn->connect_error)
{
die ("Cannot connect to server " .$conn->connect_error);
}
else
{
$ses_login = $_SESSION['login'];
$ip_addr = $_SERVER['REMOTE_ADDR'];
$path = $_SERVER['REQUEST_URI'];
$date_now = date("Y-m-d H:i:s");
$sql = "insert into prox_log_file (username,ip_addr,path,connect)
values('$ses_login','$ip_addr','$path',NOW())";
$result = $conn->query($sql);
} // end of else connection
$conn->close();
} // end else session
?>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title> Proxior </title>
<link rel="shortcut icon" href="img/logo.png">
<meta HTTP-EQUIV="REFRESH" content="900; url=logout.php">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(showLocation);
}else{
$('#location').html('Geolocation is not supported by this browser.');
}
});
function showLocation(position)
{
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
//var admin = window.location.href;
var str = window.location.href;
var user = str.split('=').pop();
$.ajax({
type:'POST',
url:'view.php',
data:{
user : user,
latitude : latitude,
longitude : longitude
},
success:function(msg)
{
if(msg)
{
$("#location").html(msg)
}
else
{
$("#location").html('Not Available');
}
}
});
}
</script>
<style>
body
{
background: url(img/radar.gif);
background-repeat: no-repeat;
background-size:20%;
background-position: 50% 50%;
background-color:#22252a;
}
.blink_me {
animation: blinker 2s linear infinite;
color: white;
font-weight: bold;
font-size: 50px;
}
@keyframes blinker {
50% {
opacity: 0;
}
}
</style>
</head>
<body>
<p> <span id="location"></span></p>
<h1 align="center">
<font color="white"> Proxior Devices </font>
<hr style="width:100%;">
</h1>
<!-- <div class="blink_me" align="center"> SEARCH LOCATION </div> -->
</body>
</html>
<?php
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
require('__DEV__/function.php');
//require('__ROOT__/class_cn.php');
$obj = new security;
$host=$obj->connect[0];
$user=$obj->connect[1];
$pass=$obj->connect[2];
$db=$obj->connect[3];
$conn = new mysqli($host,$user,$pass,$db);
if($conn->connect_error)
{
die ("Cannot connect to server " .$conn->connect_error);
}
else
{
$device_id = $_SERVER["REMOTE_ADDR"];
$last_ip = $_SERVER["REMOTE_ADDR"];
$user_finger = $_SESSION['fingerprint'];
$user = $_POST['user'];
$latitude = $_POST['latitude'];
$longitude = $_POST['longitude'];
$instant = date ('d-m-Y H:i:s');
$instant2 = date ('dmYHis');
$radial_tracking = "150 meters";
$address = "Here";
$all_info = "{ lat: " . $latitude . ", " . "lng: " . $longitude . ", " . "info: " . "''" . "Device Fingerprint: " . $device_id . " <br> " ."Activation moment: " . $instant . " <br> " . "Radial Tracking: " . $radial_tracking . " <br> " ."Address: " . $address . "''" . " }";
$all_info2 = "$instant2: {center: {lat: $latitude, lng: $longitude},population: 150 }";
$time_of_renewal = 1;
if (!empty($admin . $$latitude . $longitude))
{
$sql_norm_dev = "insert into prox_devices(user,device_id, last_ip, latitude, longitude, address, fingerprint, all_info, all_info2) values ('$user','$device_id','$last_ip','$latitude','$longitude','$address','$user_finger','$all_info','$all_info2')";
$sql_back_dev = "insert into prox_backup_devices(user,device_id, last_ip, latitude, longitude, address, fingerprint, all_info,all_info2) values ('$user','$device_id','$last_ip','$latitude','$longitude','$address','$user_finger','$all_info','$all_info2')";
$result_norm_dev = $conn->query($sql_norm_dev);
$result_back_dev = $conn->query($sql_back_dev);
sleep($time_of_renewal);
} // check for empty fields
} // end of else connect
$conn->close();
?>