@@ -29,8 +29,8 @@ def initialize(info = {})
29
29
) )
30
30
31
31
register_advanced_options ( [
32
- OptBool . new ( 'PythonMeterpreterDebug ' , [ true , 'Enable debugging for the Python meterpreter ' , false ] ) ,
33
- OptBool . new ( 'PythonMeterpreterTryToFork ' , [ true , 'Fork a new process if the functionality is available ' , true ] )
32
+ OptBool . new ( 'MeterpreterTryToFork ' , [ true , 'Fork a new process if the functionality is available ' , true ] ) ,
33
+ OptBool . new ( 'PythonMeterpreterDebug ' , [ true , 'Enable debugging for the Python meterpreter ' , false ] )
34
34
] , self . class )
35
35
end
36
36
@@ -62,11 +62,11 @@ def stage_meterpreter(opts={})
62
62
txt . gsub ( '\\' , '\\' *8 ) . gsub ( '\'' , %q(\\\\\\\') )
63
63
}
64
64
65
- if ds [ 'PythonMeterpreterDebug ' ]
66
- met = met . sub ( 'DEBUGGING = False ', 'DEBUGGING = True ' )
65
+ unless ds [ 'MeterpreterTryToFork ' ]
66
+ met . sub! ( 'TRY_TO_FORK = True ', 'TRY_TO_FORK = False ' )
67
67
end
68
- unless ds [ 'PythonMeterpreterTryToFork ' ]
69
- met = met . sub ( 'TRY_TO_FORK = True ', 'TRY_TO_FORK = False ' )
68
+ if ds [ 'PythonMeterpreterDebug ' ]
69
+ met . sub! ( 'DEBUGGING = False ', 'DEBUGGING = True ' )
70
70
end
71
71
72
72
met . sub! ( 'SESSION_EXPIRATION_TIMEOUT = 604800' , "SESSION_EXPIRATION_TIMEOUT = #{ ds [ 'SessionExpirationTimeout' ] } " )
0 commit comments