Пример #1
0
	def getNetworkIPs(self):
		nwlist = []
		sharelist = []
		self.IP = iNetworkInfo.getConfiguredInterfaces()[self.iface].ipv4.address.split(".")
		if len(self.IP):
			strIP = "%s.0/24" %( ".".join(self.IP[0:3]) )
			Log.i(strIP)
			nwlist.append(netscan.netInfo(strIP))
		tmplist = nwlist[0]
		return tmplist
Пример #2
0
	def getNetworkIPs(self):
		Log.w()
		info = None
		sharelist = []
		if len(self._ip):
			strIP = "%s.0/24" %( ".".join(self._ip[0:3]) )
			info = [x for x in netscan.netInfo(strIP) if x[2] != '.'.join(self._ip)]
			Log.i(info)
		else:
			Log.w("IP FAULTY! %s" %self._ip)
		reactor.callFromThread(self._onNetworkIPsReady, info)
Пример #3
0
	def scanIPclosed(self,result):
		if result[0]:
			if result[1] == "address":
				print "[Networkbrowser] got IP:",result[1]
				nwlist = []
				nwlist.append(netscan.netInfo(result[0] + "/24"))
				self.networklist += nwlist[0]
			elif result[1] == "nfs":
				self.networklist.append(['host', result[0], result[0] , '00:00:00:00:00:00', result[0], 'Master Browser'])

		if len(self.networklist) > 0:
			write_cache(self.cache_file, self.networklist)
			self.updateHostsList()
Пример #4
0
	def scanIPclosed(self,result):
		if result[0]:
			if result[1] == "address":
				print "[Networkbrowser] got IP:",result[1]
				nwlist = []
				nwlist.append(netscan.netInfo(result[0] + "/24"))
				self.networklist += nwlist[0]
			elif result[1] == "nfs":
				self.networklist.append(['host', result[0], result[0] , '00:00:00:00:00:00', result[0], 'Master Browser'])

		if len(self.networklist) > 0:
			write_cache(self.cache_file, self.networklist)
			self.updateHostsList()