Changeset 4080

Show
Ignore:
Timestamp:
10/28/06 18:08:18 (2 years ago)
Author:
hdm
Message:

Consistent handling of SMB errors

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework2/tags/framework-2.7/exploits/lsass_ms04_011.pm

    r3818 r4080  
    130130        } 
    131131 
    132         # XXX - UGLY 
     132 
    133133        my $smb = $dce->{'_handles'}{$handle}{'connection'}; 
     134        if (! $smb) { 
     135                $self->PrintLine("[*] Could not connect to SMB for $handle"); 
     136                return; 
     137        } 
     138         
    134139        if ( $target->[0] =~ /Auto/ ) { 
    135140                if ( $smb->PeerNativeOS eq 'Windows 5.0' ) { 
  • framework2/tags/framework-2.7/exploits/ms05_039_pnp.pm

    r3818 r4080  
    180180        } 
    181181 
    182     my $smb = $dce->{'_handles'}{$handle}{'connection'};             
     182    my $smb = $dce->{'_handles'}{$handle}{'connection'};            
     183        if (! $smb) { 
     184                $self->PrintLine("[*] Could not connect to SMB for $handle"); 
     185                return; 
     186        }         
    183187    if ( $smb->PeerNativeOS eq 'Windows 5.0' ) { 
    184188        $self->PrintLine("[*] Detected a Windows 2000 target"); 
  • framework2/tags/framework-2.7/exploits/netapi_ms06_040.pm

    r4023 r4080  
    144144 
    145145        my $smb = $dce->{'_handles'}{$handle}{'connection'}; 
    146          
    147146        if (! $smb) { 
    148                 $self->PrintLine("[*] Could not establish SMB session"); 
     147                $self->PrintLine("[*] Could not connect to SMB for $handle"); 
    149148                return; 
    150149        } 
  • framework2/tags/framework-2.7/exploits/rras_ms06_025.pm

    r3818 r4080  
    136136 
    137137        my $smb = $dce->{'_handles'}{$handle}{'connection'}; 
     138        if (! $smb) { 
     139                $self->PrintLine("[*] Could not connect to SMB for $handle"); 
     140                return; 
     141        }        
    138142        if ( $target->[0] =~ /Auto/ ) { 
    139143                if ( $smb->PeerNativeOS eq 'Windows 5.0' ) { 
  • framework2/tags/framework-2.7/exploits/rras_ms06_025_rasman.pm

    r3818 r4080  
    135135 
    136136        my $smb = $dce->{'_handles'}{$handle}{'connection'}; 
     137        if (! $smb) { 
     138                $self->PrintLine("[*] Could not connect to SMB for $handle"); 
     139                return; 
     140        }        
    137141        if ( $target->[0] =~ /Auto/ ) { 
    138142                if ( $smb->PeerNativeOS eq 'Windows 5.0' ) {