@@ -1346,17 +1346,11 @@ def self.to_mem_aspx(framework, code, exeopts = {})
1346
1346
end
1347
1347
1348
1348
def self . to_win32pe_psh_net ( framework , code , opts = { } )
1349
- template_path = File . join ( Msf ::Config . data_directory ,
1350
- "templates" ,
1351
- "scripts" )
1352
- Rex ::Powershell ::Payload . to_win32pe_psh_net ( template_path , code )
1349
+ Rex ::Powershell ::Payload . to_win32pe_psh_net ( Rex ::Powershell ::Templates ::TEMPLATE_DIR , code )
1353
1350
end
1354
1351
1355
1352
def self . to_win32pe_psh ( framework , code , opts = { } )
1356
- template_path = File . join ( Msf ::Config . data_directory ,
1357
- "templates" ,
1358
- "scripts" )
1359
- Rex ::Powershell ::Payload . to_win32pe_psh ( template_path , code )
1353
+ Rex ::Powershell ::Payload . to_win32pe_psh ( Rex ::Powershell ::Templates ::TEMPLATE_DIR , code )
1360
1354
end
1361
1355
1362
1356
#
@@ -1365,10 +1359,7 @@ def self.to_win32pe_psh(framework, code, opts = {})
1365
1359
# Originally from PowerSploit
1366
1360
#
1367
1361
def self . to_win32pe_psh_reflection ( framework , code , opts = { } )
1368
- template_path = File . join ( Msf ::Config . data_directory ,
1369
- "templates" ,
1370
- "scripts" )
1371
- Rex ::Powershell ::Payload . to_win32pe_psh_reflection ( template_path , code )
1362
+ Rex ::Powershell ::Payload . to_win32pe_psh_reflection ( Rex ::Powershell ::Templates ::TEMPLATE_DIR , code )
1372
1363
end
1373
1364
1374
1365
def self . to_powershell_command ( framework , arch , code )
0 commit comments