http response checker 08-30-2015, 12:19 AM
#1
I made this for a project @Eclipse gave me, and I think some people here may benefit from it.
Run in terminal or command line, it takes a site for a parameter, then acts as a browser and checks the site's http response.
Acting as a browser using a User-agent may fool some anti-bot systems, but not ones like cloudflare. Any solution to this issue would be hugely appreciated.
Source:
Usage:
If you don't already have Requests installed, install it using pip
Run in terminal or command line, it takes a site for a parameter, then acts as a browser and checks the site's http response.
Acting as a browser using a User-agent may fool some anti-bot systems, but not ones like cloudflare. Any solution to this issue would be hugely appreciated.
Source:
Code:
import requests
import sys
url = sys.argv[1]
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'}
r = requests.get(url, headers=headers)
print r.status_codeUsage:
Code:
$ python resp.py https://github.comIf you don't already have Requests installed, install it using pip
Code:
$ pip install requestsIt's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.
don't have much in the first place, who feel the new currents and ride them the farthest.















![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)










![[Image: 77tOjye.png]](http://i.imgur.com/77tOjye.png)