migrate to git.charlotte.sh
This commit is contained in:
commit
fbd588721e
412 changed files with 13750 additions and 0 deletions
16
automation-sys320/week15/finalC3.bash
Normal file
16
automation-sys320/week15/finalC3.bash
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
# turn report.txt into an html report
|
||||
|
||||
echo -e "<html>\n<head>\n\t<style>\n\t\ttd {border: 1px solid black;}\n\t</style>\n</head>\n<body>\n<h3>Access logs with IOC indicators:</h3>\n<table>" > report.html
|
||||
|
||||
cat report.txt | while read -r line; do
|
||||
echo -e "\t<tr>\n" >> report.html
|
||||
for element in $line; do
|
||||
echo -e "\t\t<td>$element</td>" >> report.html
|
||||
done
|
||||
echo -e "\t</tr>" >> report.html
|
||||
done
|
||||
|
||||
echo -e "</table>\n</body>\n</html>" >> report.html
|
||||
|
||||
cp report.html /var/www/html/report.html
|
Loading…
Add table
Add a link
Reference in a new issue