Changeset 5431

Show
Ignore:
Timestamp:
03/04/08 15:40:04 (5 months ago)
Author:
egypt
Message:

Really fix the empty LHOST bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework3/trunk/modules/payloads/singles/php/reverse_php.rb

    r5430 r5431  
    7070 
    7171                if (!datastore['LHOST'] or datastore['LHOST'].empty?) 
    72                         # LHOST should always be set when we get here...  but in case it isn't, 
    73                         raise Rex::ArgumentError, "LHOST is required" 
     72                        # datastore is empty on msfconsole startup 
     73                        ipaddr = 0x7f000001 
     74                        port = 4444 
     75                else 
     76                        ipaddr = datastore['LHOST'].split(/\./).map{|c| c.to_i}.pack("C*").unpack("N").first 
     77                        port = datastore['LPORT'] 
    7478                end 
    75                 ipaddr = datastore['LHOST'].split(/\./).map{|c| c.to_i}.pack("C*").unpack("N").first 
    76                 port = datastore['LPORT'] 
    7779 
    7880                #