@@ -152,7 +152,7 @@ class HostChecker:
152152
153153 def __init__ (self , context , connection ):
154154 self .context = context
155- self .connection = connection
155+ self .connection = connection
156156 remoteOps = RemoteOperations (smbConnection = connection .conn , doKerberos = False )
157157 remoteOps .enableRegistry ()
158158 self .dce = remoteOps ._RemoteOperations__rrp
@@ -480,9 +480,6 @@ def check_applocker(self):
480480
481481 return success , reasons
482482
483- # Methods for getting values from the remote registry #
484- #######################################################
485-
486483 def _open_root_key (self , dce , connection , root_key ):
487484 ans = None
488485 retries = 1
@@ -592,9 +589,6 @@ def get_value(subkey_handle, dwIndex=0):
592589 return data
593590 return DCERPCSessionError (error_code = ERROR_OBJECT_NOT_FOUND )
594591
595- # Methods for getting values from SAMR and SCM #
596- ################################################
597-
598592 def get_service (self , service_name , connection ):
599593 """Get the service status and configuration for specified service"""
600594 remoteOps = RemoteOperations (smbConnection = connection .conn , doKerberos = False )
@@ -642,23 +636,15 @@ def ls(self, smb, path="\\", share="C$"):
642636 self .context .log .error (f"ls(): C:\\ { path } { e } \n " )
643637 return file_listing
644638
645-
646- # Comparison operators #
647- ########################
648-
649-
650639def le (reg_sz_string , number ):
651640 return int (reg_sz_string [:- 1 ]) <= number
652641
653-
654642def in_ (obj , seq ):
655643 return obj in seq
656644
657-
658645def startswith (string , start ):
659646 return string .startswith (start )
660647
661-
662648def not_ (boolean_operator ):
663649 def wrapper (* args , ** kwargs ):
664650 return not boolean_operator (* args , ** kwargs )
0 commit comments