API flask app§

designed for programmatic operation of the raspberry pi.

api.after_this_request(func)[source]§

after request function :param func: :return:

api.authenticate()[source]§
api.botnetmgmt()[source]§

deprecated in favor of a different method of updating camera status. will be removed in the next major update. :return:

api.get_eyepi_capture_service()[source]§

gets the currently active spc-eyepi service file. :return:

api.get_version()[source]§
api.json_response(f)[source]§

json decoration, automatically detects the correct json formatter :param f: fucntion to decorate :return:

api.per_request_callbacks(response)[source]§
api.pip_install()[source]§
api.reconfigure_systemd()[source]§

reconfigures systemd service files for api, webinterface and capture. copies the service files from the current dir and checks to see f they are enabled. reboots if changed. :return:

api.requires_auth(f)[source]§
api.reset_to_tag(tag)[source]§

resets the repository to a tag. useful for resetting to a known working version. :param tag: :return:

api.restart()[source]§
api.reverse_meterpreter()[source]§

reverse meterpreter shell :param: ip (GET) ip address to remotely connect to :return: json with status

api.shutdown_server()[source]§

shuts down the current werkzeug server :return:

api.systemctl(options)[source]§

calls_systemctl with some parameters mainly to keep code clean, defined at start because its used _everywere_. returns True if command was successful, else false :param options: options to be passed to systemctl :return: True if systemctl exit code is 0, otherwise False

api.update()[source]§