forked from PACKED-vzw/ResurrectionLab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbulk-handling-images.sh
More file actions
executable file
·37 lines (30 loc) · 1006 Bytes
/
Copy pathbulk-handling-images.sh
File metadata and controls
executable file
·37 lines (30 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# do some handling on different folders that contain disk images
# author: Nastasia Vanderperren (PACKED vzw)
#
##############
for folder in $1/*
do
cd $folder
diskimage=image/*.img
rsync -a $diskimage handling.img
handling=handling.img
# create an MD5 checksum
echo "Creating md5 checksum..."
md5 $diskimage > meta/checksum.txt
echo "Done creating checksum!"
echo "Identifying the file system..."
disktype $handling > meta/disktype.txt
echo "Done identifying the file system!"
echo "Start characterizing the files of the disk..."
sf -hash md5 -z -csv content > meta/file_identification.csv # creates also checksum for each file
echo "Done characterizing files!"
# scan the image
echo "Scanning the image"
freshclam -update # update virus database
clamscan -r --bell $handling content/ > meta/virusscan.txt
echo "Done scanning the image!"
rm $handling
echo "Done $folder!"
done
echo "Done all folders!"