Video kuzatuv ilovalari uchun asosiy xavfsizlik talablari


Download 265.9 Kb.
bet2/3
Sana31.03.2023
Hajmi265.9 Kb.
#1311365
1   2   3
Bog'liq
Video kuzatuv ilovalari uchun asosiy xavfsizlik talablari

Kirish avtorizatsiyasi. Maxfiy tasvir ma'lumotlariga kirish tegishli xavfsizlik ruxsatiga ega bo'lgan shaxslar bilan cheklanishi kerak. O'ta nozik ma'lumotlarga kirish uchun noto'g'ri foydalanishning oldini olish uchun bir nechta operatorlarni jalb qilish kerak. Agar video oqimi turli darajadagi ma'lumotlarni o'z ichiga olsa (masalan, to'liq video, izohlar, ...), kirish har bir daraja uchun alohida boshqarilishi kerak. Nihoyat, maxfiy ma'lumotlarga kirishga bo'lgan barcha urinishlar jurnalga kiritilishi kerak.
Mavjudligi. Kamera tarmog'i turli sharoitlarda tizim xizmatlarining mavjudligi haqida ma'lum kafolatlar berishi kerak. Xususan, xizmat ko'rsatishni rad etish hujumlariga qarshi oqilona qarshilik ko'rsatilishi kerak.
Videoma'lumotlarning yaxlitligini himoya qilishning barqarorligi tasodifiy va ataylab buzilishlar ta'sirida xavfsizlik holatini saqlab qolish qobiliyati sifatida tushuniladi. Ishdagi tasodifiy buzilishlarning asosiy manbai videoni qayta ishlashning odatiy (ruxsat etilgan) operatsiyalari hisoblanadi:
1. Videoma'lumotni transkodlash.
2. Videoma'lumotni alohida video ketma-ketliklarga ajratish.
3. Format o‘zgarishi sababli biriktirilgan autentifikatorni ataylab yoki tasodifan o‘chirib tashlash. Qasddan buzilishlarga chidamlilik deganda himoyalangan video fragmentlarida qasddan buzilishlarni aniqlashning mustaqilligini ta'minlash qobiliyati tushuniladi.
Videofaylning yaxlitligini qanday tekshirish mumkin
Men ffmpeg videoni to'xtatib qo'yadigan tarzda o'ynata olmasa (men ramka tushishi bilan shug'ullana olaman) faqat menga aytadigan versiyani xohlardim va men uning Linuxga asoslangan bo'lishini xohlardim. Men quyidagi yechimga keldim. Men skanerlash paytida nima sodir bo'lganligi haqida ko'proq ma'lumot olishni xohlardim, shuning uchun fayl skanerlashni boshlaganda skanerlangan/jami/xato chiqishini tanladim.
#!/bin/bash
# Name: mediaCheck
# Purpose: Confirm all media in a path can be played back using ffmpeg
# Requires:
# * ffmpeg in $PATH
# * date in $PATH
# * find in $PATH


function checkReqs {
# checks requirements for the script
requires="ffmpeg date find"
re=0
for i in $requires; do
if ! which $i > /dev/null; then
((re++))
echo "$i is required in path for this script"
fi
done
if [ "$re" -gt 0 ]; then
echo "Requirements not met"
exit 1
fi
}


function pathCheck {
# if there isn't a path, use pwd, otherwise clean up whatever is provided.
if [ -z "$1" ]; then
lPath=mediaCheck.log
cPath=$(pwd)
else
cPath=$(readlink -f $1)
lPath=$1
fi
}


function pdate {
# my prefered date formatting
date +%FT%H:%M:%S
}


function checkMedia {
# the actual ffmpeg command
ffmpeg -v error -i $1 -f null - &> "$1.log"
}


function findItems {
# our main loops
# first a set of common file types
for mtype in flv avi m4v mkv mp4; do
c=0; e=0
# Get a total per file type
ttotal=$(find $1 -type f -name \*.$mtype | wc -l)
# then the actual lookup and check
for i in $(find $1 -type f -name \*.$mtype); do
echo -ne "$(pdate) $c out of $ttotal $mtype files checked with $e errors.\r"
((c++))
# check media, and if we fail, increment error counter.
if ! checkMedia "$i" ; then
((e++))
echo "$i failed" >> $lPath.log
fi
done
echo "$(pdate) $c out of $ttotal $mtype files checked with $e errors."
unset c e
done
}


# set blank cpath
cPath=''


# uncomment the line below if this script isn't behaving as expected
# set -x


# Check requirements before anything else
checkReqs
# Then generate a path
pathCheck $1


# Make sure we don't stumble on names with spaces
IFS=$'\n'


echo "$(pdate) scan started."
findItems $cPath
echo "$(pdate) scan complete."


Download 265.9 Kb.

Do'stlaringiz bilan baham:
1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling