|
@@ -2,6 +2,7 @@
|
|
# -*- coding: utf-8 -*-
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
import sys
|
|
import sys
|
|
|
|
+from portscan import PortScan
|
|
from PyQt4 import QtGui, QtCore
|
|
from PyQt4 import QtGui, QtCore
|
|
|
|
|
|
|
|
|
|
@@ -14,10 +15,28 @@ class MainClass(QtGui.QMainWindow):
|
|
|
|
|
|
def initUI(self):
|
|
def initUI(self):
|
|
|
|
|
|
- self.resize(250,250)
|
|
|
|
|
|
+ self.resize(500,300)
|
|
self.center()
|
|
self.center()
|
|
self.setWindowTitle('FDN - VPN configuration generator')
|
|
self.setWindowTitle('FDN - VPN configuration generator')
|
|
self.statusBar().showMessage('Ready')
|
|
self.statusBar().showMessage('Ready')
|
|
|
|
+
|
|
|
|
+ qbtn = QtGui.QPushButton('Quit', self)
|
|
|
|
+ qbtn.clicked.connect(QtCore.QCoreApplication.instance().quit)
|
|
|
|
+ qbtn.resize(qbtn.sizeHint())
|
|
|
|
+
|
|
|
|
+ resbox = QtGui.QLabel(PortScan.portscan())
|
|
|
|
+
|
|
|
|
+ hbox = QtGui.QHBoxLayout()
|
|
|
|
+ hbox.addStretch(3)
|
|
|
|
+ hbox.addWidget(qbtn)
|
|
|
|
+ hbox.addWidget(resbox)
|
|
|
|
+
|
|
|
|
+ vbox = QtGui.QVBoxLayout()
|
|
|
|
+ vbox.addStretch(1)
|
|
|
|
+ vbox.addLayout(hbox)
|
|
|
|
+
|
|
|
|
+ self.setLayout(vbox)
|
|
|
|
+
|
|
self.show()
|
|
self.show()
|
|
|
|
|
|
def center(self):
|
|
def center(self):
|