Changeset 5426

Show
Ignore:
Timestamp:
03/02/08 02:03:27 (5 months ago)
Author:
hdm
Message:

Adds the start of a http responder, fixes for dns and smb

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework3/trunk/modules/auxiliary/server/capture/smb.rb

    r5424 r5426  
    210210                        :type  => "smb_peer_os", 
    211211                        :data  => smb[:peer_os] 
    212                 ) if smb[:peer_os] 
     212                ) if (smb[:peer_os] and smb[:peer_os].strip.length > 0) 
    213213 
    214214                report_note( 
     
    216216                        :type  => "smb_peer_lm", 
    217217                        :data  => smb[:peer_lm] 
    218                 ) if smb[:peer_lm] 
     218                ) if (smb[:peer_lm] and smb[:peer_lm].strip.length > 0) 
    219219 
    220220                report_note( 
     
    222222                        :type  => "smb_domain", 
    223223                        :data  => smb[:domain] 
    224                 ) if smb[:domain] 
     224                ) if (smb[:domain] and smb[:domain].strip.length > 0) 
    225225                                                 
    226226                fd = File.open(datastore['LOGFILE'], "a") 
  • framework3/trunk/modules/auxiliary/server/fakedns.rb

    r5425 r5426  
    9090            #  randomized IDs 
    9191            # 
    92             log = "FakeDNS: #{addr[3]}:#{addr[1]} XID #{request.id} " 
     92 
    9393                        lst = [] 
    9494                         
     
    138138                                        request.add_additional(name, 60, ar)     
    139139                                else 
    140                                         print_status("UNKNOWN #{tc_s}")                 
     140                                        lst << "UNKNOWN #{tc_s}" 
    141141                                end 
    142142            } 
    143                         print_status("#{log} (#{lst.join(", ")})") 
     143                        print_status("DNS #{addr[3]}:#{addr[1]} XID #{request.id} (#{lst.join(", ")})") 
     144                         
     145                        report_note( 
     146                                :host => addr[3], 
     147                                :type => "dns_lookup", 
     148                                :data => "#{addr[3]}:#{addr[1]} XID #{request.id} (#{lst.join(", ")})" 
     149                        ) if lst.length > 0 
    144150                         
    145151            @sock.send(request.encode(), 0, addr[3], addr[1])