def getNetworkIPs(self):
     nwlist = []
     sharelist = []
     self.IP = iNetwork.getAdapterAttribute(self.iface, "ip")
     if len(self.IP):
         strIP = str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(
             self.IP[2]) + ".0/24"
         nwlist.append(netscan.netzInfo(strIP))
         strIP1 = str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(
             self.IP[2])
         strIP2 = str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(
             self.IP[2]) + "." + str(self.IP[3])
         system(
             "/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/getips.sh "
             + strIP1 + " " + strIP2 + " >/tmp/getips")
         try:
             f = open("/tmp/getips")
             for l in f:
                 s = []
                 ls = l.strip().split(":")
                 s.append(ls[0])
                 s.append(ls[1])
                 s.append(ls[2])
                 s.append("00:00:00:00:00:00")
                 s.append(ls[1])
                 s.append(ls[3])
                 nwlist[0].append(s)
         except:
             pass
     tmplist = nwlist[0]
     return tmplist
	def getNetworkIPs(self):
		nwlist = []
		sharelist = []
		self.IP = iNetwork.getAdapterAttribute(self.iface, "ip")
		if len(self.IP):
			strIP = str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(self.IP[2]) + ".0/24"
			nwlist.append(netscan.netzInfo(strIP))
			strIP1=str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(self.IP[2])
			strIP2=str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(self.IP[2]) + "." + str(self.IP[3])
			system("/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/getips.sh " + strIP1 + " " + strIP2 + " >/tmp/getips")
			try:
				f=open("/tmp/getips")
				for l in f:
					s=[]
					ls=l.strip().split(":")
					s.append(ls[0])
					s.append(ls[1])
					s.append(ls[2])
					s.append("00:00:00:00:00:00")
					s.append(ls[1])
					s.append(ls[3])
					nwlist[0].append(s)
			except:
				pass
		tmplist = nwlist[0]
		return tmplist
	def getNetworkIPs(self):
		nwlist = []
		sharelist = []
		self.IP = iNetwork.getAdapterAttribute(self.iface, "ip")
		if len(self.IP):
			strIP = str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(self.IP[2]) + ".0/24"
			nwlist.append(netscan.netzInfo(strIP))
		tmplist = nwlist[0]
		return tmplist
	def getNetworkIPs(self):
		nwlist = []
		sharelist = []
		self.IP = iNetwork.getAdapterAttribute(self.iface, "ip")
		if len(self.IP):
			strIP = str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(self.IP[2]) + ".0/24"
			nwlist.append(netscan.netzInfo(strIP))
		tmplist = nwlist[0]
		return tmplist
	def scanIPclosed(self,result):
		if result[0]:
			if result[1] == "address":
				print "[Networkbrowser] got IP:",result[1]
				nwlist = []
				nwlist.append(netscan.netzInfo(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()
	def scanIPclosed(self,result):
		if result[0]:
			if result[1] == "address":
				print "[Networkbrowser] got IP:",result[1]
				nwlist = []
				nwlist.append(netscan.netzInfo(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()
Example #7
0
 def getNetworkIPs(self):
     nwlist = []
     sharelist = []
     self.IP = iNetwork.getAdapterAttribute(self.iface, 'ip')
     print 'Current IP',
     print self.IP
     print 'EthIP',
     print iNetwork.getAdapterAttribute('eth0', 'ip')
     print 'WlanIP',
     print iNetwork.getAdapterAttribute('wlan0', 'ip')
     if len(self.IP):
         strIP = str(self.IP[0]) + '.' + str(self.IP[1]) + '.' + str(self.IP[2]) + '.0/24'
         nwlist.append(netscan.netzInfo(strIP))
     tmplist = nwlist[0]
     return tmplist
Example #8
0
 def getNetworkIPs(self):
     nwlist = []
     sharelist = []
     self.IP = iNetwork.getAdapterAttribute(self.iface, 'ip')
     print 'Current IP',
     print self.IP
     print 'EthIP',
     print iNetwork.getAdapterAttribute('eth0', 'ip')
     print 'WlanIP',
     print iNetwork.getAdapterAttribute('wlan0', 'ip')
     if len(self.IP):
         strIP = str(self.IP[0]) + '.' + str(self.IP[1]) + '.' + str(self.IP[2]) + '.0/24'
         nwlist.append(netscan.netzInfo(strIP))
     tmplist = nwlist[0]
     return tmplist
 def scanIPclosed(self, result):
     if result[0]:
         if result[1] == 'address':
             print('[Networkbrowser] got IP:', )
             print(result[1])
             nwlist = []
             nwlist.append(netscan.netzInfo(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()
Example #10
0
	def getNetworkIPs(self):
		nwlist = []
		sharelist = []
		self.IP = iNetwork.getAdapterAttribute(self.iface, "ip")
		if len(self.IP):
			strIP = str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(self.IP[2]) + ".0/24"
			nwlist.append(netscan.netzInfo(strIP))
		self.networklist = nwlist[0]
		if len(self.IP) and (self.IP[0] != 0 or self.IP[1] != 0 or self.IP[2] != 0):
			strIP = str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(self.IP[2]) + ".0/24"
			self.Console.ePopen("nmap -oX - " + strIP + ' -sP', self.Stage1SettingsComplete)
		else:
			write_cache(self.cache_file, self.networklist)
			if len(self.networklist) > 0:
				self.updateHostsList()
			else:
				self.setStatus('error')
 def getNetworkIPs(self):
     nwlist = []
     sharelist = []
     self.IP = iNetwork.getAdapterAttribute(self.iface, "ip")
     if len(self.IP):
         self.netmask = iNetwork.getAdapterAttribute(self.iface, "netmask")
         strCIDR = str(
             sum([
                 bin(int(x)).count('1') for x in formatIp(
                     iNetwork.getAdapterAttribute(self.iface,
                                                  "netmask")).split('.')
             ]))
         strIP = str(self.IP[0] & self.netmask[0]) + "." + str(
             self.IP[1] & self.netmask[1]) + "." + str(
                 self.IP[2] & self.netmask[2]) + "." + str(
                     self.IP[3] & self.netmask[3]) + "/" + strCIDR
         nwlist.append(netscan.netzInfo(strIP))
     tmplist = nwlist[0]
     return tmplist
 def getNetworkIPs(self):
     nwlist = []
     strIP = self.makeStrIP()
     if strIP:
         nwlist = netscan.netzInfo(strIP)
     return nwlist
	def getNetworkIPs(self):
		nwlist = []
		strIP = self.makeStrIP()
		if strIP:
			nwlist = netscan.netzInfo(strIP)
		return nwlist