-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIIS.py
More file actions
26 lines (25 loc) · 1003 Bytes
/
IIS.py
File metadata and controls
26 lines (25 loc) · 1003 Bytes
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
import requests
print("========================================================")
print("========================================================")
file_path = 'ip.txt'
try:
with open(file_path, 'r') as file:
for line in file:
url = """http://""" + str(line.strip()) + """/"""""
print(url)
x = requests.get(url)
data = x.text
if data is not None and "<title>IIS Windows Server</title>" in data:
print("IIS Page found")
print
file1 = open("IIS.txt", "a")
file1.write(url + "\n")
file1.close()
print("========================================================")
else :
print("========================================================")
continue
except FileNotFoundError:
print(f"File '{file_path}' not found.")
except Exception as e:
print("An error occurred")