-
Notifications
You must be signed in to change notification settings - Fork 2
/
tabindex.py
35 lines (30 loc) · 974 Bytes
/
tabindex.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
from bs4 import BeautifulSoup
import requests
import argparse
import streamlit as st
parser = argparse.ArgumentParser(description = 'Check for Null tab index')
parser.add_argument('--link', type=str)
args = parser.parse_args()
url = args.link
# print('Verifying SSL certificate details........\n')
# time.sleep(2)
def check_tab(url):
# url=input()
st.title('Null tab index reports')
st.markdown('---')
html = requests.get(url).content
c=0
soup = BeautifulSoup(html, "html.parser")
for tag in soup.find_all():
try:
if len(tag['tabindex']) >0:
attr=tag['tabindex']
if int(attr)==0:
c=1
st.write("Null Tabindex found at :")
st.write(str(tag))
st.write("\n")
except:
continue
if(c==0):
st.write("No null tabindex found")