Homework 3 - deadline May 13th
Find all potential vulnerabilities in this script:
#!/bin/sh # process the files with name pattern matching regular expression # with downloaded "extract-info" (whatever that is) and then remove them curl -s http://www.example1.com/extractor-installer | sh echo -n "Enter directories: " read dirs echo -n "Enter filename regular expression: " read pattern find $dirs > /tmp/result cmd='extract-info `grep '$pattern' /tmp/result`' echo "Running command $cmd" eval $cmd cmd='rm `grep '$pattern' /tmp/result`' echo "Running command $cmd" eval $cmd rm /tmp/result
Please submit the homework below (log in to courses.cs.ut.ee environment with your ut.ee account), plain text is sufficient but PDF is also OK:
3. Homework 3Solutions for this task can no longer be submitted.