@@ -58,10 +58,6 @@ def options(self, context, module_options):
5858 """
5959 self .context = context
6060
61- self .share = "C$"
62- if "SHARE" in module_options :
63- self .share = module_options ["SHARE" ]
64-
6561 self .password = "mR3m"
6662 if "PASSWORD" in module_options :
6763 self .password = module_options ["PASSWORD" ]
@@ -74,8 +70,9 @@ def on_admin_login(self, context, connection):
7470 # 1. Evole conn into dploot conn
7571 self .context = context
7672 self .connection = connection
73+ self .share = connection .args .share
7774
78- host = connection .hostname + "." + connection .domain
75+ host = f" { connection .hostname } . { connection .domain } "
7976 domain = connection .domain
8077 username = connection .username
8178 kerberos = connection .kerberos
@@ -114,10 +111,9 @@ def on_admin_login(self, context, connection):
114111 for path in self .custom_user_path :
115112 user_path = path .format (username = user )
116113 self .dig_confCons_in_files (conn = dploot_conn , directory_path = user_path , recurse_level = 0 , recurse_max = self .recurse_max )
117- if self .custom_path is not None :
118- content = dploot_conn .readFile (self .share , self .custom_path )
119- if content is None :
120- continue
114+ if self .custom_path is not None :
115+ content = dploot_conn .readFile (self .share , self .custom_path )
116+ if content is not None :
121117 self .context .log .info (f"Found confCons.xml file: { self .custom_path } " )
122118 self .handle_confCons_file (content )
123119
@@ -159,7 +155,7 @@ def handle_confCons_file(self, file_content):
159155 username = node_attribute ["Username" ]
160156 protocol = node_attribute ["Protocol" ]
161157 port = node_attribute ["Port" ]
162- host = f" { protocol } ://{ hostname } :{ port } " if node_attribute ["Hostname" ] != "" else ""
158+ host = f" { protocol } ://{ hostname } :{ port } " if node_attribute ["Hostname" ] != "" else " "
163159 self .context .log .highlight (f"{ name } :{ host } - { domain } \\ { username } :{ password } " )
164160
165161 def parse_xml_nodes (self , main ):
0 commit comments