updating
This commit is contained in:
@@ -17,7 +17,7 @@ from base64 import b64decode, b64encode
|
||||
|
||||
# global vars
|
||||
location = "/home/pi/final/videos/" # location of video files, subfolders "plaintext" and "encrypted" assumed to exist
|
||||
seconds = 3 # seconds to record video for
|
||||
seconds = int(open("interval", "r").read()) # seconds to record video for
|
||||
|
||||
# helps with video recording
|
||||
def handler(s, f):
|
||||
@@ -61,7 +61,7 @@ def encryptVideo(file):
|
||||
with open(location+"encrypted/" + numFiles() + ".mpc", "wb") as encf:
|
||||
encf.write(enc)
|
||||
# save the key
|
||||
with open("keys/" + numFiles() + ".asc", "wb") as keyf:
|
||||
with open("keys/" + str(int(numFiles()) - 1) + ".asc", "wb") as keyf:
|
||||
keyf.write(encryptPGP(key))
|
||||
|
||||
# record the video and store in file location
|
||||
|
||||
@@ -20,8 +20,8 @@ host = '10.25.10.18' # IP of server that will recieve, not this device
|
||||
port = 12352
|
||||
|
||||
location = "/home/pi/final/"
|
||||
vidset = [file for file in glob.glob(location + "videos/encrypted/*", recursive=False)]
|
||||
keyset = [file for file in glob.glob(location + "keys/*", recursive=False)]
|
||||
vidset = [file for file in glob.glob(location + "videos/encrypted/*.mpc", recursive=False)]
|
||||
keyset = [file for file in glob.glob(location + "keys/*.asc", recursive=False)]
|
||||
if len(vidset) != len(keyset):
|
||||
print("Video and keyfiles are not properly matched")
|
||||
exit()
|
||||
|
||||
Reference in New Issue
Block a user