samedi 28 mai 2016

wget link from random line in file

I'm trying to download a website that uses semi-predictable urls, meaning the url will always end with a random five character alphanumeric string. I created a file with crunch with the random string by using the command:

crunch 5 5 abcdefghijklmnopqrstuvwxyz123456789 > possible_links

Then I created a bash file to call the lines and wget the links:

#!/bin/bash
FILE=possible_links
while read line; do
        wget -q --wait=20 http://ift.tt/1X4E5rb}
done

but obviously it is going to go to aaaaa, then aaaab, then aaaac, aaaad, etc etc, is there a way to make it go to random lines?




Aucun commentaire:

Enregistrer un commentaire