/checkstat

Grepping for URLs according to the status code

Primary LanguagePython

checkstat

Grepping for URLs according to the status code

Descripiton

This is a simple tool that allows you to get the responses of different requests in an easy way. You can search for specific status codes and save the output as well.

Installation

git clone https://github.com/kavishkagihan/checkstat.git

cd checkstat

chmod +x checkstat.py

Adding the script to path

If you are willing to use this tool from any place without using the absolute path, you will have to add this directory to your path

sudo echo "PATH=$PATH:/path/to/the/script" >> ~/.bashrc

Usage

You can get the help menu with ./checkstat.py -h

image

The most simple usage would be to get the responses of a given domain list. By default this will read from stdin, but you can specify a file if you want with -f option.

./checkstat.py -f url_list

image

If you look closely, it is using http protocol instead of https. You can force it to use https with -p option.

image

If you have a big list of URLs and you want this to done quickly, you can increase the threads with -t option. And If you want to save the results of this, you can use -I options including -H and -B. However if you want to save the results, you will have specify a output directory with -o option.

./checkstat.py -f hosts -p -I -H -B -o output_directory

-H stands for the headers and -B stands for the body. So it will save the headers of the response in .header file and the body in .body file.

.header file image

.body file image

Also if you want to use multiple tools with a same command, you can get the input from stdin.

echo google.com|./checkstat.py -p

Lastly, the most important usage would be to grep for specific status codes. You can do it with -s.

cat hosts|./checkstat.py -s 404 -p

image

Contact

Find me, instagram - @_kavi.gihan, email - iamkavigihan@gmail.com