Advertisement
goebelmasse

Print MIME-header for a given HTTP or HTTPS URI

Dec 10th, 2016 (edited)
1,565
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. #!/bin/sh
  2. ########################################################################
  3. #
  4. # mime-header
  5. # Print MIME-header for a given HTTP or HTTPS URI.
  6. #
  7. # Requires lynx.
  8. #
  9. # $Id: mime-header,v 1.6 2022/10/30 10:04:25 elias Exp $
  10. #
  11. ########################################################################
  12.  
  13. # Paranoia line
  14. PATH=/bin:/usr/bin
  15.  
  16. # User-agent
  17. # internet exploiter 10 for best results from spammy sites ;)
  18. UA='Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)'
  19.  
  20. for uri
  21. do
  22.     lynx -useragent "$UA" -mime_header "$uri" 2>/dev/null |
  23.     sed '/^\s*$/q' |
  24.     sed '/^\s*$/d'
  25. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement