File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -2302,7 +2302,25 @@ def comms_ip(self):
2302
2302
"""
2303
2303
Returns ascii representation of the ip address used to communicate with the Cb Response Server
2304
2304
"""
2305
- return socket .inet_ntoa (struct .pack ('>i' , self ._attribute ('comms_ip' , 0 )))
2305
+ try :
2306
+ ip_address = socket .inet_ntoa (struct .pack ('>i' , self ._attribute ('comms_ip' , 0 )))
2307
+ except :
2308
+ ip_address = self ._attribute ('comms_ip' , 0 )
2309
+
2310
+ return ip_address
2311
+
2312
+ @property
2313
+ def interface_ip (self ):
2314
+ """
2315
+ Returns ascii representation of the ip address of the interface used to communicate with the Cb Response server.
2316
+ If using NAT, this will be the "internal" IP address of the sensor.
2317
+ """
2318
+ try :
2319
+ ip_address = socket .inet_ntoa (struct .pack ('>i' , self ._attribute ('interface_ip' , 0 )))
2320
+ except :
2321
+ ip_address = self ._attribute ('interface_ip' , 0 )
2322
+
2323
+ return ip_address
2306
2324
2307
2325
@property
2308
2326
def process_md5 (self ):
@@ -2404,6 +2422,13 @@ def last_update(self):
2404
2422
"""
2405
2423
return convert_from_solr (self .get ('last_update' , - 1 ))
2406
2424
2425
+ @property
2426
+ def last_server_update (self ):
2427
+ """
2428
+ Returns a pretty version of when this process last updated
2429
+ """
2430
+ return convert_from_solr (self .get ('last_server_update' , - 1 ))
2431
+
2407
2432
@property
2408
2433
def username (self ):
2409
2434
"""
You can’t perform that action at this time.
0 commit comments