Beispiel #1
0
 def get_domain(self):
     try:
         user_name = tools.DecodeString(self.get(1)[0])
         if "@" in user_name:
             return user_name[user_name.index("@") + 1:]
     except:
         return None
Beispiel #2
0
 def get_user_name(self):
     try:
         return tools.DecodeString(self.get(1)[0])
         # if "@" in user_name:
         #     return user_name[:user_name.index("@")]
         # else:
         #     return user_name
     except:
         return None
Beispiel #3
0
 def get_nas_portid(self):
     try:
         return tools.DecodeString(self.get(87)[0])
     except:
         return ''
Beispiel #4
0
 def get_acct_sessionid(self):
     try:
         return tools.DecodeString(self.get(44)[0])
     except:
         return ''
Beispiel #5
0
 def get_calling_stationid(self):
     try:
         return tools.DecodeString(self.get(31)[0])
     except:
         return ''
Beispiel #6
0
 def get_nas_class(self):
     try:
         return tools.DecodeString(self.get(25)[0])
     except:
         return ''
Beispiel #7
0
 def get_nas_id(self):
     try:
         return tools.DecodeString(self.get(32)[0])
     except:
         return ''
Beispiel #8
0
 def get_mac_addr(self):
     try:
         return self.client_mac or tools.DecodeString(
             self.get(31)[0]).replace("-", ":")
     except:
         return None
Beispiel #9
0
 def get_user_name(self):
     try:
         user_name = tools.DecodeString(self.get(1)[0])
         return user_name
     except:
         return None