Changeset 3920

Show
Ignore:
Timestamp:
09/21/06 09:51:58 (2 years ago)
Author:
hdm
Message:

Bug fix for passive-exploits
Bug fix for a crash in the DB import for XML

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework3/trunk/lib/msf/core/exploit_driver.rb

    r3899 r3920  
    130130                ctx = [ exploit, payload ] 
    131131 
     132 
    132133                # If we are being instructed to run as a job then let's create that job 
    133134                # like a good person. 
    134135                if (use_job) 
    135                         exploit.framework.jobs.start_job( 
    136                                 "Exploit: #{exploit.refname}",  
    137                                 ctx, 
    138                                 Proc.new { |ctx| job_run_proc(ctx) }, 
    139                                 Proc.new { |ctx| job_cleanup_proc(ctx) }) 
    140                 # Otherwise, run inline. 
     136                        if (exploit.stance == Msf::Exploit::Stance::Passive) 
     137                                exploit.framework.jobs.start_bg_job( 
     138                                        "Exploit: #{exploit.refname}",  
     139                                        ctx, 
     140                                        Proc.new { |ctx| job_run_proc(ctx) }, 
     141                                        Proc.new { |ctx| job_cleanup_proc(ctx) } 
     142                                )                        
     143                        else 
     144                                exploit.framework.jobs.start_job( 
     145                                        "Exploit: #{exploit.refname}",  
     146                                        ctx, 
     147                                        Proc.new { |ctx| job_run_proc(ctx) }, 
     148                                        Proc.new { |ctx| job_cleanup_proc(ctx) } 
     149                                )                        
     150                        end 
    141151                else 
    142152                        job_run_proc(ctx) 
  • framework3/trunk/lib/msf/ui/console/command_dispatcher/db.rb

    r3915 r3920  
    377377                                        prot = port.attributes['protocol'] 
    378378                                        pnum = port.attributes['portid'] 
     379                                         
     380                                        next if not port.elements['state'] 
    379381                                        stat = port.elements['state'].attributes['state'] 
     382                                         
    380383                                        next if not port.elements['service'] 
    381384                                        name = port.elements['service'].attributes['name']