diff --git a/CHANGELOG b/CHANGELOG index 52a4666..03c6186 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -28,6 +28,7 @@ Version 0.8.5 - fixed PhishingManager error when try shutdown httpd server - fixed Windows UpdateFake modules - fixed check return is NoneType from function get_interface_mac +- fixed No such file or directory: 'settings/dhcpd.conf' #266 Version 0.8.4 ------------- diff --git a/core/config/commits/Lcommits.cfg b/core/config/commits/Lcommits.cfg index 8dabacb..3b6261c 100644 --- a/core/config/commits/Lcommits.cfg +++ b/core/config/commits/Lcommits.cfg @@ -29,6 +29,7 @@ master: { changelog : 'fixed PhishingManager error when try shutdown httpd server' }, { changelog : 'fixed Windows UpdateFake modules' }, { changelog : 'fixed check return is NoneType from function get_interface_mac' }, + { changelog : 'fixed No such file or directory: 'settings/dhcpd.conf' #266' }, ] WiFiPumpkin084: diff --git a/core/main.py b/core/main.py index 9759d80..088ab23 100644 --- a/core/main.py +++ b/core/main.py @@ -1206,22 +1206,17 @@ def CoreSettings(self): } print('[*] Enable forwarding in iptables...') Refactor.set_ip_forward(1) + # clean iptables settings for line in self.SettingsAP['kill']: Popen(split(line), stdout=PIPE,shell=False,stderr=PIPE) + # set interface using ifconfig for line in self.SettingsAP['interface']: Popen(split(line), stdout=PIPE,shell=False,stderr=PIPE) - dhcp_select = self.FSettings.Settings.get_setting('accesspoint','dhcp_server') - if dhcp_select != 'dnsmasq': - with open('settings/dhcpd.conf','w') as dhcp: - for i in self.SettingsAP['dhcp-server']:dhcp.write(i) - dhcp.close() - if path.isfile('/etc/dhcp/dhcpd.conf'): - system('rm /etc/dhcp/dhcpd.conf') - if not path.isdir('/etc/dhcp/'):mkdir('/etc/dhcp') - move('settings/dhcpd.conf', '/etc/dhcp/') - else: - with open('core/config/dnsmasq.conf','w') as dhcp: - for i in self.SettingsAP['dnsmasq']: - dhcp.write(i) + # check if dhcp option is enabled. + if self.FSettings.Settings.get_setting('accesspoint','dhcp_server',format=bool): + with open('core/config/dhcpd_wp.conf','w') as dhcp: + for line in self.SettingsAP['dhcp-server']:dhcp.write(line) dhcp.close() + if not path.isdir('/etc/dhcp/'): mkdir('/etc/dhcp') + move('core/config/dhcpd_wp.conf', '/etc/dhcp/') def SoftDependencies(self): ''' check if Hostapd, isc-dhcp-server is installed ''' @@ -1403,7 +1398,7 @@ def Start_PumpAP(self): print('[*] Configuring dhcpd...') if self.FSettings.Settings.get_setting('accesspoint','dhcpd_server',format=bool): self.Thread_dhcp = ThRunDhcp(['dhcpd','-d','-f','-lf','/var/lib/dhcp/dhcpd.leases','-cf', - '/etc/dhcp/dhcpd.conf',self.SettingsEnable['AP_iface']],self.currentSessionID) + '/etc/dhcp/dhcpd_wp.conf',self.SettingsEnable['AP_iface']],self.currentSessionID) self.Thread_dhcp.sendRequest.connect(self.GetDHCPRequests) self.Thread_dhcp.setObjectName('DHCP') self.Apthreads['RougeAP'].append(self.Thread_dhcp)