This repository has been archived by the owner on Sep 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
T1tl3.py
62 lines (55 loc) · 1.42 KB
/
T1tl3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Rudra Sarkar
# Twitter: @rudr4_sarkar
# T1tl3.py
import sys
import requests
from bs4 import BeautifulSoup as bs
def usage():
print ('')
print ('$ python ' + sys.argv[0] + ' urlList.txt')
def banner():
print ('''
_______ __ _ _ ____
|__ __| /_ | | | | | |___ \
| | | | | |_ | | __) |
| | | | | __| | | |__ <
| | | | | |_ | | ___) |
|_| |_| \__| |_| |____/
By Rudra Sarkar, Twitter: @rudr4_sarkar
''')
def checkTitle(argv):
file = argv
with open(file) as f:
for line in f:
try:
line2 = line.strip()
url = 'http://'+line2
try:
# User-Agent Added
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
result = requests.get(url, headers=headers).content
soup = bs(result, 'html.parser')
title = soup.find('title')
print ('')
print (' [+] URL Title: ' + str(title.text))
print (' [+] URL: ' + url)
print (' [+] URL Status: ' + result.status_code)
except:
pass
except:
pass
if (len(sys.argv)) == 2:
try:
print ('')
banner()
print ('')
print (' [+] Scanning start ...')
checkTitle(sys.argv[1])
except:
print ('')
print (' [x] Can\'t find your ' + sys.argv[1] + ' file.')
else:
usage()
sys.exit(0)