Code:
#Boa:Frame:Frame1
import wx, os, commands
from time import sleep
def create(parent):
return Frame1(parent)
[wxID_FRAME1, wxID_FRAME1DHCP, wxID_FRAME1IPTABLES, wxID_FRAME1KELUAR,
wxID_FRAME1MON0, wxID_FRAME1PANEL1, wxID_FRAME1WIFI,
] = [wx.NewId() for _init_ctrls in range(7)]
class Frame1(wx.Frame):
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
pos=wx.Point(551, 267), size=wx.Size(206, 208),
style=wx.DEFAULT_FRAME_STYLE, title=u'Linux Cuy')
self.SetClientSize(wx.Size(190, 170))
self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
pos=wx.Point(0, 0), size=wx.Size(190, 170),
style=wx.TAB_TRAVERSAL)
self.mon0 = wx.Button(id=wxID_FRAME1MON0, label=u'Aktifkan mon0',
name=u'mon0', parent=self.panel1, pos=wx.Point(8, 8),
size=wx.Size(104, 23), style=0)
self.mon0.Bind(wx.EVT_BUTTON, self.OnMon0Button, id=wxID_FRAME1MON0)
self.wifi = wx.Button(id=wxID_FRAME1WIFI, label=u'Scan Wifi',
name=u'wifi', parent=self.panel1, pos=wx.Point(8, 40),
size=wx.Size(104, 23), style=0)
self.wifi.Bind(wx.EVT_BUTTON, self.OnWifiButton, id=wxID_FRAME1WIFI)
self.dhcp = wx.Button(id=wxID_FRAME1DHCP, label=u'Config dhcp',
name=u'dhcp', parent=self.panel1, pos=wx.Point(8, 72),
size=wx.Size(104, 23), style=0)
self.dhcp.Bind(wx.EVT_BUTTON, self.OnDhcpButton, id=wxID_FRAME1DHCP)
self.iptables = wx.Button(id=wxID_FRAME1IPTABLES,
label=u'Atur iptables', name=u'iptables', parent=self.panel1,
pos=wx.Point(8, 104), size=wx.Size(104, 23), style=0)
self.iptables.Bind(wx.EVT_BUTTON, self.OnIptablesButton,
id=wxID_FRAME1IPTABLES)
self.keluar = wx.Button(id=wxID_FRAME1KELUAR, label=u'Keluar',
name=u'keluar', parent=self.panel1, pos=wx.Point(8, 136),
size=wx.Size(104, 23), style=0)
self.keluar.Bind(wx.EVT_BUTTON, self.OnKeluarButton,
id=wxID_FRAME1KELUAR)
def __init__(self, parent):
self._init_ctrls(parent)
def OnMon0Button(self, event):
os.system('gnome-terminal --command="airmon-ng start wlan0"')
def OnWifiButton(self, event):
os.system('gnome-terminal --command="airodump-ng mon0"')
def OnDhcpButton(self, event):
event.Skip()
def OnIptablesButton(self, event):
os.system('iptables -F && iptables --table nat --flush && iptables --delete-chain \
&& iptables --table nat --delete-chain')
def OnKeluarButton(self, event):
exit()