Skip to content

Commit

Permalink
Merge pull request CiscoCXSecurity#12 from BrashEndeavours/master
Browse files Browse the repository at this point in the history
Fixes misparsing when sharename IPC exists
  • Loading branch information
timb-machine authored Jun 11, 2020
2 parents f572927 + 9a032ed commit cd10f11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion enum4linux.pl
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ sub enum_shares {
}

print "\n[+] Attempting to map shares on $global_target\n";
my @shares = $shares =~ /\n\s*([ \S]+?)\s+(?:Disk|IPC|Printer)/igs;
my @shares = $shares =~ /^[\t ]*?([ \S]+?)[\t ]*?(?:Disk|IPC|Printer)[^\n]*/gms;
foreach my $share (@shares) {
$share =~ s/'/'\\''/g;
my $command = "smbclient -W '$global_workgroup' //'$global_target'/'$share' -U'$global_username'\%'$global_password' -c dir 2>&1";
Expand Down

0 comments on commit cd10f11

Please sign in to comment.