Friday, May 20, 2022

Automatically Downloading The New Book The Art of Mac Malware Book

I wrote this script today to automatically download the chapters from the new book, The Art of Mac Malware by Patrick Wardle, so I could put it on my ereader. Looks very interesting!



#!/bin/bash
lynx -dump https://taomm.org/vol1/pdfs.html | grep "https" | awk '{for(i=2;i<NF+1;i++) printf $i" "; print ""}' | sed -r 's/\s*$//g' | sed -r 's/ /%20/g' > urls.txt && wget -i urls.txt