Changeset 5557

Show
Ignore:
Timestamp:
07/18/08 23:52:12 (3 months ago)
Author:
egypt
Message:

tebodell's patch to autorun meterpeter scripts on session creation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework3/trunk/modules/payloads/stages/windows/meterpreter.rb

    r5427 r5557  
    5959                                                "Automatically load the Stdapi extension", 
    6060                                                true 
    61                                         ]) 
     61                                        ]), 
     62                                OptString.new('AutoRunScript', [false, "Script to autorun on meterpreter session creation", '']) 
    6263                        ], Meterpreter) 
    6364 
     
    8687                        end 
    8788                end 
     89                if (datastore['AutoRunScript'].empty? == false) 
     90                        session.execute_script(datastore['AutoRunScript'], binding) 
     91                end 
    8892        end 
    8993