Skip to content

Instantly share code, notes, and snippets.

@phdelodder
Last active November 4, 2020 06:43
Show Gist options
  • Save phdelodder/bed3453267a2c1c0c0b4d62ed52f58b0 to your computer and use it in GitHub Desktop.
Save phdelodder/bed3453267a2c1c0c0b4d62ed52f58b0 to your computer and use it in GitHub Desktop.
#!/bin/bash
timeout=5
username="admin"
password=""
motion_camera_id=1
filename="2020-11-03/23-54-29.mp4"
uri="/movie/$motion_camera_id/delete/$filename?_username=$username"
data="{}"
signature=$(echo -n "POST:$uri:$data:$password" | sha1sum | cut -d ' ' -f 1)
port="8765"
curl -s -S -m $timeout -H "Content-Type: application/json" -X POST "http://cctv.fritz.box:$port$uri&_signature=$signature" -d "$data" > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment