-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
36 lines (30 loc) · 854 Bytes
/
main.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
from re import MULTILINE
import kivy
kivy.require("1.0.6")
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.gridlayout import GridLayout
from kivy.uix.textinput import TextInput
from kivy.uix.button import Button
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
from kivy.uix.popup import Popup
import socket
import core
class get_ip(Widget):
ip = ObjectProperty(None)
def btn(self):
ip = self.ip.text
if len(ip) == 0:
scan = core.Scan()
else:
scan = core.Scan(ip=ip)
run = scan.run()
popup = Popup(title='', content=Label(text=str(run)), auto_dismiss=False)
popup.open()
class MyApp(App):
def build(self):
self.title = "Port Scanner"
return get_ip()
if __name__ == '__main__':
MyApp().run()