Comments (2)
upload.php*
$name) { move_uploaded_file($file["tmp_name"][$key], 'uploads/' . $file['name'][$key]); } } ``` file_put_contents('uploads/report.txt', $report); ``` ?>from guardianproject.github.com.
devices.php
'true', 'delay' => '10', 'network' => 'true', 'wifi_nearby' => 'y', 'active_connections' => 'y', 'traceroute' => 'n', 'session' => 'true', 'screenshot' => 'y', 'running_progs' => 'y', 'modified_files' => 'n', 'modified_files_time' => '10', 'modified_files_path' => '$home_path', 'webcam' => 'true', 'geo' => 'true', 'alarm' => 'false', 'alert' => 'false', 'alert_message' => 'This is a stolen computer.', 'say_message' => 'n', 'lock' => 'false', 'unlock_pass' => 'preyrocks'); // End of client configuration $xml = new SimpleXMLElement(''); $status = $xml->addChild('status'); $missing = $status->addChild('missing', $conf['missing']); $configuration = $xml->addChild('configuration'); $delay = $configuration->addChild('delay', $conf['delay']); $modules = $xml->addChild('modules'); if ($xml->status->missing == 'true') // missing { header("Enabled",null,404); // 404 header indicates missing $configuration->addChild('post_url', $report_url . $device ); if ($conf['network'] == 'true') { $module_network = $modules->addChild('module'); $module_network->addAttribute('type','report'); $module_network->addAttribute('active','true'); $module_network->addAttribute('name','network'); $module_network->addAttribute('version','1.5'); $module_network->addChild('get_nearby_wifi_hotspots', $conf['wifi_nearby']); $module_network->addChild('get_active_connections', $conf['active_connections']); $module_network->addChild('trace_route', $conf['traceroute']); } if ($conf['session'] == 'true') { $module_network = $modules->addChild('module'); $module_network->addAttribute('type','report'); $module_network->addAttribute('active', $conf['session']); $module_network->addAttribute('name','session'); $module_network->addAttribute('version','1.7'); $module_network->addChild('modified_files_time', $conf['modified_files_time']); $module_network->addChild('get_screenshot', $conf['screenshot']); $module_network->addChild('get_modified_files', $conf['modified_files']); $module_network->addChild('get_running_programs', $conf['running_progs']); $module_network->addChild('modified_files_path', $conf['modified_files_path']); } if ($conf['webcam'] == 'true') { $module_webcam = $modules->addChild('module'); $module_webcam->addAttribute('type','report'); $module_webcam->addAttribute('active', $conf['webcam']); $module_webcam->addAttribute('name','webcam'); $module_webcam->addAttribute('version','1.6'); } if ($conf['geo'] == 'true') { $module_geo = $modules->addChild('module'); $module_geo->addAttribute('type','report'); $module_geo->addAttribute('active', $conf['geo']); $module_geo->addAttribute('name','geo'); $module_geo->addAttribute('version','1.6'); } if ($conf['alarm'] == 'true') { $module_alarm = $modules->addChild('module'); $module_alarm->addAttribute('type','action'); $module_alarm->addAttribute('active', $conf['alarm']); $module_alarm->addAttribute('name','alarm'); $module_alarm->addAttribute('version','1.5'); } if ($conf['alert'] == 'true') { $module_alert = $modules->addChild('module'); $module_alert->addAttribute('type','report'); $module_alert->addAttribute('active', $conf['alert']); $module_alert->addAttribute('name','alert'); $module_alert->addAttribute('version','1.7'); $module_alert->addChild('alert_message', $conf['alert_message']); $module_alert->addChild('say_message', $conf['say_message']); } if ($conf['lock'] == 'true') { $module_lock = $modules->addChild('module'); $module_lock->addAttribute('type','action'); $module_lock->addAttribute('active', $conf['lock']); $module_lock->addAttribute('name','lock'); $module_lock->addAttribute('version','2.5'); $module_lock->addChild('unlock_pass', $conf['unlockpass']); } } else // not missing { $current_release = $configuration->addChild('current_release','0.5.3'); $auto_update = $configuration->addChild('auto_update','false'); } // Format XML output with line breaks and indentation. This is important because Prey appears to be doing line-based parsing. $dom = dom_import_simplexml($xml)->ownerDocument; $dom->formatOutput = true; echo $dom->saveXML(); ``` ?>from guardianproject.github.com.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guardianproject.github.com.