Advertisement
LittleJok3r

httpheader.sh

Jul 14th, 2019
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.60 KB | None | 0 0
  1. #!/bin/bash
  2. #check http header/check site is live or die
  3. for i in `cat $1`; do
  4. check=`curl -Isw "%{http_code}" $i -o /dev/null`
  5.  if [[ $check =~ '200' ]];
  6.  then
  7.  echo "$i - Live - $check"
  8.  echo "$i">>200.txt
  9.  elif [[ $check =~ '302' ]];
  10.  then
  11.  echo "$i - Live - $check"
  12.  echo "$i">>302.txt
  13.  elif [[ $check =~ '301' ]];
  14.  then
  15.  echo "$i - Live - $check"
  16.  echo "$i">>301.txt
  17.  elif [[ $check =~ '404' ]];
  18.  then
  19.  echo "$i - Live - $check"
  20.  echo "$i">>404.txt
  21.  elif [[ $check =~ '505' ]];
  22.  then
  23.  echo "$i - Live - $check"
  24.  echo "$i">>505.txt
  25.  else
  26.  echo "$i - DIE - $check" | tee -a DIE.txt
  27. fi
  28. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement