#!/bin/bash # Backs up all files in current directory modified within last 24 hours #+ in a "tarball" (tarred and gzipped file). BACKUPFILE=backup-$(date +%m-%d-%Y) # Embeds date in backup filename. # Thanks, Joshua Tschida, for the idea. archive=${1:-$BACKUPFILE} # If no backup-archive filename specified on command-line, #+ it will default to "backup-MM-DD-YYYY.tar.gz." tar cvf - `find . -mtime -1 -type f -print` > $archive.tar gzip $archive.tar echo "Directory $PWD backed up in archive file \"$archive.tar.gz\"." # Stephane Chazelas points out that the above code will fail #+ if there are too many files found #+ or if any filenames contain blank characters. # He suggests the following alternatives: # ------------------------------------------------------------------- # find . -mtime -1 -type f -print0 | xargs -0 tar rvf "$archive.tar" # using the GNU version of "find". # find . -mtime -1 -type f -exec tar rvf "$archive.tar" '{}' \; # portable to other UNIX flavors, but much slower. # ------------------------------------------------------------------- exit 0
Last updated 4 Aug 11 Course Title: OWASP Top 10 Threats and Mitigation Exam Questions - Single Select 1) Which of the following consequences is most likely to occur due to an injection attack? Spoofing Cross-site request forgery Denial of service Correct Insecure direct object references 2) Your application is created using a language that does not support a clear distinction between code and data. Which vulnerability is most likely to occur in your application? Injection Correct Insecure direct object references Failure to restrict URL access Insufficient transport layer protection 3) Which of the following scenarios is most likely to cause an injection attack? Unvalidated input is embedded in an instruction stream. Correct Unvalidated input can be distinguished from valid instructions. A Web application does not validate a client’s access to a resource. A Web action performs an operation on behalf of the user without checkin...
Comments
Post a Comment
https://gengwg.blogspot.com/