-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.py
41 lines (40 loc) · 893 Bytes
/
index.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
from flask import Flask,render_template,Response
from Ping import pingdata
import time
from listIP import networkData
from sniffer import captureData
from OpenScan import openScan
from progressUpdate import progressUpdate
from renderStats import render_stat
app=Flask(__name__)
print(app)
app.register_blueprint(pingdata)
app.register_blueprint(captureData)
app.register_blueprint(networkData)
app.register_blueprint(openScan)
app.register_blueprint(render_stat)
@app.route('/')
def hello_world():
f=open('Data.csv','r')
l=len(f.readlines())-1
print(l)
f.seek(0,0)
d=[]
while(l!=0):
st=f.readline().rstrip().split(",")
print(st)
temp=[]
print(st)
if(st==['']):
break
else:
for i in st:
temp.append(i)
print(i)
d.append(temp)
l-=1
f.close()
print("TAG: ",d)
return render_template('HomePage.html',page_ip=d)
if __name__=="__main__":
app.run(debug=True)