Untitled

From Corrupt Hedgehog, 13 Years ago, written in Plain Text, viewed 4 times.
URL https://paste.blessuren.de/view/42d6e739 Embed
Download Paste or View Raw
  1. #!/bin/bash
  2.  
  3. elinks='/usr/local/bin/elinks'
  4.  
  5.  
  6. function getImage()
  7. {
  8.  
  9. echo "checking $1 ..."
  10.  
  11. image=`$elinks -source $1 > out.html && cat out.html | tr ' ' '\n' | grep http://images.4fuckr.com/ | tail -1 | cut -d "\"" -f 2`
  12. next=`cat out.html | tr ' ' '\n' | grep 'next' | cut -d "\"" -f 2`
  13.  
  14. echo "$image next: $next"
  15.  
  16. }
  17.  
  18. getImage "$1"
  19.  
  20. while [ $next ]
  21.         do
  22.  
  23.                tmp_image=$image
  24.                tmp_url="http://www.4fuckr.com$next"
  25.                getImage "http://www.4fuckr.com$next"
  26.  
  27.         done
  28.  
  29. echo "$tmp_image" > last_image
  30. echo "$tmp_url" >> last_image
  31.  

Reply to "Untitled"

Here you can reply to the paste above