Giter Club home page Giter Club logo

prey-bash-client-modules's Introduction

Modules Repository for the Prey Bash Client

These modules provide the core functionality for the Prey Bash client. They are run when triggered remotely, either the official Control Panel (panel.preyproject.com) or through the Standalone Panel.

How they work

When enabled, Prey will call the ./run script located in the module's core/ directory, so in essence the only needed thing for a module to run is that file. However, Prey will also load additional scripts in case they are found in the module's path. These are:

  • /[module_name]/config -> For keeping settings
  • /[module_name]/functions -> Shared functions
  • /[module_name]/platform/{mac,linux,windows}/functions -> Platform-specific functions

This way you can separate shared logic from that which is platform specific.

When called

Prey runs modules in paralell, by calling the ./core/run scripts daemonized. Since they are called in the context of the running script (the main core logic), modules can access all variables previously defined by Prey. The most useful ones are:

  • $os (linux, mac or windows)
  • $logged_user
  • $root_path
  • $users_path
  • $home_path
  • $tmpbase
  • $tmpdir (random directory created by Prey for storing temporary data)

Additionally, Prey will also provide modules with utility variables for modules:

  • $module_path: /[module_name]/
  • $module_platform_path: /[module_name]/platform/{mac,linux,windows}

Available functions

Modules also get the helper functions defined in Prey's core/framework and core/functions files. A good way to see what you can do is to look at any of the existing modules and see how they store data or perform different actions.

(c) 2011 - Fork Ltd. Licensed under the GPLv3.

prey-bash-client-modules's People

Contributors

brightcloudy avatar clonedagain avatar cyaconi avatar dtorres avatar face avatar fanuneza avatar lakrits avatar mauricioschneider avatar rlinfati avatar tawood avatar tomas avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.