Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app = Flask(__name__)
- @app.route("/", methods=['GET', 'POST'])
- def camera_toggle():
- from_number = request.values.get('From', None)
- from_message = request.values.get('Body', None)
- resp = MessagingResponse()
- resp.message("Please enter your username:password")
- if ":" not in from_message:
- #Split the username/password, then somehow login??
- return str(resp)
- else:
- from_number = request.values.get('From', None)
- from_message = request.values.get('Body', None)
- if callers[from_number] == "John Doe":
- if from_message == "CameraON":
- subprocess.call(["bash", "camera.sh"])
- return str("Please enter the keyword to turn on the camera")
Add Comment
Please, Sign In to add comment